feat: block gossip validation for parent payload (consensus-specs#4923)#11
Open
lodekeeper wants to merge 2 commits intounstablefrom
Open
feat: block gossip validation for parent payload (consensus-specs#4923)#11lodekeeper wants to merge 2 commits intounstablefrom
lodekeeper wants to merge 2 commits intounstablefrom
Conversation
- IGNORE block if parent execution payload has not been seen - Add PARENT_PAYLOAD_UNKNOWN block error code - Add hasExecutionPayload() method to fork-choice and proto-array - Linear scan for now (TODO: secondary index for O(1) lookups)
nflaig
reviewed
Mar 15, 2026
| * Looks through all nodes with FULL variant status for a matching executionPayloadBlockHash. | ||
| * Used for Gloas gossip validation: parent execution payload must have been seen. | ||
| * | ||
| * TODO GLOAS: Add secondary index (Set<RootHex> by executionPayloadBlockHash) for O(1) lookups. |
There was a problem hiding this comment.
can you check ChainSafe@e275112 it has some optimization for this
Owner
Author
There was a problem hiding this comment.
Add Set<RootHex> secondary index for executionPayloadBlockHash lookups. Maintained in onBlock() (pre-Gloas) and onExecutionPayload() (Gloas), pruned in maybePrune(). Replaces O(n) linear scan. Reference: ChainSafe/lodestar@e275112 Co-authored-by: lodekeeper <258435968+lodekeeper@users.noreply.github.com> AI-assisted: yes
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Implement gossip validation for parent execution payload per ethereum/consensus-specs#4923.
Changes
bid.parent_block_hash) has not been seenPARENT_PAYLOAD_UNKNOWNblock error codehasExecutionPayload()method to fork-choice and proto-arraySplit from alpha.3 upgrade PR #6.