Skip to content

Conversation

@Lucsanszky
Copy link

@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 Lucsanszky requested a review from a team as a code owner January 22, 2026 02:27
@Lucsanszky Lucsanszky requested a review from kderme January 22, 2026 02:28
`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
Copy link
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
Contributor

kderme commented Jan 29, 2026

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

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