Redesign fork choice abstractions - #10901
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Spec: ethereum/consensus-specs#5249
Fixed Issue(s)
Closes #10754
Closes #10773
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog
Note
High Risk
Changes core fork-choice ancestry, proposer-boost weighting, and Gloas late-reorg paths; incorrect payload-status handling could affect head selection and reorg safety.
Overview
Aligns fork-choice helpers with the Gloas/EIP-7732 spec by making ancestry walks payload-status-aware instead of defaulting every ancestor to a PENDING
ForkChoiceNode.getAncestorNodenow takes a startingForkChoiceNode(not just a block root) and is implemented onForkChoiceStrategyby walking protoarray from that node identity. Call sites such as dependent-root resolution inForkChoicepass the full node so parent-variant selection is preserved.Adds
isAncestoronForkChoiceUtil(phase0: root match viagetAncestorNode) with a Gloas override that also requires matching payload status (PENDING ancestors act as a wildcard). Gloas proposer-boost / attestation-weight logic usesisAncestorinstead of ad-hoc ancestor-node comparisons.Renames
isShufflingStabletoisNotEpochBoundaryto mirror spec naming. RenamesresolveVoteNodetogetSupportedNodeonForkChoiceModel(protoarray score deltas).specrefs drop several fork-choice items from the “not implemented” list and point
is_ancestor,get_supported_node,is_epoch_boundary, and Gloasget_ancestorat the new Java implementations.Reviewed by Cursor Bugbot for commit 461ef5a. Bugbot is set up for automated code reviews on this repo. Configure here.