Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply enacted treasury withdrawals #3748

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Sep 21, 2023

Description

Closes #3736

Also add lenses ensWithdrawalsL, ensTreasuryL and epochStateTreasuryL.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@aniketd aniketd force-pushed the aniketd/apply-treasurywithdrawals-in-enact branch from d8e841b to e123bbb Compare September 21, 2023 16:26
@aniketd
Copy link
Contributor Author

aniketd commented Sep 21, 2023

This needs a bit of rework (potential underflow and some known guarantees).

@aniketd aniketd force-pushed the aniketd/apply-treasurywithdrawals-in-enact branch 2 times, most recently from a019dc1 to cd8871b Compare September 22, 2023 07:49
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are still missing some parts from the spec, like this one:
https://github.com/input-output-hk/formal-ledger-specifications/blob/d8260e001e248725a01335253ce33f35d1656fe7/src/Ledger/Chain.lagda#L84

We'll talk more about it during the meeting, but I think you haven't looked deeply into how ensTreasury field works in EnactState and how it relates to `epochStateTreasuryL

eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Epoch.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Epoch.hs Outdated Show resolved Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Epoch.hs Outdated Show resolved Hide resolved
Also, add lenses ensWithdrawalsL, ensTreasuryL and epochStateTreasuryL.
@aniketd aniketd force-pushed the aniketd/apply-treasurywithdrawals-in-enact branch from cd8871b to 0c95a90 Compare September 22, 2023 16:00
@aniketd aniketd requested a review from lehins September 22, 2023 16:02
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! 👍

@lehins lehins enabled auto-merge (squash) September 23, 2023 00:14
@lehins lehins merged commit aed5dde into master Sep 23, 2023
12 checks passed
@iohk-bors iohk-bors bot deleted the aniketd/apply-treasurywithdrawals-in-enact branch September 23, 2023 02:24
lehins pushed a commit that referenced this pull request Sep 25, 2023
Also, add lenses ensWithdrawalsL, ensTreasuryL and epochStateTreasuryL.

Patched version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply TreasuryWithdrawals
2 participants