Skip to content

Test RANDAO checks for execution payload bids on the head's parent - #5645

Merged
jtraglia merged 3 commits into
ethereum:masterfrom
jimmygchen:test-gossip-bid-parent-randao
Sep 21, 2026
Merged

jtraglia merged 3 commits into
ethereum:masterfrom
jimmygchen:test-gossip-bid-parent-randao

Conversation

@jimmygchen

@jimmygchen jimmygchen commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Adds a gossip validation test for an execution payload bid that builds on the parent of the head beacon block. The head and parent states have different RANDAO mixes. The test checks that a bid with prev_randao from the state identified by parent_block_root is accepted, and fails if validation uses the head state's mix.

Related Lighthouse fix: sigp/lighthouse#10061

@jimmygchen
jimmygchen marked this pull request as ready for review September 17, 2026 05:52
@jimmygchen jimmygchen changed the title Test gossip bids on the head's parent Test RANDAO validation for execution payload bids on the head's parent Sep 17, 2026
@jimmygchen jimmygchen changed the title Test RANDAO validation for execution payload bids on the head's parent Test RANDAO checks for execution payload bids on the head's parent Sep 17, 2026

@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.

LGTM. I'm always a little worried that the test makes some change that are not represented in the test inputs. There are a few lines like blocks_meta[-2]["payload"] = get_filename(parent_payload) which look a bit sketchy but I'll trust that it's fine 😅 I'm going to merge this and cross my fingers that it's a proper test.

@jtraglia
jtraglia merged commit b23fecc into ethereum:master Sep 21, 2026
19 checks passed
mergify Bot pushed a commit to sigp/lighthouse that referenced this pull request Sep 23, 2026
…#10061)

## Issue Addressed

Valid payload bids can be dropped with `EpochOutOfBounds` when the cached head is from the previous epoch. Bids on the head's parent can also be rejected with `InvalidPrevRandao` because validation uses the head's RANDAO mix.

## Proposed Changes

Validate `prev_randao` against the bid's beacon parent using the existing `head_random` and `parent_random` helpers. Add a regression for a head in the previous epoch. Head-parent RANDAO spec coverage is tracked in [consensus-specs#5645](ethereum/consensus-specs#5645).

## Additional Info

The [Gloas gossip rule](https://github.com/ethereum/consensus-specs/blob/a8475719ce77cb269191e327e1f4175c295851ee/specs/gloas/p2p-interface.md#execution_payload_bid) uses the parent post-state's current epoch. Related to #9924.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants