Skip to content

Reject bids with invalid prev_randao during gossip validation - #5360

Merged
jtraglia merged 4 commits into
ethereum:masterfrom
etan-status:dev/etan/gf-prevrandao
Jun 17, 2026
Merged

Reject bids with invalid prev_randao during gossip validation#5360
jtraglia merged 4 commits into
ethereum:masterfrom
etan-status:dev/etan/gf-prevrandao

Conversation

@etan-status

Copy link
Copy Markdown
Contributor

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` 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.
@github-actions github-actions Bot added the gloas label Jun 12, 2026
@jtraglia jtraglia changed the title Reject bids with invalid prev_randao during gossip validation Reject bids with invalid prev_randao during gossip validation Jun 12, 2026
Comment thread specs/gloas/p2p-interface.md Outdated
Comment thread specs/gloas/validator.md

@jtraglia jtraglia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good check to have. Nice catch.

etan-status

This comment was marked as duplicate.

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).
@jtraglia
jtraglia merged commit 3d1b63f into ethereum:master Jun 17, 2026
18 of 20 checks passed
@etan-status
etan-status deleted the dev/etan/gf-prevrandao branch June 17, 2026 21:30
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants