Skip to content

Gloas gossip handlers - #9924

Open
pawanjay176 wants to merge 32 commits into
sigp:unstablefrom
pawanjay176:gloas-gossip-handlers
Open

pawanjay176 wants to merge 32 commits into
sigp:unstablefrom
pawanjay176:gloas-gossip-handlers

Conversation

@pawanjay176

Copy link
Copy Markdown
Member

Issue Addressed

N/A

Proposed Changes

Enable all gloas gossip test handlers. Have intentionally skipped quite a few test vectors where the tests expects us to store invalid blocks or construct a history of invalid blocks.

Must re-enable gas limit tests after #9905
Must re-enable partial data column tests in #9325

Note to reviewer: better to review commit wise.
Used codex assistance for the harness building.

@pawanjay176
pawanjay176 requested a review from jxs as a code owner August 26, 2026 19:59
@pawanjay176 pawanjay176 added test improvement Improve tests ready-for-review The code is ready for review gloas labels Aug 26, 2026
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Some required checks have failed. Could you please take a look @pawanjay176? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Aug 26, 2026
@mergify mergify Bot added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Aug 26, 2026
}

let cached_head = ctx.canonical_head.cached_head();
let current_slot = ctx

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not completely sure of this. I'd reckon some of the parent gas limit changes would affect this too, so happy to modify this once that's merged

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.

just a note for myself later, but it seems the spec has moved to head-compatible bid validation only, so the bid parent state will always be either the head or its parent.

@michaelsproul
michaelsproul self-requested a review August 26, 2026 23:11
@pawanjay176
pawanjay176 marked this pull request as draft August 26, 2026 23:42
"failed to mark setup payload for block {block_root:?} as received: {e:?}"
))
})?;
Ok(())

@NikhilSharmaWe NikhilSharmaWe Sep 12, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the gas-limit ignores may be covering a harness gap.

GossipVerifiedPayloadBid::new reads parent gas from observed_execution_payloads, but import_setup_payload_for_bid never seeds that cache (only store + fork choice). Bids then hit ParentExecutionPayloadUnknown before the gas-limit check.

The ignore comment still says we use the head state's bid gas limit, which isn't true anymore. Worth seeding the cache here (or reusing the normal import path)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah fixed this I think. The re-enabled tests work now.

"gossip_execution_payload_envelope__ignore_pre_finalized",
];
const IGNORED_EXECUTION_PAYLOAD_BID_CASES: &[&str] = &[
// Advancing the parent state across an epoch for every gossip bid would put epoch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm torn on this one.
To re-enable this test, we need to run epoch processing in gossip which kinda seems unnecessary.
We would still accept the bid if it gets accepted in the block, but ignore it over gossip.

Doing epoch processing in gossip during bad network conditions might be a lot of work, so I have opted for disabling the test and not running epoch processing, but open to change my mind on this.

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.

maybe we could run the tests and assert that we ignore (with no peer penalty?) rather than accept?

I agree that state advance inside bid validation seems pretty sketchy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That would require adding a bit of machinery in the harness to special case this test which kinda seems weird. Our current behaviour is ignore + no penalty. If we start doing this for other tests, then the harness would get gnarly soon imo.

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.

@pawanjay176 pawanjay176 added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 15, 2026
mergify Bot pushed a commit 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.
@mergify

mergify Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @pawanjay176? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 23, 2026
@jimmygchen

Copy link
Copy Markdown
Member

Merged unstable and resolved the conflict, keeping the RANDAO fix from #10061. Also opened pawanjay176/lighthouse#13 against your branch to fix the mock-engine panic in the bid gossip spec tests.

@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 25, 2026
jimmygchen and others added 2 commits September 25, 2026 23:39
* Fix mock engine panic in bid gossip spec tests

* Limit mock fork-choice responses to setup payloads
@mergify

mergify Bot commented Sep 28, 2026

Copy link
Copy Markdown

Some required checks have failed. Could you please take a look @pawanjay176? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 28, 2026
@pawanjay176

Copy link
Copy Markdown
Member Author

This is ready for a re-review. I'm not super particular about getting this for 8.3.0 RC, but the main prod changes are

  1. fix the gossip slot disparity for multiple topics (I think these tests are unnecessary tbh, but might as well pass them)
  2. the block_verification changes that checks that the bid is built on top of parent's full/empty head.

Rest are just test changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas test improvement Improve tests waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants