Skip to content

Conversation

@sandtreader
Copy link
Collaborator

@sandtreader sandtreader commented Dec 11, 2025

Description

Fixes the rewards in epoch 214 (paid in 216) by clearing the delegation of a stake address if it deregisters. We were previously keeping it so it would be restored on re-registration, but this threw out the total active_stake and hence the pool performance calculations by a tiny amount, leading to the 1-LL differences in rewards.

Related Issue(s)

Fixes #414

How was this tested?

Ran Omnibus to epoch 217 - rewards verify for epoch 214

Checklist

  • My code builds and passes local tests
  • I added/updated tests for my changes, where applicable
  • I updated documentation (if applicable)
  • CI is green for this PR

Impact / Side effects

Rewards now correct for epoch 216. SPDD will also slightly change which might improve VRF success, but there is still
a difference between Haskell's & our snapshot SPDD and the SPDD we publish.

Reviewer notes / Areas to focus

Won't take long ;-)

@sandtreader sandtreader added this to the Data Node (Conway+) milestone Dec 11, 2025
@sandtreader sandtreader requested a review from shd December 11, 2025 14:57
@sandtreader
Copy link
Collaborator Author

Added additional test vectors for epochs 215-218. 215,216 work fine. 217 appears to fail but actually they are 0 reward amounts that should have been suppressed. 218 fails in a similar way to this one - see #475

@sandtreader
Copy link
Collaborator Author

Fixed 0 rewards in 217 too

if let Some(sas) = self.get_mut(stake_address) {
if sas.registered {
sas.registered = false;
sas.delegated_spo = None;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wow 👍🏼

Copy link
Collaborator

@shd shd left a comment

Choose a reason for hiding this comment

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

LGTM

@sandtreader sandtreader merged commit 8f6451b into main Dec 15, 2025
2 checks passed
@sandtreader sandtreader deleted the prc/rewards-fix-414 branch December 15, 2025 10:24
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.

Tiny overpay of rewards in epoch 214

5 participants