Skip to content

fix: persist captured proof snapshot across restart#205

Merged
matthias-wright merged 4 commits into
audit-may-2026from
m/frozen-proof-root
Jun 10, 2026
Merged

fix: persist captured proof snapshot across restart#205
matthias-wright merged 4 commits into
audit-may-2026from
m/frozen-proof-root

Conversation

@matthias-wright

Copy link
Copy Markdown
Collaborator

Builds on #170.

This addresses #199.

Changes:

  • Adds a field captured_bytes to ConsensusState that contains a snapshot of the consensus state (with captured_bytes set to None). This snapshot is taken in capture_state_root(). This snapshot is used to derive the fields proof_tree, state_root, and proof_validator_keys. This ensures that the frozen state root is not lost by a validator restart, especially at the epoch boundary.
  • Adds a unit test to verify the behavior.

@sebastian-osec

sebastian-osec commented May 23, 2026

Copy link
Copy Markdown

Looks good to me.

One deployment note: this changes the serialized ConsensusState format by adding proof_el_block_number/captured_bytes trailers. If nodes restart from state encoded before this PR, decode requires a migration/backward-compatible read path

@matthias-wright matthias-wright merged commit 1626b32 into audit-may-2026 Jun 10, 2026
4 checks passed
@matthias-wright matthias-wright deleted the m/frozen-proof-root branch June 10, 2026 20: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.

2 participants