Skip to content

Commit cd7d992

Browse files
committed
engine: unify request objects
1 parent 3ae3d29 commit cd7d992

File tree

1 file changed

+14
-31
lines changed

1 file changed

+14
-31
lines changed

src/engine/prague.md

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
1010
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1111

1212
- [Structures](#structures)
13-
- [DepositRequestV1](#depositrequestv1)
14-
- [WithdrawalRequestV1](#withdrawalrequestv1)
15-
- [ConsolidationRequestV1](#consolidationrequestv1)
13+
- [RequestV1](#requestv1)
1614
- [ExecutionPayloadV4](#executionpayloadv4)
1715
- [ExecutionPayloadBodyV2](#executionpayloadbodyv2)
1816
- [Methods](#methods)
@@ -38,39 +36,28 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
3836

3937
## Structures
4038

41-
### DepositRequestV1
42-
This structure maps onto the deposit object from [EIP-6110](https://eips.ethereum.org/EIPS/eip-6110).
39+
### RequestV1
40+
41+
This structure maps onto the amalgamation of the deposit object from [EIP-6110](https://eips.ethereum.org/EIPS/eip-6110), withdrawal request from [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002), and the consolidation request from [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251).
42+
4343
The fields are encoded as follows:
4444

45+
- `type`: `QUANTITY`, 64 bits - [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685) type byte to identify the request
4546
- `pubkey`: `DATA`, 48 Bytes
4647
- `withdrawalCredentials`: `DATA`, 32 Bytes
4748
- `amount`: `QUANTITY`, 64 Bits
4849
- `signature`: `DATA`, 96 Bytes
4950
- `index`: `QUANTITY`, 64 Bits
50-
51-
*Note:* The `amount` value is represented in Gwei.
52-
53-
### WithdrawalRequestV1
54-
This structure maps onto the withdrawal request from [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002).
55-
The fields are encoded as follows:
56-
5751
- `sourceAddress`: `DATA`, 20 Bytes
5852
- `validatorPubkey`: `DATA`, 48 Bytes
59-
- `amount`: `QUANTITY`, 64 Bits
60-
61-
*Note:* The `amount` value is represented in Gwei.
62-
63-
### ConsolidationRequestV1
64-
This structure maps onto the consolidation request from [EIP-7251](https://eips.ethereum.org/EIPS/eip-7251).
65-
The fields are encoded as follows:
66-
67-
- `sourceAddress`: `DATA`, 20 Bytes
6853
- `sourcePubkey`: `DATA`, 48 Bytes
6954
- `targetPubkey`: `DATA`, 48 Bytes
7055

56+
*Note:* The `amount` value is represented in Gwei.
57+
7158
### ExecutionPayloadV4
7259

73-
This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3) and appends the new fields: `depositRequests` and `withdrawalRequests`.
60+
This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3) and appends the new field `requests`.
7461

7562
- `parentHash`: `DATA`, 32 Bytes
7663
- `feeRecipient`: `DATA`, 20 Bytes
@@ -89,19 +76,15 @@ This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpay
8976
- `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure.
9077
- `blobGasUsed`: `QUANTITY`, 64 Bits
9178
- `excessBlobGas`: `QUANTITY`, 64 Bits
92-
- `depositRequests`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
93-
- `withdrawalRequests`: `Array of WithdrawalRequestV1` - Array of withdrawal requests, each object is an `OBJECT` containing the fields of a `WithdrawalRequestV1` structure.
94-
- `consolidationRequests`: `Array of ConsolidationRequestV1` - Array of consolidation requests, each object is an `OBJECT` containing the fields of a `ConsolidationRequestV1` structure.
79+
- `requests`: `Array of RequestV1` - Array of request objects
9580

9681
### ExecutionPayloadBodyV2
9782

98-
This structure has the syntax of [`ExecutionPayloadBodyV1`](./shanghai.md#executionpayloadv1) and appends the new fields: `depositRequests` and `withdrawalRequests`.
83+
This structure has the syntax of [`ExecutionPayloadBodyV1`](./shanghai.md#executionpayloadv1) and appends the new field `requests`.
9984

10085
- `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)
10186
- `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure.
102-
- `depositRequests`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
103-
- `withdrawalRequests`: `Array of WithdrawalRequestV1` - Array of withdrawal requests, each object is an `OBJECT` containing the fields of a `WithdrawalRequestV1` structure.
104-
- `consolidationRequests`: `Array of ConsolidationRequestV1` - Array of consolidation requests, each object is an `OBJECT` containing the fields of a `ConsolidationRequestV1` structure.
87+
- `requests`: `Array of RequestV1` - Array of requests, each object is an `OBJECT` containing the fields of a `RequestV1` structure.
10588

10689
## Methods
10790

@@ -173,7 +156,7 @@ The response of this method is updated with [`ExecutionPayloadBodyV2`](#executio
173156

174157
This method follows the same specification as [`engine_getPayloadBodiesByHashV1`](./shanghai.md#engine_getpayloadbodiesbyhashv1) with the addition of the following:
175158

176-
1. Client software **MUST** set `depositRequests` and `withdrawalRequests` fields to `null` for bodies of pre-Prague blocks.
159+
1. Client software **MUST** set `requests` field to `null` for bodies of pre-Prague blocks.
177160

178161
### engine_getPayloadBodiesByRangeV2
179162

@@ -196,7 +179,7 @@ The response of this method is updated with [`ExecutionPayloadBodyV2`](#executio
196179

197180
This method follows the same specification as [`engine_getPayloadBodiesByRangeV2`](./shanghai.md#engine_getpayloadbodiesbyrangev1) with the addition of the following:
198181

199-
1. Client software **MUST** set `depositRequests` and `withdrawalRequests` fields to `null` for bodies of pre-Prague blocks.
182+
1. Client software **MUST** set `requests` field to `null` for bodies of pre-Prague blocks.
200183

201184
### Update the methods of previous forks
202185

0 commit comments

Comments
 (0)