Skip to content

fix: persist captured proof snapshot across restart#205

Open
matthias-wright wants to merge 6 commits into
audit-may-2026from
m/frozen-proof-root
Open

fix: persist captured proof snapshot across restart#205
matthias-wright wants to merge 6 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
Copy link
Copy Markdown

sebastian-osec commented May 23, 2026

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

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