Skip to content

Conversation

@mehdi-aouadi
Copy link
Contributor

@mehdi-aouadi mehdi-aouadi commented Nov 24, 2025

PR Description

Add Gloas execution_payload gossip rules

Fixed Issue(s)

#10146

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Implements Gloas execution payload gossip validation (including signature, slot, bid consistency, and deduping), wires it into the controller, and adds supporting APIs, constants, and tests.

  • Gossip/Validation:
    • Implement ExecutionPayloadGossipValidator with pre-block checks, block-based bid consistency (builder_index, payload.block_hash), state-based signature verification, deduping via recent cache, and SAVE_FOR_FUTURE handling.
    • Use RECENT_SEEN_EXECUTION_PAYLOADS_CACHE_SIZE for seen-payload caches; remove local constant.
    • Wire validator in BeaconChainController and integrate with DefaultExecutionPayloadManager.
  • Spec/API:
    • Add computeSigningRoot(ExecutionPayloadEnvelope, domain) in Spec.
    • Extend GossipValidationHelper with isBeforeFinalizedSlot, retrieveBlockByRoot, getStateAtSlotAndBlockRoot, and isSignatureValidWithRespectToBuilderIndex.
  • Test Utilities:
    • Enhance DataStructureUtil to generate targeted ExecutionPayloadBid/SignedExecutionPayloadBid and related helpers.
  • Constants:
    • Add RECENT_SEEN_EXECUTION_PAYLOADS_CACHE_SIZE in Constants.
  • Tests:
    • Add ExecutionPayloadGossipValidatorTest covering accept, ignore, save-for-future, and reject paths.

Written by Cursor Bugbot for commit 5ee0d37. This will update automatically on new commits. Configure here.

@mehdi-aouadi mehdi-aouadi self-assigned this Nov 26, 2025
@mehdi-aouadi mehdi-aouadi requested a review from zilm13 November 27, 2025 18:34
@mehdi-aouadi mehdi-aouadi marked this pull request as draft November 28, 2025 12:22
@mehdi-aouadi mehdi-aouadi marked this pull request as ready for review November 28, 2025 12:22
@mehdi-aouadi mehdi-aouadi marked this pull request as draft December 4, 2025 17:30
@mehdi-aouadi mehdi-aouadi marked this pull request as ready for review December 5, 2025 11:07
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM, just few nits


if (maybeExecutionPayloadBid.isEmpty()) {
LOG.trace(
"Missing execution payload bid in block with root {}. Rejection the execution payload envelope",
Copy link
Contributor

Choose a reason for hiding this comment

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

Rejecting here and in next logs

return slot.isLessThanOrEqualTo(finalizedSlot);
}

public boolean isBeforeFinalizedSlot(final UInt64 slot) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to have test on this one to highlight the difference between isSlotFinalized and this one

}

@TestTemplate
void shouldSkipSeenPayload() {
Copy link
Contributor

Choose a reason for hiding this comment

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

you already have shouldIgnoreIfAlreadySeen test, is this one needed?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants