diff --git a/src/engine/specification.md b/src/engine/specification.md index e8d17fa37..7a6034c10 100644 --- a/src/engine/specification.md +++ b/src/engine/specification.md @@ -14,6 +14,7 @@ This document specifies the Engine API methods that the Consensus Layer uses to - [Errors](#errors) - [Structures](#structures) - [ExecutionPayloadV1](#executionpayloadv1) + - [ExecutionPayloadBodyV1](#executionpayloadbodyv1) - [ForkchoiceStateV1](#forkchoicestatev1) - [PayloadAttributesV1](#payloadattributesv1) - [PayloadStatusV1](#payloadstatusv1) @@ -34,6 +35,10 @@ This document specifies the Engine API methods that the Consensus Layer uses to - [Request](#request-2) - [Response](#response-2) - [Specification](#specification-2) + - [engine_getPayloadBodiesV1](#engine_getpayloadbodiesv1) + - [Request](#request-3) + - [Response](#response-3) + - [Specification](#specification-3) @@ -144,6 +149,11 @@ This structure maps on the [`ExecutionPayload`](https://github.com/ethereum/cons - `blockHash`: `DATA`, 32 Bytes - `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](https://eips.ethereum.org/EIPS/eip-2718) +### ExecutionPayloadBodyV1 + +This structure contains a body of an execution payload. The fields are encoded as follows: +- `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](https://eips.ethereum.org/EIPS/eip-2718) + ### ForkchoiceStateV1 This structure encapsulates the fork choice state. The fields are encoded as follows: @@ -310,3 +320,22 @@ The payload build process is specified as follows: 1. The call **MUST** return `-32001: Unknown payload` error if the build process identified by the `payloadId` does not exist. 1. Client software **MAY** stop the corresponding build process after serving this call. + +### engine_getPayloadBodiesV1 + +#### Request + +* method: `engine_getPayloadBodiesV1` +* params: + 1. `Array of DATA`, 32 Bytes - Array of `block_hash` field values of the `ExecutionPayload` structure + +#### Response + +* result: `Array of ExecutionPayloadBodyV1` - Array of [`ExecutionPayloadBodyV1`](#ExecutionPayloadBodyV1) 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 `ExecutionPayloadBodyV1` objects with the corresponding hashes respecting the order of block hashes in the input array. + +1. Client software **MUST** skip the payload body in the response array if the data of this body is missing. For instance, if the request is `[A.block_hash, B.block_hash, C.block_hash]` and client software has data of payloads `A` and `C`, but doesn't have data of `B`, the response **MUST** be `[A.body, C.body]`. diff --git a/wordlist.txt b/wordlist.txt index abe57d601..01d7a4e5b 100644 --- a/wordlist.txt +++ b/wordlist.txt @@ -1,5 +1,7 @@ apis attributesv +bodyv +bodiesv bytecode eip endian