Skip to content

Engine API: proposal to add engine_getBlockBodies method #137

@mkalinin

Description

@mkalinin

Specification

Structures

BlockBodyV1

  • transactions: Array of DATA - Array of transaction objects, each object is a byte list (DATA) representing TransactionType || TransactionPayload or LegacyTransaction as defined in EIP-2718

Core

engine_getBlockBodiesV1

Request

  • method: engine_getBlockBodiesV1
  • params:
    1. Array of DATA, 32 Bytes - Array of block hashes.

Response

  • result: Array of BlockBody - Array of BlockBody objects.
  • error: code and message set in case an exception happens while processing the method call.

Specification

  1. Given array of block hashes client software MUST respond with array of BlockBody objects with the corresponding hashes respecting the order of block hashes in the input array.
  2. Client software SHOULD trim array of block bodies in the response in case if any block body is missing.

Rationale

Allows to replace ExecutionPayloads with ExecutionPayloadHeaders when persisting blocks on CL side and request transaction lists from EL client to serve beacon blocks to either user or remote peer. Max size of ExecutionPayloadHeader is 532 bytes, this results in 667MB increase of the space occupied by beacon blocks during 6 months period comparing to what we have today before the Merge. The increase of the space required to store blocks with full payload objects may be up to 2.5TB considering payload max size of 2MB for the same period of time.

This proposal attempts to reduce implementation complexity on EL side as semantics of this method maps on the semantics of existing GetBlockBodies message in ETH protocol.

The limit on the size of the input array isn't required considering trustful relationship between the layers which is gonna be secured by authentication of Engine API communication channel. Network requests in CL clients are currently limited by MAX_REQUEST_BLOCKS == 1024. It's not expected that the size of the input array exceeds this limit in a normal case, though, a sanity limit that is greater than MAX_REQUEST_BLOCKS parameter value may also be considered.

cc @djrtwo @arnetheduck

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