Skip to content

Fix and re-instate Babbage simpleRewards test#2058

Open
Lucsanszky wants to merge 2 commits intomasterfrom
ldan/simpleRewards-fix
Open

Fix and re-instate Babbage simpleRewards test#2058
Lucsanszky wants to merge 2 commits intomasterfrom
ldan/simpleRewards-fix

Conversation

@Lucsanszky
Copy link
Copy Markdown

@Lucsanszky Lucsanszky commented Jan 22, 2026

Description

This is the conclusion of the following investigation: IntersectMBO/cardano-ledger#5477
allPoolStakeCert needed some adjustments after the UMap purge in cardano-ledger and had to make sure that we don't re-register already registered staking credentials. Also, because validations were turned off apparently, FailedToValidateSlot was not triggered but rather we ended up in an invalid state (the associated delegations were dropped in the account state), thus resulting in a test failure. With validation, attempting to re-register already registered staking credentials would trigger the StakeKeyAlreadyRegisteredDELEG predicate failure as per the DELEG rule.

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.17.0.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

Migrations

  • The pr causes a breaking change of type a,b or c
  • If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
  • Resyncing and running the migrations provided will result in the same database semantically

If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.

@Lucsanszky
Copy link
Copy Markdown
Author

It seems like I broke some tests re: reward registrations. Once I get back from my vacation, I'll fix them but if someone would like to takeover in the meantime and finish this, then feel free to do so.

@kderme
Copy link
Copy Markdown
Contributor

kderme commented Jan 29, 2026

Thank you for looking into this! I'll take a look

`allPoolStakeCert` needed some adjustments after the `UMap` purge in
`cardano-ledger` and had to make sure that we don't re-register already registered staking credentials.
Also, because validations were turned off apparently, `FailedToValidateSlot` was not triggered
but rather we ended up in an invalid state (the associated delegations were dropped in the account state),
thus resulting in a test failure.
With validation, attempting to re-register already registered staking credentials would trigger the
`StakeKeyAlreadyRegisteredDELEG` predicate failure as per the `DELEG` rule.
@Lucsanszky Lucsanszky force-pushed the ldan/simpleRewards-fix branch from cc11155 to 902241b Compare February 12, 2026 22:12
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.

2 participants