Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving requests out of execution_payload into beacon_block.body #3875

Merged
merged 25 commits into from
Sep 12, 2024

Conversation

lucassaldanha
Copy link
Contributor

@lucassaldanha lucassaldanha commented Aug 9, 2024

Original description from #3856

Up until Electra, the CL clients would not save the full execution payload as this is not needed on the beacon state transition function. However, Electra includes new fields like withdrawal requests, deposit requests and consolidation requests that the consensus client requires in order to perform the state transition function. With the current design the consensus client would need to either: save locally the requests; or requests the payload from the EL for each time they want to execute a state transition.

The original proposal for a ExecutionPayloadEnvelope has been surpassed by moving the requests out of the Execution Payload into a new container ExecutionClientRequests, a new field in the BeaconBlockBody. This approach has a simpler design and maintains the gindex of the Execution Payload stable.

Changes

  • Added one new containers: ValidatorRequests
  • Updated BeaconBlockBody with requests: ValidatorRequests
  • Updated all 3 request processing functions to get the requests from block.body.requests

TODO

  • Review if not missing anything
  • Fix all tests that need updates
  • Confirm we are good on process_withdrawals

Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

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

You need to remove the requests from the payload as well

@lucassaldanha lucassaldanha marked this pull request as draft August 12, 2024 02:58
@lucassaldanha lucassaldanha changed the title Introducing ExecutionPayloadEnvelope Moving requests out of execution_payload into beacon_block.body Aug 13, 2024
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
tests/core/pyspec/eth2spec/test/helpers/block.py Outdated Show resolved Hide resolved
@lucassaldanha lucassaldanha marked this pull request as ready for review August 13, 2024 22:31
Copy link
Collaborator

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
specs/electra/beacon-chain.md Outdated Show resolved Hide resolved
Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

this is a reasonable change!

and I agree w/ the line of thinking that got us here around pruning payloads

left two questions that I think block merge (unless im missing something)

specs/electra/fork.md Show resolved Hide resolved
specs/electra/beacon-chain.md Show resolved Hide resolved
Copy link
Contributor

@ensi321 ensi321 left a comment

Choose a reason for hiding this comment

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

One minor comment

specs/electra/beacon-chain.md Show resolved Hide resolved
Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

lgtm!

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.

6 participants