Skip to content

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented Oct 22, 2025

PR Description

Simple implementation (more of a skeleton) for fork_choice#on_execution_payload. Also created a new ForkChoicePayloadExecutorGloas which is catered for Gloas.

Fixed Issue(s)

related to #9878

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

Adds fork choice handling for Gloas execution payload envelopes, updates executor API to use Optional header, and introduces debug/P2P logging plus related helpers and tests.

  • Fork Choice:
    • Implement onExecutionPayload for Gloas: retrieves state via SlotAndBlockRoot, validates/processes envelope, runs EL via ForkChoicePayloadExecutorGloas, (NOOP) DA check, applies to store via ForkChoiceUtil.applyExecutionPayloadToStore, and returns detailed ExecutionPayloadImportResult.
    • Add result mapping and invalid payload reporting (reportInvalidExecutionPayload).
  • Executor:
    • New ForkChoicePayloadExecutorGloas to execute engine_newPayload for envelopes; tests added.
    • Change OptimisticExecutionPayloadExecutor#optimisticallyExecute to accept Optional<ExecutionPayloadHeader>; update Bellatrix processor and ForkChoicePayloadExecutor + tests.
  • Results/Types:
    • Expand ExecutionPayloadImportResult with new failure reasons and factory methods.
    • SignedExecutionPayloadEnvelope adds getSlot() and getSlotAndBlockRoot().
  • Fork Choice Utils (Gloas):
    • Introduce applyExecutionPayloadToStore hook (no-op for now) and Gloas-specific util wiring.
  • Debug/Logging:
    • DebugDataDumper and DebugDataFileDumper support saving invalid execution payloads (new invalid_execution_payloads dir) and refine data column sidecar saving.
    • P2PLogger adds onInvalidExecutionPayload.
  • Docs/Javadoc:
    • Update references to new Optional executor API in AvailabilityChecker.

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

}

public void applyExecutionPayloadToStore(
final MutableStore store,

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'store' is never used.

public void applyExecutionPayloadToStore(
final MutableStore store,
final SignedExecutionPayloadEnvelope signedEnvelope,

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'signedEnvelope' is never used.
public void applyExecutionPayloadToStore(
final MutableStore store,
final SignedExecutionPayloadEnvelope signedEnvelope,
final BeaconState postState) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'postState' is never used.
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.

1 participant