Skip to content

fix(fork-choice): align proposer reorg helper with consensus spec - #9444

Open
VanshSahay wants to merge 5 commits into
sigp:unstablefrom
VanshSahay:fix/proposer-reorg-spec-alignment
Open

fix(fork-choice): align proposer reorg helper with consensus spec#9444
VanshSahay wants to merge 5 commits into
sigp:unstablefrom
VanshSahay:fix/proposer-reorg-spec-alignment

Conversation

@VanshSahay

Copy link
Copy Markdown
Contributor

Fixes two divergences between Lighthouse's get_proposer_head_info and the consensus spec:

  1. Finalization age check now uses store.finalized_checkpoint.epoch instead of head_node.unrealized_finalized_checkpoint().epoch. The store's checkpoint is the ratified value; the head's unrealized checkpoint is optimistic and unreliable when considering a reorg.

  2. FFG competitiveness no longer requires unrealized_finalized_checkpoint to match between parent and head — only unrealized_justified_checkpoint. This matches the spec's is_ffg_competitive which only compares justifications. Finalization follows from justification, so blocking on finalized checkpoints gives up useful reorgs for no safety gain.

  3. Removed the now-unused DoNotReOrg::MissingHeadFinalizedCheckpoint variant.

  4. Added two unit tests covering the divergence scenarios described in the issue:

    • store_checkpoint_used_for_finalization_age: stale store finality blocks reorg even when head's unrealized finality is fresh
    • ffg_competitiveness_only_checks_justification: matching justifications allow reorg despite differing finalized checkpoints

Closes #9359

@VanshSahay
VanshSahay force-pushed the fix/proposer-reorg-spec-alignment branch from d771d8a to 8ba9a6f Compare June 10, 2026 09:29
@michaelsproul michaelsproul added backlog PR is not currently prioritized fork-choice labels Jun 13, 2026
@michaelsproul

Copy link
Copy Markdown
Member

We're currently heavily reworking the reorg feature for Gloas:

Once the dust settles we'll ping you to fix merge conflicts, and then we'll review.

@VanshSahay

Copy link
Copy Markdown
Contributor Author

@michaelsproul quick check, any changes to be made here?

@VanshSahay

Copy link
Copy Markdown
Contributor Author

bumping this up @michaelsproul

@michaelsproul

Copy link
Copy Markdown
Member

No bandwidth to review this at the moment sadly. Will revisit down the track.

As stated on the OG issue this is low prio (has no practical relevance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backlog PR is not currently prioritized fork-choice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants