Skip to content

Move withdrawals to LEDGER PV 11 onwards#5291

Merged
aniketd merged 1 commit intomasterfrom
aniketd/move-withdrawals-to-ledger-rule
Sep 18, 2025
Merged

Move withdrawals to LEDGER PV 11 onwards#5291
aniketd merged 1 commit intomasterfrom
aniketd/move-withdrawals-to-ledger-rule

Conversation

@aniketd
Copy link
Contributor

@aniketd aniketd commented Sep 15, 2025

Description

  • Imp tests need to pass
  • Sanitise git history and write description in commit messages
  • Conformance tests need to pass
  • Potentially refactor the common part out to be reused in both CERTS and LEDGER.

Supersedes #5279

Closes #4640 and #4932

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/move-withdrawals-to-ledger-rule branch from 4bf0b14 to 409120b Compare September 15, 2025 17:19
@aniketd aniketd requested review from lehins and teodanciu September 15, 2025 17:20
Copy link
Contributor Author

@aniketd aniketd left a comment

Choose a reason for hiding this comment

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

This makes reading better since it puts the noop upfront.

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.

Looks great! 💪

@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch 2 times, most recently from 7b87503 to 6efdee7 Compare September 16, 2025 15:20
@aniketd aniketd marked this pull request as ready for review September 16, 2025 15:22
@aniketd aniketd requested a review from a team as a code owner September 16, 2025 15:22
@aniketd aniketd requested review from Soupstraw and lehins September 16, 2025 15:22
@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch 2 times, most recently from bfbf41d to 33bfe8d Compare September 16, 2025 15:28
@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch from 33bfe8d to 1c49e7c Compare September 16, 2025 15:35
@aniketd aniketd enabled auto-merge September 16, 2025 16:22
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.

A little bit of duplication in order to get clearer and more readable code is very much worth it. So, please revert this whole updateDRepExpiriesAndDrainWithdrawals abstraction and just inline the functionality like you had it before

@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch from 1c49e7c to de85ba6 Compare September 17, 2025 12:02
@aniketd aniketd requested a review from lehins September 17, 2025 12:02
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

A few comments, mostly about CHANGELOG.
It's nice that we split into updateDormantDRepExpiries and updateVotingDRepExpiries - it helps with understanding what's going on in the rule!

@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch 2 times, most recently from 1962745 to b8e0d56 Compare September 17, 2025 17:08
@aniketd aniketd requested review from lehins and teodanciu September 17, 2025 17:10
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.

Looks great!
Thank you!

@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch from b8e0d56 to 42451bf Compare September 18, 2025 12:40
...from CERTS, protocol version 11 onwards.
...because LEDGER is a more suitable place for these operations.
They run just before the CERTS rule transition in LEDGER.

Also have two predicate failures in LEDGER instead of only one in CERTS,
to report the specific cases of missing accounts/wrong network vs.
incomplete withdrawal-amounts.

Update changelogs.

Bump versions for conway and core.
@aniketd aniketd force-pushed the aniketd/move-withdrawals-to-ledger-rule branch from 42451bf to da7a38f Compare September 18, 2025 16:19
@aniketd aniketd merged commit eb123e6 into master Sep 18, 2025
119 of 122 checks passed
@aniketd aniketd deleted the aniketd/move-withdrawals-to-ledger-rule branch September 18, 2025 18:30
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.

Add a new predicate failure for non-matching withdrawals

3 participants