Skip to content

fix: persist cleaned epoch transition state before ack#270

Open
matthias-wright wants to merge 3 commits into
audit-may-2026from
m/epoch-transition
Open

fix: persist cleaned epoch transition state before ack#270
matthias-wright wants to merge 3 commits into
audit-may-2026from
m/epoch-transition

Conversation

@matthias-wright

@matthias-wright matthias-wright commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Addresses: #246 and #325

Changes

  • Move finalized-block ack after epoch-boundary state persistence.
  • Clear added_validators / removed_validators before storing next-epoch consensus state.
  • Add a restart regression test that verifies persisted transition deltas are cleared and the active validator set is correct after reload.

Note: once this and #382 are on the same base, we should add a finalizer test that injects a commit failure at an epoch boundary and asserts the syncer ack is withheld (the Exact waiter resolves Err/canceled) and the node shuts down without durably advancing the epoch.

@sebastian-osec

Copy link
Copy Markdown

This fixes the main #246 persistence issue: transition deltas are cleared before the next-epoch consensus state is stored and committed. One follow-up concern: the finalized-block ack now happens after the oracle/orchestrator epoch-transition reports as well as after DB commit. Is that intended? If oracle/orchestrator reporting can block, this moves external backpressure onto the finalized-block ack path even after durable persistence has succeeded.

@matthias-wright

Copy link
Copy Markdown
Collaborator Author

Update(7077fd6):

  • Send finalized block ack before the oracle/orchestrator reports.

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