Skip to content

Handle ExecutionPayloadEnvelope#591

Open
hangleang wants to merge 10 commits intodevelopfrom
feature/payload-envelope
Open

Handle ExecutionPayloadEnvelope#591
hangleang wants to merge 10 commits intodevelopfrom
feature/payload-envelope

Conversation

@hangleang
Copy link
Copy Markdown
Collaborator

@hangleang hangleang commented Feb 4, 2026

This PR include changes as follows:

  • Locally build payload envelope by proposer if no active builders or set via option
  • Request engine_getBlobsV2 once envelope receive if data is not
    available
  • Reconstruct data column sidecars with payload envelope
  • Request payload envelopes from peers while syncing

please note that these changes is in alpha.1 version, will update according to alpha.2 in this separate PR #589

@hangleang hangleang force-pushed the feature/payload-envelope branch 3 times, most recently from 4fb8c1f to c948fd5 Compare February 6, 2026 12:56
@hangleang hangleang force-pushed the feature/payload-envelope branch from c948fd5 to 17eb854 Compare February 16, 2026 12:13
@Tumas
Copy link
Copy Markdown
Member

Tumas commented Mar 17, 2026

@hangleang please rebase this on develop

@hangleang hangleang force-pushed the feature/payload-envelope branch from 17eb854 to b0cf339 Compare March 17, 2026 16:24
@hangleang
Copy link
Copy Markdown
Collaborator Author

@hangleang please rebase this on develop

done!

@hangleang hangleang force-pushed the feature/payload-envelope branch 2 times, most recently from 28a1746 to f80a754 Compare March 19, 2026 11:41
@Tumas
Copy link
Copy Markdown
Member

Tumas commented Mar 20, 2026

Could you open a PR to eth2_libp2p:main with the minimal changes needed to support this functionality? That way we can update the eth2_libp2p when this branch lands on develop. These changes will be adjusted (if needed) once Gloas support stabilises upstream in Lighthouse.

@hangleang
Copy link
Copy Markdown
Collaborator Author

Could you open a PR to eth2_libp2p:main with the minimal changes needed to support this functionality?

created a PR grandinetech/eth2_libp2p#23, also include 2 Povilas commits which didn't merge on main

@Tumas
Copy link
Copy Markdown
Member

Tumas commented Mar 20, 2026

Could you open a PR to eth2_libp2p:main with the minimal changes needed to support this functionality?

created a PR grandinetech/eth2_libp2p#23, also include 2 Povilas commits which didn't merge on main

That's for payload attestations — we'll need those too, but they're out of scope for this PR. What we need here is a PR to eth2_libp2p that adds support for payload envelopes specifically.

@hangleang
Copy link
Copy Markdown
Collaborator Author

What we need here is a PR to eth2_libp2p that adds support for payload envelopes specifically.

here it is: grandinetech/eth2_libp2p#24

// unless they choose to self-build, as favor or no active builders
let mut payload_with_data = None;
if self.beacon_state.post_gloas().is_none_or(|state| {
self.options.enable_local_payload_building
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.

Note: It looks like that using --enable-local-payload-building flag not only enables but forces self-build. If this is the feature that we want, it should probably named --force-local-payload-building or --force-self-build

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We can figure out the naming later

- Locally build payload envelope by proposer
- Request `engine_getBlobsV2` once envelope receive if data is not
  available
- Reconstruct data column sidecars with payload envelope
- Request payload envelopes from peers while syncing
@hangleang hangleang force-pushed the feature/payload-envelope branch from c4f9fce to bc95350 Compare March 24, 2026 07:30
@hangleang hangleang force-pushed the feature/payload-envelope branch from b195693 to 332014f Compare March 24, 2026 10:06
// Note: Unlike blobs/columns which use serve_range checks, envelopes are needed
// for all Gloas slots (similar to blocks) for state transition
//TODO: confirm this from hangleang
if sync_mode.is_default() && config.phase_at_slot::<P>(start_slot) >= Phase::Gloas {
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.

It should adjust start_slot based on Gloas start slot and not skip the whole batch. Example: if start_slot is gloas_start_slot - 1, it should back sync ExecutionPayloadEnvelopes from gloas_start_slot. Otherwise, it skips the whole batch potentially not back syncing payload envelopes from some of the first slots in Gloas.

Similar start_slot adjustment is performed in lines 381–387 for blobs.

// Request execution payload envelopes for Gloas-activated slots
// Note: Similar to blocks, envelopes are needed for all Gloas slots (not just serve range)
// This must be checked before serve range checks to ensure envelopes are always requested
if config.phase_at_slot::<P>(start_slot) >= Phase::Gloas {
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.

similar issue here: batch should not be skipped if start_slot < Phase::Gloas, it should only be skipped if start_slot + count < Phase::Gloas, otherwise start_slot and count should be adjusted

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

both issues should be fixed at 8f47176

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