Skip to content

Commit fb15e73

Browse files
committed
Make execution requests a sidecar, take 2
1 parent 0c984cd commit fb15e73

File tree

4 files changed

+65
-107
lines changed

4 files changed

+65
-107
lines changed

src/engine/openrpc/methods/payload.yaml

Lines changed: 38 additions & 21 deletions
Large diffs are not rendered by default.

src/engine/openrpc/schemas/payload.yaml

Lines changed: 7 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -243,76 +243,25 @@ ExecutionPayloadV3:
243243
excessBlobGas:
244244
title: Excess blob gas
245245
$ref: '#/components/schemas/uint64'
246-
ExecutionPayloadV4:
247-
title: Execution payload object V4
246+
ExecutionRequestsV1:
247+
title: Execution requests object V1
248248
type: object
249249
required:
250-
- parentHash
251-
- feeRecipient
252-
- stateRoot
253-
- receiptsRoot
254-
- logsBloom
255-
- prevRandao
256-
- blockNumber
257-
- gasLimit
258-
- gasUsed
259-
- timestamp
260-
- extraData
261-
- baseFeePerGas
262-
- blockHash
263-
- transactions
250+
- deposits
264251
- withdrawals
265-
- blobGasUsed
266-
- excessBlobGas
267-
- depositRequests
268-
- withdrawalRequests
269-
- consolidationRequests
252+
- consolidations
270253
properties:
271-
parentHash:
272-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/parentHash'
273-
feeRecipient:
274-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/feeRecipient'
275-
stateRoot:
276-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/stateRoot'
277-
receiptsRoot:
278-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/receiptsRoot'
279-
logsBloom:
280-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/logsBloom'
281-
prevRandao:
282-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/prevRandao'
283-
blockNumber:
284-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/blockNumber'
285-
gasLimit:
286-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/gasLimit'
287-
gasUsed:
288-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/gasUsed'
289-
timestamp:
290-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/timestamp'
291-
extraData:
292-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/extraData'
293-
baseFeePerGas:
294-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/baseFeePerGas'
295-
blockHash:
296-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/blockHash'
297-
transactions:
298-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/transactions'
299-
withdrawals:
300-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/withdrawals'
301-
blobGasUsed:
302-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/blobGasUsed'
303-
excessBlobGas:
304-
$ref: '#/components/schemas/ExecutionPayloadV3/properties/excessBlobGas'
305-
depositRequests:
254+
deposits:
306255
title: Deposit requests
307256
type: array
308257
items:
309258
$ref: '#/components/schemas/DepositRequestV1'
310-
withdrawalRequests:
259+
withdrawals:
311260
title: Withdrawals requests
312261
type: array
313262
items:
314263
$ref: '#/components/schemas/WithdrawalRequestV1'
315-
consolidationRequests:
264+
consolidations:
316265
title: Consolidation requests
317266
type: array
318267
items:

src/engine/prague.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
1313
- [DepositRequestV1](#depositrequestv1)
1414
- [WithdrawalRequestV1](#withdrawalrequestv1)
1515
- [ConsolidationRequestV1](#consolidationrequestv1)
16-
- [ExecutionPayloadV4](#executionpayloadv4)
16+
- [ExecutionRequestsV1](#executionrequestsv1)
1717
- [Methods](#methods)
1818
- [engine_newPayloadV4](#engine_newpayloadv4)
1919
- [Request](#request)
@@ -30,6 +30,7 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
3030
## Structures
3131

3232
### DepositRequestV1
33+
3334
This structure maps onto the deposit object from [EIP-6110](https://eips.ethereum.org/EIPS/eip-6110).
3435
The fields are encoded as follows:
3536

@@ -42,6 +43,7 @@ The fields are encoded as follows:
4243
*Note:* The `amount` value is represented in Gwei.
4344

4445
### WithdrawalRequestV1
46+
4547
This structure maps onto the withdrawal request from [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002).
4648
The fields are encoded as follows:
4749

@@ -52,6 +54,7 @@ The fields are encoded as follows:
5254
*Note:* The `amount` value is represented in Gwei.
5355

5456
### ConsolidationRequestV1
57+
5558
This structure maps onto the consolidation request from [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251).
5659
The fields are encoded as follows:
5760

@@ -60,45 +63,27 @@ The fields are encoded as follows:
6063
- `targetPubkey`: `DATA`, 48 Bytes
6164

6265
### ExecutionRequestsV1
63-
This container holds requests from the execution layer.
66+
67+
This container holds execution layer triggered requests.
6468

6569
- `deposits`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
6670
- `withdrawals`: `Array of WithdrawalRequestV1` - Array of withdrawal requests, each object is an `OBJECT` containing the fields of a `WithdrawalRequestV1` structure.
6771
- `consolidations`: `Array of ConsolidationRequestV1` - Array of consolidation requests, each object is an `OBJECT` containing the fields of a `ConsolidationRequestV1` structure.
6872

69-
### ExecutionPayloadV4
70-
71-
This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3).
72-
73-
- `parentHash`: `DATA`, 32 Bytes
74-
- `feeRecipient`: `DATA`, 20 Bytes
75-
- `stateRoot`: `DATA`, 32 Bytes
76-
- `receiptsRoot`: `DATA`, 32 Bytes
77-
- `logsBloom`: `DATA`, 256 Bytes
78-
- `prevRandao`: `DATA`, 32 Bytes
79-
- `blockNumber`: `QUANTITY`, 64 Bits
80-
- `gasLimit`: `QUANTITY`, 64 Bits
81-
- `gasUsed`: `QUANTITY`, 64 Bits
82-
- `timestamp`: `QUANTITY`, 64 Bits
83-
- `extraData`: `DATA`, 0 to 32 Bytes
84-
- `baseFeePerGas`: `QUANTITY`, 256 Bits
85-
- `blockHash`: `DATA`, 32 Bytes
86-
- `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)
87-
- `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure.
88-
- `blobGasUsed`: `QUANTITY`, 64 Bits
89-
- `excessBlobGas`: `QUANTITY`, 64 Bits
73+
*Note*: The order of items within `deposits`, `withdrawals` and `consolidations` lists is defined by
74+
[EIP-6110](https://eips.ethereum.org/EIPS/eip-6110), [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002) and [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251) respectively.
9075

9176
## Methods
9277

9378
### engine_newPayloadV4
9479

95-
The request of this method is updated with [`ExecutionPayloadV4`](#ExecutionPayloadV4) and new [`ExecutionRequestsV1`](#ExecutionRequestsV1).
80+
Method parameter list is extended with `executionRequests`.
9681

9782
#### Request
9883

9984
* method: `engine_newPayloadV4`
10085
* params:
101-
1. `executionPayload`: [`ExecutionPayloadV4`](#ExecutionPayloadV4).
86+
1. `executionPayload`: [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3).
10287
2. `expectedBlobVersionedHashes`: `Array of DATA`, 32 Bytes - Array of expected blob versioned hashes to validate.
10388
3. `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
10489
4. `executionRequests`: [`ExecutionRequestsV1`](#ExecutionRequestsV1)
@@ -113,6 +98,10 @@ This method follows the same specification as [`engine_newPayloadV3`](./cancun.m
11398

11499
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of the payload does not fall within the time frame of the Prague fork.
115100

101+
2. Client software **MUST** incorporate `executionRequests` into the `blockHash` validation process.
102+
That is, if `executionRequests` does not match the execution requests commitment in the execution layer block header
103+
the call **MUST** be responded with `{status: INVALID, latestValidHash: null, validationError: errorMessage | null}`.
104+
116105
### engine_getPayloadV4
117106

118107
The response of this method is updated with [`ExecutionPayloadV4`](#ExecutionPayloadV4) and new [`ExecutionRequestsV1`](#ExecutionRequestsV1).
@@ -130,8 +119,8 @@ The response of this method is updated with [`ExecutionPayloadV4`](#ExecutionPay
130119
- `executionPayload`: [`ExecutionPayloadV4`](#ExecutionPayloadV4)
131120
- `blockValue` : `QUANTITY`, 256 Bits - The expected value to be received by the `feeRecipient` in wei
132121
- `blobsBundle`: [`BlobsBundleV1`](#BlobsBundleV1) - Bundle with data corresponding to blob transactions included into `executionPayload`
133-
- `requests`: [`ExecutionRequestsV1`](#ExecutionRequestsV1) - Container with requests from execution layer included in `executionPayload`
134122
- `shouldOverrideBuilder` : `BOOLEAN` - Suggestion from the execution layer to use this `executionPayload` instead of an externally provided one
123+
- `executionRequests`: [`ExecutionRequestsV1`](#ExecutionRequestsV1) - Execution layer trigerred requests obtained from the `executionPayload` transaction execution
135124
* error: code and message set in case an exception happens while getting the payload.
136125

137126
#### Specification
@@ -140,6 +129,10 @@ This method follows the same specification as [`engine_getPayloadV3`](./cancun.m
140129

141130
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of the built payload does not fall within the time frame of the Prague fork.
142131

132+
2. The call **MUST** return `executionRequests` object containing deposit, withdrawal and consolidation requests obtained from transaction execution of the `executionPayload`.
133+
The way the requests are obtained from the payload execution is defined by the [EIP-6110](https://eips.ethereum.org/EIPS/eip-6110),
134+
[EIP-7002](https://eips.ethereum.org/EIPS/eip-7002) and [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251) respectively.
135+
143136
### Update the methods of previous forks
144137

145138
This document defines how Prague payload should be handled by the [`Cancun API`](./cancun.md).

wordlist.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,4 @@ src
6666
https
6767
forkchoiceupdatedresponsev
6868
exitv
69-
depositreceiptv
70-
executionrequestsv
69+
executionrequestsv

0 commit comments

Comments
 (0)