Skip to content

Add executable gossip validation functions for gloas#5294

Open
jtraglia wants to merge 30 commits into
ethereum:masterfrom
jtraglia:executable-networking-specs-gloas
Open

Add executable gossip validation functions for gloas#5294
jtraglia wants to merge 30 commits into
ethereum:masterfrom
jtraglia:executable-networking-specs-gloas

Conversation

def validate_execution_payload_bid_gossip(
seen: Seen,
store: Store,
state: BeaconState,

@nflaig nflaig May 26, 2026

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.

what's the state here? eg. for bid validation we need to use the state of the parent block advanced to the bid slot via process_slots to make sure is_active_builder / can_builder_cover_bid are properly evaluated

This comment was marked as spam.

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.

The correct state is process_slots(head_state, bid.slot)

using the head state is not correct, the state needs to be the post-state of the parent block advanced to the bid slot

This comment was marked as spam.

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.

We use the head state and mark it in the comment above like this. But it seems we missed this remark in some p2p functions since Deneb. cc @jtraglia

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.

Okay how about this? d0f6706

@eserilev eserilev Jun 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR ensures that we no longer just use the head state to verify bids
sigp/lighthouse#9337

We shouldn't use the head state by default, its definitely wrong. But I believe it's only a real issue in a non-finalized forky network

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR above also ensures we advance the state to the correct slot before making any checks

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 PR ensures that we no longer just use the head state to verify bids
sigp/lighthouse#9337

do you? maybe I am misreading this

image

@eserilev eserilev Jun 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh my bad that PR I linked was for preferences not bids, i got the two mixed up. we'll need to fix bids as well

Comment thread specs/gloas/p2p-interface.md Outdated
Comment on lines +788 to +789
parent_state = store.block_states[bid.parent_block_root]
dependent_root = get_proposer_dependent_root(parent_state, proposal_epoch)

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.

Suggested change
parent_state = store.block_states[bid.parent_block_root]
dependent_root = get_proposer_dependent_root(parent_state, proposal_epoch)
dependent_root = get_dependent_root(store, bid.parent_block_root)

Can we remove get_proposer_dependent_root and use get_dependent_root instead like this? Related to #5196 and #5306. cc @nflaig

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.

I haven't followed up on that other PR but it should be equivalent

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.

I'd suggest using get_dependent_root() then. The other PR introduces it for PB conditions check and I think we can use it here, too.

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

Labels

fulu gloas testing CI, actions, tests, testing infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants