Skip to content

Conversation

@sandtreader
Copy link
Collaborator

@sandtreader sandtreader commented Dec 17, 2025

Description

Fixes SPDD differences in epoch 216,217 and through to 220.

Problem was that when an SPO retires its deposit refund needs to be paid to the reward account as it was most recently updated. However for rewards the reward account is captured from the state at the end of the previous epoch, before the previous epoch's pool updates are applied.

We therefore capture the reward account to pay to from the SPOState's live state, and pass it in the retired_pools part of the SPOState message so that AccountsState can use it to pay the refund.

The result of this is SPDD is good at least until 220, when there is a monetary divergence (rewards vs treasury).

Related Issue(s)

Fixes #493

How was this tested?

Run standard Omnibus and observe rewards and SPDD verifier logs:

2025-12-17T17:25:49.246804Z  INFO acropolis_module_accounts_state::verifier: Rewards verification OK epoch=220
2025-12-17T17:25:49.251289Z  INFO acropolis_module_accounts_state::verifier: Verification of SPDD, end of epoch 221: OK, total active stake 16743231852830277

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

No side effects other than other things that depend on SPDD will now work further into Shelley.

Reviewer notes / Areas to focus

Should update reward addresses so retirements that happen on the
next epoch boundary target the right one
Allows AccountState to pay to the correct reward account even though the
pool update won't take effect until after the refunds are paid and snapshot
taken.

Reverts previous commit - passing updates through immediately breaks
existing rewards which use previous registration

Fixes #493 - SPDD check now OK until epoch 220
@sandtreader sandtreader requested review from alexwoods and shd December 17, 2025 17:27
@sandtreader sandtreader changed the title Prc/spdd 216 fix Fix SPDD for epoch 216/217 Dec 17, 2025
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 a8d48d4 into main Dec 18, 2025
2 checks passed
@sandtreader sandtreader deleted the prc/spdd-216-fix branch December 18, 2025 09:45
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.

SPDD differences in epoch 216/217

3 participants