Skip to content

Commit 3ae3d29

Browse files
authored
engine: Add EL triggered consolidations (#554)
1 parent fa015e1 commit 3ae3d29

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

src/engine/openrpc/methods/payload.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@
270270
- sourceAddress: '0x00000000000000000000000000000000000010f6'
271271
validatorPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
272272
amount: '0x1'
273+
consolidationRequests:
274+
- sourceAddress: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
275+
sourcePubkey: '0x85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0'
276+
targetPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
277+
- sourceAddress: '0x00000000000000000000000000000000000010f6'
278+
sourcePubkey: '0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9'
279+
targetPubkey: '0xa5c85a60ba2905c215f6a12872e62b1ee037051364244043a5f639aa81b04a204c55e7cc851f29c7c183be253ea1510b'
273280
- name: Expected blob versioned hashes
274281
value:
275282
- '0x000657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014'
@@ -677,6 +684,10 @@
677684
- sourceAddress: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
678685
validatorPubkey: '0x85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0'
679686
amount: '0x0'
687+
consolidationRequests:
688+
- sourceAddress: '0x00000000000000000000000000000000000010f6'
689+
sourcePubkey: '0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9'
690+
targetPubkey: '0xa5c85a60ba2905c215f6a12872e62b1ee037051364244043a5f639aa81b04a204c55e7cc851f29c7c183be253ea1510b'
680691
- transactions:
681692
- '0xf865108506fc23ac00830124f8940101010101010101010101010101010101010101018031a0d9712a3c40ae85aea4ad1bd95a0b7cc7bd805189a9e2517403b11a00a1530f81a053b53b0267a6dcfe9f9a1652307b396b3e8a65e65707a450e60c92baefdbcfbe'
682693
- '0x02f86c0711843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a071d36bc93c7ae8cc5c01501e51e5e97a51aa541d1a89c809a2af7eb40e9bc2cba071644230e21c075c1da08916aff5efe9f95a6f6a4f94dc217f6c1bb4a3240b29'
@@ -699,6 +710,10 @@
699710
- sourceAddress: '0x00000000000000000000000000000000000010f6'
700711
validatorPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
701712
amount: '0x1'
713+
consolidationRequests:
714+
- sourceAddress: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
715+
sourcePubkey: '0x85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0'
716+
targetPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
702717
- name: engine_getPayloadBodiesByRangeV1
703718
summary: Given a range of block numbers returns bodies of the corresponding execution payloads
704719
externalDocs:
@@ -775,7 +790,7 @@
775790
schema:
776791
type: array
777792
items:
778-
$ref: '#/components/schemas/ExecutionPayloadBodyV1'
793+
$ref: '#/components/schemas/ExecutionPayloadBodyV2'
779794
errors:
780795
- code: -38004
781796
message: Too large request
@@ -811,6 +826,10 @@
811826
- sourceAddress: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
812827
validatorPubkey: '0x85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0'
813828
amount: '0x0'
829+
consolidationRequests:
830+
- sourceAddress: '0x00000000000000000000000000000000000010f6'
831+
sourcePubkey: '0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9'
832+
targetPubkey: '0xa5c85a60ba2905c215f6a12872e62b1ee037051364244043a5f639aa81b04a204c55e7cc851f29c7c183be253ea1510b'
814833
- transactions:
815834
- '0xf865108506fc23ac00830124f8940101010101010101010101010101010101010101018031a0d9712a3c40ae85aea4ad1bd95a0b7cc7bd805189a9e2517403b11a00a1530f81a053b53b0267a6dcfe9f9a1652307b396b3e8a65e65707a450e60c92baefdbcfbe'
816835
- '0x02f86c0711843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a071d36bc93c7ae8cc5c01501e51e5e97a51aa541d1a89c809a2af7eb40e9bc2cba071644230e21c075c1da08916aff5efe9f95a6f6a4f94dc217f6c1bb4a3240b29'
@@ -833,3 +852,7 @@
833852
- sourceAddress: '0x00000000000000000000000000000000000010f6'
834853
validatorPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'
835854
amount: '0x1'
855+
consolidationRequests:
856+
- sourceAddress: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
857+
sourcePubkey: '0x85103a5617937691dfeeb89b86a80d5dc9e3c9d3a1a0e7ce311e26e0bb732eabaa47ffa288f0d54de28209a62a7d29d0'
858+
targetPubkey: '0x98daeed734da114470da559bd4b4c7259e1f7952555241dcbc90cf194a2ef676fc6005f3672fada2a3645edb297a7553'

src/engine/openrpc/schemas/payload.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ ExecutionPayloadV4:
266266
- excessBlobGas
267267
- depositRequests
268268
- withdrawalRequests
269+
- consolidationRequests
269270
properties:
270271
parentHash:
271272
$ref: '#/components/schemas/ExecutionPayloadV3/properties/parentHash'
@@ -311,6 +312,11 @@ ExecutionPayloadV4:
311312
type: array
312313
items:
313314
$ref: '#/components/schemas/WithdrawalRequestV1'
315+
consolidationRequests:
316+
title: Consolidation requests
317+
type: array
318+
items:
319+
$ref: '#/components/schemas/ConsolidationRequestV1'
314320
ExecutionPayloadBodyV1:
315321
title: Execution payload body object V1
316322
type: object
@@ -358,6 +364,12 @@ ExecutionPayloadBodyV2:
358364
- 'null'
359365
items:
360366
$ref: '#/components/schemas/WithdrawalRequestV1'
367+
consolidationRequests:
368+
title: Consolidation requests
369+
- array
370+
- 'null'
371+
items:
372+
$ref: '#/components/schemas/ConsolidationRequestV1'
361373
BlobsBundleV1:
362374
title: Blobs bundle object V1
363375
type: object
@@ -423,3 +435,20 @@ WithdrawalRequestV1:
423435
amount:
424436
title: Withdraw amount
425437
$ref: '#/components/schemas/uint64'
438+
ConsolidationRequestV1:
439+
title: Consolidation request object V1
440+
type: object
441+
required:
442+
- sourceAddress
443+
- sourcePubkey
444+
- targetPubkey
445+
properties:
446+
sourceAddress:
447+
title: Source address
448+
$ref: '#/components/schemas/address'
449+
sourcePubkey:
450+
title: Source validator public key
451+
$ref: '#/components/schemas/bytes48'
452+
targetPubkey:
453+
title: Target validator public key
454+
$ref: '#/components/schemas/bytes48'

src/engine/prague.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This specification is based on and extends [Engine API - Cancun](./cancun.md) sp
1212
- [Structures](#structures)
1313
- [DepositRequestV1](#depositrequestv1)
1414
- [WithdrawalRequestV1](#withdrawalrequestv1)
15+
- [ConsolidationRequestV1](#consolidationrequestv1)
1516
- [ExecutionPayloadV4](#executionpayloadv4)
1617
- [ExecutionPayloadBodyV2](#executionpayloadbodyv2)
1718
- [Methods](#methods)
@@ -59,6 +60,14 @@ The fields are encoded as follows:
5960

6061
*Note:* The `amount` value is represented in Gwei.
6162

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
68+
- `sourcePubkey`: `DATA`, 48 Bytes
69+
- `targetPubkey`: `DATA`, 48 Bytes
70+
6271
### ExecutionPayloadV4
6372

6473
This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpayloadv3) and appends the new fields: `depositRequests` and `withdrawalRequests`.
@@ -82,6 +91,7 @@ This structure has the syntax of [`ExecutionPayloadV3`](./cancun.md#executionpay
8291
- `excessBlobGas`: `QUANTITY`, 64 Bits
8392
- `depositRequests`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
8493
- `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.
8595

8696
### ExecutionPayloadBodyV2
8797

@@ -91,6 +101,7 @@ This structure has the syntax of [`ExecutionPayloadBodyV1`](./shanghai.md#execut
91101
- `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure.
92102
- `depositRequests`: `Array of DepositRequestV1` - Array of deposits, each object is an `OBJECT` containing the fields of a `DepositRequestV1` structure.
93103
- `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.
94105

95106
## Methods
96107

0 commit comments

Comments
 (0)