Skip to content

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Aug 14, 2025

Description

Closes #5190

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@aniketd aniketd force-pushed the aniketd/deposits-in-stakepoolstate branch from db9b6bf to 1be9add Compare August 14, 2025 13:31
@aniketd aniketd requested a review from lehins August 14, 2025 13:32
@aniketd aniketd force-pushed the aniketd/deposits-in-stakepoolstate branch 4 times, most recently from 7469b0b to d2712dc Compare August 20, 2025 13:21
@aniketd aniketd marked this pull request as ready for review August 20, 2025 13:28
@aniketd aniketd requested a review from a team as a code owner August 20, 2025 13:28
@aniketd aniketd force-pushed the aniketd/deposits-in-stakepoolstate branch 3 times, most recently from ec5540c to f5a2b4d Compare August 21, 2025 12:51
@aniketd aniketd force-pushed the aniketd/deposits-in-stakepoolstate branch from f5a2b4d to af11893 Compare August 25, 2025 10:46
* Add `spsDeposit` field to `StakePoolState`
* Remove `psDeposits` field from `PState` data constructor
* Update `mkStakePoolState` to take deposit parameter as first argument
* Replace `psDepositsL` and `psDepositsCompactL` lenses with `psDepositsG` and `psDepositsCompactG` getters
* Remove `payPoolDeposit` and `refundPoolDeposit` functions
* Update `EncCBOR`/`DecCBOR` instances for `PState` to handle new structure
* Add lenses for `StakePoolState` fields
Also,
* Use `mempty` deposits for genesis stake pools per specification.
* Remove `epochStatePoolParamsL` lens.
* Add prUTxOStateL, prChainAccountStateL, prCertStateL lenses to PoolReap exports.
- Replace newPool/reregPool by a singular regPool.
- Remove addPoolDeposits.
- Update test examples to use this new way of handling pool deposits.
- Update ledger state golden test.
@aniketd aniketd force-pushed the aniketd/deposits-in-stakepoolstate branch from af11893 to 41420d9 Compare August 25, 2025 13:56
@aniketd aniketd requested a review from lehins August 25, 2025 15:38
@lehins lehins enabled auto-merge (squash) August 25, 2025 21:09
Copy link
Collaborator

@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.

Very nice! You got it almost right on point. There were a few minor things that I've noticed that could have been improved, so instead of adding those as review comments I've just created a follow up PR: #5254

@lehins lehins merged commit a24e06c into master Aug 25, 2025
234 of 236 checks passed
@lehins lehins deleted the aniketd/deposits-in-stakepoolstate branch August 25, 2025 21:11
@lehins lehins mentioned this pull request Aug 25, 2025
10 tasks
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.

Move psDeposits into StakePoolState
2 participants