Skip to content

Commit 08093be

Browse files
committed
Turn executionRequests into a sequence of bytes
1 parent fb15e73 commit 08093be

File tree

3 files changed

+14
-136
lines changed

3 files changed

+14
-136
lines changed

src/engine/openrpc/methods/payload.yaml

Lines changed: 5 additions & 54 deletions
Large diffs are not rendered by default.

src/engine/openrpc/schemas/payload.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -243,29 +243,6 @@ ExecutionPayloadV3:
243243
excessBlobGas:
244244
title: Excess blob gas
245245
$ref: '#/components/schemas/uint64'
246-
ExecutionRequestsV1:
247-
title: Execution requests object V1
248-
type: object
249-
required:
250-
- deposits
251-
- withdrawals
252-
- consolidations
253-
properties:
254-
deposits:
255-
title: Deposit requests
256-
type: array
257-
items:
258-
$ref: '#/components/schemas/DepositRequestV1'
259-
withdrawals:
260-
title: Withdrawals requests
261-
type: array
262-
items:
263-
$ref: '#/components/schemas/WithdrawalRequestV1'
264-
consolidations:
265-
title: Consolidation requests
266-
type: array
267-
items:
268-
$ref: '#/components/schemas/ConsolidationRequestV1'
269246
ExecutionPayloadBodyV1:
270247
title: Execution payload body object V1
271248
type: object

src/engine/prague.md

Lines changed: 9 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
99
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1010
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1111

12-
- [Structures](#structures)
13-
- [DepositRequestV1](#depositrequestv1)
14-
- [WithdrawalRequestV1](#withdrawalrequestv1)
15-
- [ConsolidationRequestV1](#consolidationrequestv1)
16-
- [ExecutionRequestsV1](#executionrequestsv1)
1712
- [Methods](#methods)
1813
- [engine_newPayloadV4](#engine_newpayloadv4)
1914
- [Request](#request)
@@ -27,52 +22,6 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
2722

2823
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2924

30-
## Structures
31-
32-
### DepositRequestV1
33-
34-
This structure maps onto the deposit object from [EIP-6110](https://eips.ethereum.org/EIPS/eip-6110).
35-
The fields are encoded as follows:
36-
37-
- `pubkey`: `DATA`, 48 Bytes
38-
- `withdrawalCredentials`: `DATA`, 32 Bytes
39-
- `amount`: `QUANTITY`, 64 Bits
40-
- `signature`: `DATA`, 96 Bytes
41-
- `index`: `QUANTITY`, 64 Bits
42-
43-
*Note:* The `amount` value is represented in Gwei.
44-
45-
### WithdrawalRequestV1
46-
47-
This structure maps onto the withdrawal request from [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002).
48-
The fields are encoded as follows:
49-
50-
- `sourceAddress`: `DATA`, 20 Bytes
51-
- `validatorPubkey`: `DATA`, 48 Bytes
52-
- `amount`: `QUANTITY`, 64 Bits
53-
54-
*Note:* The `amount` value is represented in Gwei.
55-
56-
### ConsolidationRequestV1
57-
58-
This structure maps onto the consolidation request from [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251).
59-
The fields are encoded as follows:
60-
61-
- `sourceAddress`: `DATA`, 20 Bytes
62-
- `sourcePubkey`: `DATA`, 48 Bytes
63-
- `targetPubkey`: `DATA`, 48 Bytes
64-
65-
### ExecutionRequestsV1
66-
67-
This container holds execution layer triggered requests.
68-
69-
- `deposits`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
70-
- `withdrawals`: `Array of WithdrawalRequestV1` - Array of withdrawal requests, each object is an `OBJECT` containing the fields of a `WithdrawalRequestV1` structure.
71-
- `consolidations`: `Array of ConsolidationRequestV1` - Array of consolidation requests, each object is an `OBJECT` containing the fields of a `ConsolidationRequestV1` structure.
72-
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.
75-
7625
## Methods
7726

7827
### engine_newPayloadV4
@@ -86,7 +35,7 @@ Method parameter list is extended with `executionRequests`.
8635
1. `executionPayload`: [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3).
8736
2. `expectedBlobVersionedHashes`: `Array of DATA`, 32 Bytes - Array of expected blob versioned hashes to validate.
8837
3. `parentBeaconBlockRoot`: `DATA`, 32 Bytes - Root of the parent beacon block.
89-
4. `executionRequests`: [`ExecutionRequestsV1`](#ExecutionRequestsV1)
38+
4. `executionRequests`: `DATA` - Execution layer trigerred requests encoded as it is defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685).
9039

9140
#### Response
9241

@@ -99,12 +48,13 @@ This method follows the same specification as [`engine_newPayloadV3`](./cancun.m
9948
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.
10049

10150
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}`.
51+
That is, if `executionRequests` does not match the execution requests commitment in the execution layer block header
52+
the call **MUST** be responded with `{status: INVALID, latestValidHash: null, validationError: errorMessage | null}`.
53+
The commitment computation algorithm is defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685).
10454

10555
### engine_getPayloadV4
10656

107-
The response of this method is updated with [`ExecutionPayloadV4`](#ExecutionPayloadV4) and new [`ExecutionRequestsV1`](#ExecutionRequestsV1).
57+
The response of this method is extended with the `executionRequests` field.
10858

10959
#### Request
11060

@@ -120,7 +70,8 @@ The response of this method is updated with [`ExecutionPayloadV4`](#ExecutionPay
12070
- `blockValue` : `QUANTITY`, 256 Bits - The expected value to be received by the `feeRecipient` in wei
12171
- `blobsBundle`: [`BlobsBundleV1`](#BlobsBundleV1) - Bundle with data corresponding to blob transactions included into `executionPayload`
12272
- `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
73+
- `executionRequests`: `DATA` - Execution layer trigerred requests obtained from the `executionPayload` transaction execution,
74+
encoded as it is defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685).
12475
* error: code and message set in case an exception happens while getting the payload.
12576

12677
#### Specification
@@ -129,9 +80,8 @@ This method follows the same specification as [`engine_getPayloadV3`](./cancun.m
12980

13081
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.
13182

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.
83+
2. The call **MUST** return `executionRequests` object containing execution layer trigerred requests obtained from transaction execution of the `executionPayload`.
84+
The ways the requests are encoded and obtained from the payload execution are defined by [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685).
13585

13686
### Update the methods of previous forks
13787

0 commit comments

Comments
 (0)