Skip to content

feat: on_execution_payload fork choice test support#8986

Closed
brech1 wants to merge 1 commit intosigp:unstablefrom
brech1:gloas-fork-choice-tests
Closed

feat: on_execution_payload fork choice test support#8986
brech1 wants to merge 1 commit intosigp:unstablefrom
brech1:gloas-fork-choice-tests

Conversation

@brech1
Copy link
Copy Markdown

@brech1 brech1 commented Mar 14, 2026

Proposed Changes

Add test harness support for the on_execution_payload fork choice step type and head_payload_status check.

  • Handle ExecutionPayloadEnvelope step in fork choice test runner
  • Insert genesis envelope for Gloas anchor blocks
  • Gate on_execution_payload handler to Gloas and later forks

Additional Info

Useful for:

Enable by removing:

// TODO(gloas): remove once we have Gloas optimistic sync tests
vec![ForkName::Gloas]

And CONSENSUS_SPECS_TEST_VERSION should be updated to v1.7.0-alpha.3:

CONSENSUS_SPECS_TEST_VERSION ?= v1.7.0-alpha.2

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 14, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Mar 14, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@brech1 brech1 force-pushed the gloas-fork-choice-tests branch from 672a1b5 to 286121f Compare March 14, 2026 19:18
@brech1
Copy link
Copy Markdown
Author

brech1 commented Mar 14, 2026

Let me know if this is useful, as it is right now it's just handlers code. I used this to check:

Otherwise, I can close and leave the committed changes on my fork for future implementers.

@eserilev
Copy link
Copy Markdown
Member

Awesome thanks @brech1 will take a deeper look on Monday

.to_string();
let spec = &testing_spec::<E>(fork_name);
let steps: Vec<Step<String, String, Vec<String>, String, String, String>> =
let steps: Vec<Step<String, String, Vec<String>, String, String, String, String>> =
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 think we need to add a #[allow(clippy::type_complexity)] to make clippy happy. You can check locally by running make lint-full

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is this preferred to type alias?

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.

a type alias is def the cleaner approach. but since its just for testing purposes im happy with either supressing the lint error or introducing a type alias.

Comment on lines +888 to +900
if valid {
self.harness
.chain
.store
.put_payload_envelope(&block_root, envelope)
.expect("should store envelope");

self.harness
.chain
.store
.put_state(&envelope_state_root, &state)
.expect("should store post-envelope state");
}
Copy link
Copy Markdown
Member

@eserilev eserilev Mar 16, 2026

Choose a reason for hiding this comment

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

envelope_processing::process_execution_payload_envelope will handle updating the store with the envelope and state (once fork choice is implemented). I think we can remove this code block

We might want to write an apply_invalid_envelope in the case of a non-valid payload (sort of how we do with apply_invalid_block)

Comment on lines +843 to +847
pub fn process_execution_payload_envelope(
&self,
envelope: SignedExecutionPayloadEnvelope<E>,
valid: bool,
) -> Result<(), Error> {
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.

since columns now get imported along with the envelope (instead of with the block) I think this should be renamed to process_execution_payload_envelope_and_columns and we should add optional columns as an argument

I suspect we'll have a Step::MaybeValidEnvelopeAndColumns eventually

@brech1
Copy link
Copy Markdown
Author

brech1 commented Mar 16, 2026

I appreciate the review @eserilev ! I think the best would be to apply these suggestions, then convert this to a draft and reopen and review once #8906 gets merged, so we can make sure all is working correctly. WDYT?

@eserilev
Copy link
Copy Markdown
Member

After chatting with the team we were thinking it might be best to cherry pick these changes into our fork choice implementation branch. That way we can make sure we're passing the ef tests before merging our fork choice changes.

Let me know if thats okay with you. You'd get co-author credits as part of #8906 once thats merged.

@brech1
Copy link
Copy Markdown
Author

brech1 commented Mar 17, 2026

@eserilev that's great! I'll go ahead and close this now then, no need for credits 👌

@brech1 brech1 closed this Mar 17, 2026
@brech1 brech1 deleted the gloas-fork-choice-tests branch April 24, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants