Reject bids with invalid prev_randao during gossip validation - #5360
Merged
Conversation
`prev_randao` is deterministic for `parent_block_root`, and the state transition function only allows bids with the correct `prev_randao`. However, gossip rules ignore `prev_randao` and conflate them into a pool keyed by `(bid.slot, bid.parent_block_hash, bid.parent_block_root)`. So, someone who just sends a large bid with wrong `prev_randao` will force smaller bids with correct `prev_randao` to be ignored by spec, while also not allowing inclusion of their bid, i.e., it's unchargeable. Add reject rule to filter incorrect `prev_randao`, the value is known because the rules already require `bid.parent_block_root` to be known in fork choice. Also sync the other missing beacon-chain.md rules to validator.md.
prev_randao during gossip validation
jtraglia
reviewed
Jun 12, 2026
jtraglia
reviewed
Jun 12, 2026
jtraglia
reviewed
Jun 12, 2026
jtraglia
left a comment
Member
There was a problem hiding this comment.
This is a good check to have. Nice catch.
etan-status
added a commit
to status-im/nimbus-eth2
that referenced
this pull request
Jun 16, 2026
When someone sends us a bid with invalid prev_randao but high value, it kicks out the legitimate bid. The invalid one is also non-punishable as it fails subsequent state transition by peers. Add an extra reject rule to filter out invalid prev_randao, there is only a single valid value for each parent block root, and we have efficient functionality in the blockchain_dag to obtain correct RANDAO without expensive state replays. Also proposed for spec inclusion, but we'll need the rule regardless: - ethereum/consensus-specs#5360 Have moved this check to the end, because if the correct value has not yet been cached (i.e., no valid bid received), we may have to load the block from disk (once).
potuz
approved these changes
Jun 17, 2026
tersec
pushed a commit
to status-im/nimbus-eth2
that referenced
this pull request
Jun 18, 2026
* Reject bids with invalid prev_randao during gossip validation When someone sends us a bid with invalid prev_randao but high value, it kicks out the legitimate bid. The invalid one is also non-punishable as it fails subsequent state transition by peers. Add an extra reject rule to filter out invalid prev_randao, there is only a single valid value for each parent block root, and we have efficient functionality in the blockchain_dag to obtain correct RANDAO without expensive state replays. Also proposed for spec inclusion, but we'll need the rule regardless: - ethereum/consensus-specs#5360 Have moved this check to the end, because if the correct value has not yet been cached (i.e., no valid bid received), we may have to load the block from disk (once). * Apply suggestion from @tersec
nflaig
added a commit
to ChainSafe/lodestar
that referenced
this pull request
Jun 22, 2026
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.
prev_randaois deterministic forparent_block_root, and the state transition function only allows bids with the correctprev_randao. However, gossip rules ignoreprev_randaoand conflate them into a pool keyed by(bid.slot, bid.parent_block_hash, bid.parent_block_root). So, someone who just sends a large bid with wrongprev_randaowill force smaller bids with correctprev_randaoto be ignored by spec, while also not allowing inclusion of their bid, i.e., it's unchargeable.Add reject rule to filter incorrect
prev_randao, the value is known because the rules already requirebid.parent_block_rootto be known in fork choice.Also sync the other missing beacon-chain.md rules to validator.md.