From e0e1eca9686e736f205f6edde3760de472502057 Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Wed, 1 May 2024 14:38:56 -0600 Subject: [PATCH 01/11] add initial electra spec --- specs/electra/builder.md | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 specs/electra/builder.md diff --git a/specs/electra/builder.md b/specs/electra/builder.md new file mode 100644 index 0000000..f76f6d6 --- /dev/null +++ b/specs/electra/builder.md @@ -0,0 +1,54 @@ +# Electra -- Builder Specification + +## Introduction + +This is the modification of the builder specification accompanying the Electra upgrade. + +## Containers + +### Extended containers + +#### `ExecutionPayloadAndBlobsBundle` + +```python +class ExecutionPayloadAndBlobsBundle(Container): + execution_payload: ExecutionPayload # [Modified in Electra] + blobs_bundle: BlobsBundle +``` + +#### `BuilderBid` + +Note: `SignedBuilderBid` is updated indirectly. + +```python +class BuilderBid(Container): + header: ExecutionPayloadHeader # [Modified in Electra] + blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] + value: uint256 + pubkey: BLSPubkey +``` + +#### `ExecutionPayloadHeader` + +See [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/beacon-chain.md#executionpayloadheader) in Electra consensus specs. + +##### `BlindedBeaconBlockBody` + +Note: `BlindedBeaconBlock` and `SignedBlindedBeaconBlock` types are updated indirectly. + +```python +class BlindedBeaconBlockBody(Container): + randao_reveal: BLSSignature + eth1_data: Eth1Data + graffiti: Bytes32 + proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS] + attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS] + attestations: List[Attestation, MAX_ATTESTATIONS] + deposits: List[Deposit, MAX_DEPOSITS] + voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] + sync_aggregate: SyncAggregate + execution_payload_header: ExecutionPayloadHeader # [Modified in Electra] + bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] + blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] + consolidations: List[SignedConsolidation, MAX_CONSOLIDATIONS] # [New in Electra] +``` From bf904fc0371a4cfddd4b19c64078a9a654ffc6db Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Wed, 1 May 2024 14:56:03 -0600 Subject: [PATCH 02/11] move indirectly updated types into note --- specs/electra/builder.md | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index f76f6d6..10f0101 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -8,30 +8,12 @@ This is the modification of the builder specification accompanying the Electra u ### Extended containers -#### `ExecutionPayloadAndBlobsBundle` - -```python -class ExecutionPayloadAndBlobsBundle(Container): - execution_payload: ExecutionPayload # [Modified in Electra] - blobs_bundle: BlobsBundle -``` - -#### `BuilderBid` - -Note: `SignedBuilderBid` is updated indirectly. - -```python -class BuilderBid(Container): - header: ExecutionPayloadHeader # [Modified in Electra] - blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] - value: uint256 - pubkey: BLSPubkey -``` - #### `ExecutionPayloadHeader` See [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/beacon-chain.md#executionpayloadheader) in Electra consensus specs. +Note: `ExecutionPayloadAndBlobsBundle` and `BuilderBid` and `SignedBuilderBid` types are updated indirectly. + ##### `BlindedBeaconBlockBody` Note: `BlindedBeaconBlock` and `SignedBlindedBeaconBlock` types are updated indirectly. From ec6686477b51f2b391221eda36b7bd836eb89c88 Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Mon, 16 Sep 2024 14:00:12 -0600 Subject: [PATCH 03/11] adjust for move of exec reqs from exec payload to beacon block --- specs/electra/builder.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 10f0101..2966257 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -8,12 +8,6 @@ This is the modification of the builder specification accompanying the Electra u ### Extended containers -#### `ExecutionPayloadHeader` - -See [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/beacon-chain.md#executionpayloadheader) in Electra consensus specs. - -Note: `ExecutionPayloadAndBlobsBundle` and `BuilderBid` and `SignedBuilderBid` types are updated indirectly. - ##### `BlindedBeaconBlockBody` Note: `BlindedBeaconBlock` and `SignedBlindedBeaconBlock` types are updated indirectly. @@ -29,8 +23,8 @@ class BlindedBeaconBlockBody(Container): deposits: List[Deposit, MAX_DEPOSITS] voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] sync_aggregate: SyncAggregate - execution_payload_header: ExecutionPayloadHeader # [Modified in Electra] + execution_payload_header: ExecutionPayloadHeader bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] - consolidations: List[SignedConsolidation, MAX_CONSOLIDATIONS] # [New in Electra] + execution_requests: ExecutionRequests # [New in Electra] ``` From 19f0bce8cc20eb73f90056f6889086c7d3e52cec Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Mon, 16 Sep 2024 14:04:37 -0600 Subject: [PATCH 04/11] use electra constants for max lengths of attester slasings & attestations --- specs/electra/builder.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 2966257..8a477a3 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -8,7 +8,7 @@ This is the modification of the builder specification accompanying the Electra u ### Extended containers -##### `BlindedBeaconBlockBody` +#### `BlindedBeaconBlockBody` Note: `BlindedBeaconBlock` and `SignedBlindedBeaconBlock` types are updated indirectly. @@ -18,8 +18,8 @@ class BlindedBeaconBlockBody(Container): eth1_data: Eth1Data graffiti: Bytes32 proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS] - attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS] - attestations: List[Attestation, MAX_ATTESTATIONS] + attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS_ELECTRA] # [Modified in Electra:EIP7549] + attestations: List[Attestation, MAX_ATTESTATIONS_ELECTRA] # [Modified in Electra:EIP7549] deposits: List[Deposit, MAX_DEPOSITS] voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] sync_aggregate: SyncAggregate From f249dfd52386c04c18930916b5fa24afcb446b00 Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Mon, 16 Sep 2024 15:59:47 -0600 Subject: [PATCH 05/11] replace execution requests with corresponding root --- specs/electra/builder.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 8a477a3..8bab8bc 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -26,5 +26,5 @@ class BlindedBeaconBlockBody(Container): execution_payload_header: ExecutionPayloadHeader bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] - execution_requests: ExecutionRequests # [New in Electra] + execution_requests_root: Root # [New in Electra] ``` From b27bee017a3d78101cdc9b8cdd282f8caf714a0b Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Mon, 16 Sep 2024 16:08:33 -0600 Subject: [PATCH 06/11] add ExecutionBundle and extend BuilderBid --- specs/electra/builder.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 8bab8bc..82ced3a 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -6,8 +6,32 @@ This is the modification of the builder specification accompanying the Electra u ## Containers +### New containers + +#### ExecutionBundle + +```python +class ExecutionBundle(Container): + execution_payload: ExecutionPayload + blobs_bundle: BlobsBundle + execution_requests: ExecutionRequests # [New in Electra] +``` + ### Extended containers +#### `BuilderBid` + +Note: `SignedBuilderBid` is updated indirectly. + +```python +class BuilderBid(Container): + header: ExecutionPayloadHeader + blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] + execution_requests_root: Root # [New in Electra] + value: uint256 + pubkey: BLSPubkey +``` + #### `BlindedBeaconBlockBody` Note: `BlindedBeaconBlock` and `SignedBlindedBeaconBlock` types are updated indirectly. From 0e4b9756a3923e882e33669908c2e217d2d875d3 Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Mon, 16 Sep 2024 21:29:40 -0600 Subject: [PATCH 07/11] clean up execution bundle --- specs/electra/builder.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 82ced3a..4f5c9f6 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -8,13 +8,13 @@ This is the modification of the builder specification accompanying the Electra u ### New containers -#### ExecutionBundle +#### `ExecutionBundle` ```python class ExecutionBundle(Container): execution_payload: ExecutionPayload blobs_bundle: BlobsBundle - execution_requests: ExecutionRequests # [New in Electra] + execution_requests: ExecutionRequests ``` ### Extended containers From affc3152dfb2edc3816d74e2f1ab48d01be83fba Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Tue, 17 Sep 2024 14:44:04 -0600 Subject: [PATCH 08/11] add notes to accompany type changes --- specs/electra/builder.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 4f5c9f6..3b375c2 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -4,12 +4,16 @@ This is the modification of the builder specification accompanying the Electra upgrade. +The behavior defined by the specification is consistent with previous forks except for the changes to the types given below. + ## Containers ### New containers #### `ExecutionBundle` +The `ExecutionBundle` supersedes the [`ExecutionPayloadAndBlobsBundle`](execution-payload-and-blobs-bundle-deneb). + ```python class ExecutionBundle(Container): execution_payload: ExecutionPayload @@ -52,3 +56,5 @@ class BlindedBeaconBlockBody(Container): blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] execution_requests_root: Root # [New in Electra] ``` + +[execution-payload-and-blobs-bundle-deneb]: ../deneb/builder.md#executionpayloadandblobsbundle From 8e8da633451fa4ef836b633abe7d7e3d7c3c3c9c Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Tue, 17 Sep 2024 14:49:07 -0600 Subject: [PATCH 09/11] fix broken link --- specs/electra/builder.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 3b375c2..1d25647 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -12,7 +12,7 @@ The behavior defined by the specification is consistent with previous forks exce #### `ExecutionBundle` -The `ExecutionBundle` supersedes the [`ExecutionPayloadAndBlobsBundle`](execution-payload-and-blobs-bundle-deneb). +The `ExecutionBundle` supersedes the [`ExecutionPayloadAndBlobsBundle`][execution-payload-and-blobs-bundle-deneb]. ```python class ExecutionBundle(Container): From 9f7b1e85afb53efa6f05c1511a174b3e4459cc32 Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Tue, 24 Sep 2024 11:11:41 -0600 Subject: [PATCH 10/11] replace exec reqs root with exec reqs --- specs/electra/builder.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 1d25647..4efd1b4 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -31,7 +31,7 @@ Note: `SignedBuilderBid` is updated indirectly. class BuilderBid(Container): header: ExecutionPayloadHeader blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] - execution_requests_root: Root # [New in Electra] + execution_requests: ExecutionRequests # [New in Electra] value: uint256 pubkey: BLSPubkey ``` @@ -54,7 +54,7 @@ class BlindedBeaconBlockBody(Container): execution_payload_header: ExecutionPayloadHeader bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] blob_kzg_commitments: List[KZGCommitment, MAX_BLOB_COMMITMENTS_PER_BLOCK] - execution_requests_root: Root # [New in Electra] + execution_requests: ExecutionRequests # [New in Electra] ``` [execution-payload-and-blobs-bundle-deneb]: ../deneb/builder.md#executionpayloadandblobsbundle From bf60a875ef2220814a1c17dda492fc5912bdc29e Mon Sep 17 00:00:00 2001 From: jacobkaufmann Date: Thu, 26 Sep 2024 20:41:47 -0400 Subject: [PATCH 11/11] remove execution bundle container --- specs/electra/builder.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/specs/electra/builder.md b/specs/electra/builder.md index 4efd1b4..307a31e 100644 --- a/specs/electra/builder.md +++ b/specs/electra/builder.md @@ -8,19 +8,6 @@ The behavior defined by the specification is consistent with previous forks exce ## Containers -### New containers - -#### `ExecutionBundle` - -The `ExecutionBundle` supersedes the [`ExecutionPayloadAndBlobsBundle`][execution-payload-and-blobs-bundle-deneb]. - -```python -class ExecutionBundle(Container): - execution_payload: ExecutionPayload - blobs_bundle: BlobsBundle - execution_requests: ExecutionRequests -``` - ### Extended containers #### `BuilderBid`