Skip to content

Introduce an ExecutionPayloadEnvelope to abstract away the fields needed in the EL but not the CL #3856

@potuz

Description

@potuz

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

I propose to move the BeaconBlockBody to have the following structure on the CL

class BeaconBlockBody(Container):
    randao_reveal:    BLSSignature
    ...
    execution_payload_envelope     ExecutionPayloadEnvelope
    ...
   

class ExecutionPayloadEnvelope(Container)
    deposit_requests: List[DepositRequest, MAX_DEPOSIT_REQUESTS_PER_PAYLOAD]  # [New in Electra:EIP6110]
    withdrawal_requests: List[WithdrawalRequest, MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD]
    consolidation_requests: List[ConsolidationRequest, MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD]
    execution_payload:    ExecutionPayload
    
class ExecutionPayload(Container):
    parent_hash:  Hash32
    ...

This way the CL can simply replace execution_payload by it's hash tree root and keep in DB a binded_execution_payload_envelope instead of the full envelope and still be able to perform the state transition function.

The exchange with the EL over the Engine API would also reflect this structure. The EL would need to take the requests from the envelope, add them to the ExecutionPayload object in order to compute the block hash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions