From b947b490adc806b8fbd92611c14edbd697602397 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Wed, 30 Nov 2022 22:23:07 +1100 Subject: [PATCH 01/14] Update types to support EIP-4844 --- apis/beacon/blocks/blinded_block.yaml | 1 + apis/beacon/blocks/blinded_blocks.yaml | 1 + apis/beacon/blocks/block.v2.yaml | 1 + apis/beacon/blocks/blocks.yaml | 1 + apis/validator/blinded_block.yaml | 3 +- apis/validator/block.v2.yaml | 1 + beacon-node-oapi.yaml | 10 ++- types/eip4844/block.yaml | 95 ++++++++++++++++++++++++++ types/eip4844/execution_payload.yaml | 56 +++++++++++++++ types/primitive.yaml | 7 ++ 10 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 types/eip4844/block.yaml create mode 100644 types/eip4844/execution_payload.yaml diff --git a/apis/beacon/blocks/blinded_block.yaml b/apis/beacon/blocks/blinded_block.yaml index 3690557e..84a7ac42 100644 --- a/apis/beacon/blocks/blinded_block.yaml +++ b/apis/beacon/blocks/blinded_block.yaml @@ -37,6 +37,7 @@ get: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type" diff --git a/apis/beacon/blocks/blinded_blocks.yaml b/apis/beacon/blocks/blinded_blocks.yaml index 22f5e431..3fcc3ba8 100644 --- a/apis/beacon/blocks/blinded_blocks.yaml +++ b/apis/beacon/blocks/blinded_blocks.yaml @@ -32,6 +32,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/beacon/blocks/block.v2.yaml b/apis/beacon/blocks/block.v2.yaml index e0a57b2b..62a6c6d1 100644 --- a/apis/beacon/blocks/block.v2.yaml +++ b/apis/beacon/blocks/block.v2.yaml @@ -37,6 +37,7 @@ get: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBeaconBlock" application/octet-stream: schema: diff --git a/apis/beacon/blocks/blocks.yaml b/apis/beacon/blocks/blocks.yaml index d19f359b..4a88628a 100644 --- a/apis/beacon/blocks/blocks.yaml +++ b/apis/beacon/blocks/blocks.yaml @@ -30,6 +30,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/validator/blinded_block.yaml b/apis/validator/blinded_block.yaml index bf546844..ff398693 100644 --- a/apis/validator/blinded_block.yaml +++ b/apis/validator/blinded_block.yaml @@ -54,7 +54,7 @@ get: properties: version: type: string - enum: [ phase0, altair, bellatrix, capella ] + enum: [ phase0, altair, bellatrix, capella, eip4844 ] example: "bellatrix" data: oneOf: @@ -62,6 +62,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index abcb1976..96993e7a 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -59,6 +59,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index e0812350..d86ef047 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -311,7 +311,7 @@ components: Bellatrix.SignedBlindedBeaconBlock: $ref: './types/bellatrix/block.yaml#/Bellatrix/SignedBlindedBeaconBlock' ConsensusVersion: - enum: [phase0, altair, bellatrix, capella] + enum: [phase0, altair, bellatrix, capella, eip4844] example: "phase0" SignedValidatorRegistration: $ref: './types/registration.yaml#/SignedValidatorRegistration' @@ -325,6 +325,14 @@ components: $ref: './types/capella/block.yaml#/Capella/BlindedBeaconBlock' Capella.SignedBlindedBeaconBlock: $ref: './types/capella/block.yaml#/Capella/SignedBlindedBeaconBlock' + Eip4844.BeaconBlock: + $ref: './types/eip4844/block.yaml#/Eip4844/BeaconBlock' + Eip4844.SignedBeaconBlock: + $ref: './types/eip4844/block.yaml#/Eip4844/SignedBeaconBlock' + Eip4844.BlindedBeaconBlock: + $ref: './types/eip4844/block.yaml#/Eip4844/BlindedBeaconBlock' + Eip4844.SignedBlindedBeaconBlock: + $ref: './types/eip4844/block.yaml#/Eip4844/SignedBlindedBeaconBlock' Node: $ref: './types/fork_choice.yaml#/Node' ExtraData: diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml new file mode 100644 index 00000000..f0dfdd99 --- /dev/null +++ b/types/eip4844/block.yaml @@ -0,0 +1,95 @@ +Eip4844: + BeaconBlockBodyCommon: + # An abstract object to collect the common fields between the BeaconBlockBody and the BlindedBeaconBlockBody objects + type: object + description: "The [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblockbody) object from the CL EIP-4844 spec." + properties: + randao_reveal: + allOf: + - $ref: '../primitive.yaml#/Signature' + - description: "The RanDAO reveal value provided by the validator." + eth1_data: + $ref: '../eth1.yaml#/Eth1Data' + graffiti: + $ref: '../primitive.yaml#/Graffiti' + proposer_slashings: + type: array + items: + $ref: '../proposer_slashing.yaml#/ProposerSlashing' + attester_slashings: + type: array + items: + $ref: '../attester_slashing.yaml#/AttesterSlashing' + attestations: + type: array + items: + $ref: '../attestation.yaml#/Attestation' + deposits: + type: array + items: + $ref: '../deposit.yaml#/Deposit' + voluntary_exits: + type: array + items: + $ref: '../voluntary_exit.yaml#/SignedVoluntaryExit' + sync_aggregate: + $ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate' + blob_kzg_commitments: + $ref: '../primitive.yaml#/KZGCommitment' + + BeaconBlockBody: + allOf: + - $ref: '#/Eip4844/BeaconBlockBodyCommon' + - type: object + properties: + execution_payload: + $ref: './execution_payload.yaml#/Eip4844/ExecutionPayload' + bls_to_execution_changes: + type: array + items: + $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' + + BeaconBlock: + description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/Eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec." + allOf: + - $ref: './block.yaml#/Eip4844/BeaconBlockCommon' + - type: object + properties: + body: + $ref: '#/Eip4844/BeaconBlockBody' + + SignedBeaconBlock: + type: object + description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#signedbeaconblock) object envelope from the CL EIP-4844 spec." + properties: + message: + $ref: "#/Eip4844/BeaconBlock" + signature: + $ref: "../primitive.yaml#/Signature" + + BlindedBeaconBlockBody: + description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblockbody) object from the CL EIP-4844 spec, which contains a transactions root rather than a full transactions list." + allOf: + - $ref: '#/Eip4844/BeaconBlockBodyCommon' + - type: object + properties: + execution_payload_header: + $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' + + BlindedBeaconBlock: + description: "A variant of the the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`." + allOf: + - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' + - type: object + properties: + body: + $ref: '#/Eip4844/BlindedBeaconBlockBody' + + SignedBlindedBeaconBlock: + type: object + description: "A variant of the the the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#signedbeaconblock) object envelope from the CL EIP-4844 spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." + properties: + message: + $ref: "#/Eip4844/BlindedBeaconBlock" + signature: + $ref: "../primitive.yaml#/Signature" diff --git a/types/eip4844/execution_payload.yaml b/types/eip4844/execution_payload.yaml new file mode 100644 index 00000000..4eb9487a --- /dev/null +++ b/types/eip4844/execution_payload.yaml @@ -0,0 +1,56 @@ +Eip4844: + ExecutionPayloadCommon: + # An abstract object to collect the common fields between the ExecutionPayload and the ExecutionPayloadHeader objects. + type: object + description: "The [`ExecutionPayload`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#executionpayload) object from the CL EIP-4844 spec." + properties: + parent_hash: + $ref: '../primitive.yaml#/Root' + fee_recipient: + $ref: '../primitive.yaml#/ExecutionAddress' + state_root: + $ref: '../primitive.yaml#/Root' + receipts_root: + $ref: '../primitive.yaml#/Root' + logs_bloom: + $ref: '../primitive.yaml#/LogsBloom' + prev_randao: + $ref: '../primitive.yaml#/Bytes32' + block_number: + $ref: '../primitive.yaml#/Uint64' + gas_limit: + $ref: '../primitive.yaml#/Uint64' + gas_used: + $ref: '../primitive.yaml#/Uint64' + timestamp: + $ref: '../primitive.yaml#/Uint64' + extra_data: + $ref: '../primitive.yaml#/ExtraData' + base_fee_per_gas: + $ref: '../primitive.yaml#/Uint256' + excess_data_gas: + $ref: '../primitive.yaml#/Uint256' + block_hash: + $ref: '../primitive.yaml#/Root' + + + ExecutionPayload: + allOf: + - $ref: '#/Eip4844/ExecutionPayloadCommon' + - type: object + properties: + transactions: + $ref: './transactions.yaml#/Eip4844/Transactions' + withdrawals: + $ref: './withdrawals.yaml#/Eip4844/Withdrawals' + + ExecutionPayloadHeader: + description: "The [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#executionpayloadheader) object from the CL EIP-4844 spec." + allOf: + - $ref: '#/Eip4844/ExecutionPayloadCommon' + - type: object + properties: + transactions_root: + $ref: '../primitive.yaml#/Root' + withdrawals_root: + $ref: '../primitive.yaml#/Root' diff --git a/types/primitive.yaml b/types/primitive.yaml index 1dc9f876..5e71ac4a 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -122,3 +122,10 @@ LogsBloom: format: hex example: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" pattern: "^0x[a-fA-F0-9]{512}$" + +KZGCommitment: + type: string + format: hex + pattern: "^0x[a-fA-F0-9]{96}$" + description: "A G1 curve point. Same as BLS standard "is valid pubkey" check but also allows `0x00..00` for point-at-infinity" + example: "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" From 402e83055e11d06f574064217e5a199335f77771 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Wed, 30 Nov 2022 22:28:42 +1100 Subject: [PATCH 02/14] Add EIP-4844 BeaconState --- apis/debug/state.v2.yaml | 1 + beacon-node-oapi.yaml | 2 + types/eip4844/state.yaml | 93 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 types/eip4844/state.yaml diff --git a/apis/debug/state.v2.yaml b/apis/debug/state.v2.yaml index 417af137..0e00f0ad 100644 --- a/apis/debug/state.v2.yaml +++ b/apis/debug/state.v2.yaml @@ -37,6 +37,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BeaconState" application/octet-stream: schema: description: "SSZ serialized state bytes. Use Accept header to choose this response type" diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index d86ef047..788b1e27 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -325,6 +325,8 @@ components: $ref: './types/capella/block.yaml#/Capella/BlindedBeaconBlock' Capella.SignedBlindedBeaconBlock: $ref: './types/capella/block.yaml#/Capella/SignedBlindedBeaconBlock' + Eip4844.BeaconState: + $ref: './types/eip4844/state.yaml#/Eip4844/BeaconState' Eip4844.BeaconBlock: $ref: './types/eip4844/block.yaml#/Eip4844/BeaconBlock' Eip4844.SignedBeaconBlock: diff --git a/types/eip4844/state.yaml b/types/eip4844/state.yaml new file mode 100644 index 00000000..e7e0faa0 --- /dev/null +++ b/types/eip4844/state.yaml @@ -0,0 +1,93 @@ +Eip4844: + BeaconState: + type: object + description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconstate) object from the Eth2.0 EIP-4844 spec." + properties: + genesis_time: + $ref: "../primitive.yaml#/Uint64" + genesis_validators_root: + $ref: "../primitive.yaml#/Root" + slot: + $ref: "../primitive.yaml#/Uint64" + fork: + $ref: "../misc.yaml#/Fork" + latest_block_header: + $ref: "../block.yaml#/BeaconBlockHeader" + block_roots: + type: array + description: "Fixed length of 8192 items" + items: + $ref: '../primitive.yaml#/Root' + state_roots: + type: array + description: "Fixed length of 8192 items" + items: + $ref: '../primitive.yaml#/Root' + historical_roots: + type: array + description: "Variable length list, maximum 16777216 items" + items: + $ref: '../primitive.yaml#/Root' + eth1_data: + $ref: "../eth1.yaml#/Eth1Data" + eth1_data_votes: + type: array + description: "Fixed length of 1024 items" + items: + $ref: '../eth1.yaml#/Eth1Data' + maxItems: 1024 + eth1_deposit_index: + $ref: "../primitive.yaml#/Uint64" + validators: + type: array + description: "Variable length list, maximum 1099511627776 items" + items: + $ref: '../validator.yaml#/Validator' + balances: + type: array + description: "Validator balances in gwei. Variable length list, maximum 1099511627776 items" + items: + $ref: '../primitive.yaml#/Uint64' + randao_mixes: + type: array + description: "Fixed length of 65536 items" + items: + $ref: '../primitive.yaml#/Bytes32' + slashings: + type: array + description: "Per-epoch sums of slashed effective balances. Fixed length of 8192 items" + items: + $ref: '../primitive.yaml#/Uint64' + previous_epoch_participation: + $ref: '../altair/epoch_participation.yaml#/Altair/EpochParticipation' + current_epoch_participation: + $ref: '../altair/epoch_participation.yaml#/Altair/EpochParticipation' + justification_bits: + $ref: "../primitive.yaml#/BitList" + description: "Bit set for every recent justified epoch" + previous_justified_checkpoint: + $ref: "../misc.yaml#/Checkpoint" + current_justified_checkpoint: + $ref: "../misc.yaml#/Checkpoint" + finalized_checkpoint: + $ref: "../misc.yaml#/Checkpoint" + inactivity_scores: + description: "Per-validator inactivity scores. Introduced in Altair. Variable length list, maximum 1099511627776 items" + type: array + items: + $ref: "../primitive.yaml#/Uint64" + current_sync_committee: + $ref: "../altair/sync_committee.yaml#/Altair/SyncCommittee" + next_sync_committee: + $ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee' + latest_execution_payload_header: + $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' + withdrawal_queue: + type: array + description: "Withdrawals enqueued in state. Variable length list, maximum 1099511627776 items" + items: + $ref: '../withdrawal.yaml#/Withdrawal' + next_withdrawal_index: + $ref: "../primitive.yaml#/Uint64" + next_partial_withdrawal_validator_index: + $ref: "../primitive.yaml#/Uint64" From 4a847855913920c0ea45052a4050d9fa58abc968 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Wed, 30 Nov 2022 22:36:05 +1100 Subject: [PATCH 03/14] Align EIP-4844 beacon state with latest capella changes --- types/eip4844/state.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/types/eip4844/state.yaml b/types/eip4844/state.yaml index e7e0faa0..294b30c5 100644 --- a/types/eip4844/state.yaml +++ b/types/eip4844/state.yaml @@ -82,12 +82,7 @@ Eip4844: $ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee' latest_execution_payload_header: $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' - withdrawal_queue: - type: array - description: "Withdrawals enqueued in state. Variable length list, maximum 1099511627776 items" - items: - $ref: '../withdrawal.yaml#/Withdrawal' next_withdrawal_index: $ref: "../primitive.yaml#/Uint64" - next_partial_withdrawal_validator_index: + next_withdrawal_validator_index: $ref: "../primitive.yaml#/Uint64" From 9d614a50e1ba24c2be924a81950dd47404e3b695 Mon Sep 17 00:00:00 2001 From: 0xGabi Date: Wed, 30 Nov 2022 09:59:12 -0300 Subject: [PATCH 04/14] Add eip4844 enum option --- apis/beacon/blocks/blinded_block.yaml | 2 +- apis/beacon/blocks/block.v2.yaml | 2 +- apis/debug/state.v2.yaml | 2 +- apis/validator/block.v2.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/beacon/blocks/blinded_block.yaml b/apis/beacon/blocks/blinded_block.yaml index 84a7ac42..582acf93 100644 --- a/apis/beacon/blocks/blinded_block.yaml +++ b/apis/beacon/blocks/blinded_block.yaml @@ -25,7 +25,7 @@ get: properties: version: type: string - enum: [phase0, altair, bellatrix, capella] + enum: [phase0, altair, bellatrix, capella, eip4844] example: "phase0" execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/blocks/block.v2.yaml b/apis/beacon/blocks/block.v2.yaml index 62a6c6d1..81d6ef0c 100644 --- a/apis/beacon/blocks/block.v2.yaml +++ b/apis/beacon/blocks/block.v2.yaml @@ -25,7 +25,7 @@ get: properties: version: type: string - enum: [phase0, altair, bellatrix, capella] + enum: [phase0, altair, bellatrix, capella, eip4844] example: "phase0" execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/debug/state.v2.yaml b/apis/debug/state.v2.yaml index 0e00f0ad..0e368070 100644 --- a/apis/debug/state.v2.yaml +++ b/apis/debug/state.v2.yaml @@ -25,7 +25,7 @@ get: properties: version: type: string - enum: [ phase0, altair, bellatrix, capella ] + enum: [ phase0, altair, bellatrix, capella, eip4844 ] example: "phase0" execution_optimistic: $ref: "../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index 96993e7a..fd3b25fd 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -51,7 +51,7 @@ get: properties: version: type: string - enum: [ phase0, altair, bellatrix, capella ] + enum: [ phase0, altair, bellatrix, capella, eip4844 ] example: "phase0" data: oneOf: From 1fd5e68a5cf353f22de9a565b24331db5e963535 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 1 Dec 2022 00:08:22 +1100 Subject: [PATCH 05/14] Add missing escape character Co-authored-by: Gabi --- types/primitive.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/primitive.yaml b/types/primitive.yaml index 5e71ac4a..85334f5a 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -127,5 +127,5 @@ KZGCommitment: type: string format: hex pattern: "^0x[a-fA-F0-9]{96}$" - description: "A G1 curve point. Same as BLS standard "is valid pubkey" check but also allows `0x00..00` for point-at-infinity" + description: "A G1 curve point. Same as BLS standard \"is valid pubkey\" check but also allows `0x00..00` for point-at-infinity" example: "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" From bd403f963755669ce024f02656c849bafe321d04 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 1 Dec 2022 00:11:21 +1100 Subject: [PATCH 06/14] Update execution payload reference --- types/eip4844/execution_payload.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/eip4844/execution_payload.yaml b/types/eip4844/execution_payload.yaml index 4eb9487a..b1778584 100644 --- a/types/eip4844/execution_payload.yaml +++ b/types/eip4844/execution_payload.yaml @@ -40,9 +40,9 @@ Eip4844: - type: object properties: transactions: - $ref: './transactions.yaml#/Eip4844/Transactions' + $ref: '../capella/transactions.yaml#/Capella/Transactions' withdrawals: - $ref: './withdrawals.yaml#/Eip4844/Withdrawals' + $ref: '../capella/withdrawals.yaml#/Capella/Withdrawals' ExecutionPayloadHeader: description: "The [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#executionpayloadheader) object from the CL EIP-4844 spec." From d71b100933660758688deeb9291fe7081ac08938 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 1 Dec 2022 00:13:26 +1100 Subject: [PATCH 07/14] Fix blob_kzg_commitments type --- types/eip4844/block.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml index f0dfdd99..b3dfbe6f 100644 --- a/types/eip4844/block.yaml +++ b/types/eip4844/block.yaml @@ -35,7 +35,9 @@ Eip4844: sync_aggregate: $ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate' blob_kzg_commitments: - $ref: '../primitive.yaml#/KZGCommitment' + type: array + items: + $ref: '../primitive.yaml#/KZGCommitment' BeaconBlockBody: allOf: From 562279f8d58d8bf6852491f610eb73d4f828793c Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 1 Dec 2022 01:50:38 +1100 Subject: [PATCH 08/14] Fix incorrect ref --- types/eip4844/block.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml index b3dfbe6f..18ce6bf8 100644 --- a/types/eip4844/block.yaml +++ b/types/eip4844/block.yaml @@ -54,7 +54,7 @@ Eip4844: BeaconBlock: description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/Eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec." allOf: - - $ref: './block.yaml#/Eip4844/BeaconBlockCommon' + - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object properties: body: From 72408d5ca2d87d7c7cae5a888ec533dd1ae20368 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 1 Dec 2022 22:25:31 +1100 Subject: [PATCH 09/14] Add bls_to_execution_changes to 4844 BlindedBeaconBlockBody --- types/eip4844/block.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml index 18ce6bf8..5cba8d2c 100644 --- a/types/eip4844/block.yaml +++ b/types/eip4844/block.yaml @@ -77,6 +77,10 @@ Eip4844: properties: execution_payload_header: $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' + bls_to_execution_changes: + type: array + items: + $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BlindedBeaconBlock: description: "A variant of the the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`." From 5c752b3ebf0a6a76a1277ef3f64219255c3ca395 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Sat, 3 Dec 2022 01:54:43 +1100 Subject: [PATCH 10/14] Rename Eip4844 fork version to EIP4844 --- apis/beacon/blocks/blinded_block.yaml | 2 +- apis/beacon/blocks/blinded_blocks.yaml | 2 +- apis/beacon/blocks/block.v2.yaml | 2 +- apis/beacon/blocks/blocks.yaml | 2 +- apis/debug/state.v2.yaml | 2 +- apis/validator/blinded_block.yaml | 2 +- apis/validator/block.v2.yaml | 2 +- beacon-node-oapi.yaml | 20 ++++++++++---------- types/eip4844/block.yaml | 20 ++++++++++---------- types/eip4844/execution_payload.yaml | 6 +++--- types/eip4844/state.yaml | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/apis/beacon/blocks/blinded_block.yaml b/apis/beacon/blocks/blinded_block.yaml index 582acf93..7b321476 100644 --- a/apis/beacon/blocks/blinded_block.yaml +++ b/apis/beacon/blocks/blinded_block.yaml @@ -37,7 +37,7 @@ get: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBlindedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/EIP4844.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type" diff --git a/apis/beacon/blocks/blinded_blocks.yaml b/apis/beacon/blocks/blinded_blocks.yaml index 3fcc3ba8..7636f0a3 100644 --- a/apis/beacon/blocks/blinded_blocks.yaml +++ b/apis/beacon/blocks/blinded_blocks.yaml @@ -32,7 +32,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBlindedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/EIP4844.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/beacon/blocks/block.v2.yaml b/apis/beacon/blocks/block.v2.yaml index 81d6ef0c..a0d03478 100644 --- a/apis/beacon/blocks/block.v2.yaml +++ b/apis/beacon/blocks/block.v2.yaml @@ -37,7 +37,7 @@ get: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/EIP4844.SignedBeaconBlock" application/octet-stream: schema: diff --git a/apis/beacon/blocks/blocks.yaml b/apis/beacon/blocks/blocks.yaml index 4a88628a..dc84fa94 100644 --- a/apis/beacon/blocks/blocks.yaml +++ b/apis/beacon/blocks/blocks.yaml @@ -30,7 +30,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Eip4844.SignedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/EIP4844.SignedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/debug/state.v2.yaml b/apis/debug/state.v2.yaml index 0e368070..ecfad36e 100644 --- a/apis/debug/state.v2.yaml +++ b/apis/debug/state.v2.yaml @@ -37,7 +37,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BeaconState" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/EIP4844.BeaconState" application/octet-stream: schema: description: "SSZ serialized state bytes. Use Accept header to choose this response type" diff --git a/apis/validator/blinded_block.yaml b/apis/validator/blinded_block.yaml index ff398693..d846e499 100644 --- a/apis/validator/blinded_block.yaml +++ b/apis/validator/blinded_block.yaml @@ -62,7 +62,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BlindedBeaconBlock" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/EIP4844.BlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index fd3b25fd..91bf14a8 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -59,7 +59,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Eip4844.BeaconBlock" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/EIP4844.BeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 788b1e27..6854fa42 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -325,16 +325,16 @@ components: $ref: './types/capella/block.yaml#/Capella/BlindedBeaconBlock' Capella.SignedBlindedBeaconBlock: $ref: './types/capella/block.yaml#/Capella/SignedBlindedBeaconBlock' - Eip4844.BeaconState: - $ref: './types/eip4844/state.yaml#/Eip4844/BeaconState' - Eip4844.BeaconBlock: - $ref: './types/eip4844/block.yaml#/Eip4844/BeaconBlock' - Eip4844.SignedBeaconBlock: - $ref: './types/eip4844/block.yaml#/Eip4844/SignedBeaconBlock' - Eip4844.BlindedBeaconBlock: - $ref: './types/eip4844/block.yaml#/Eip4844/BlindedBeaconBlock' - Eip4844.SignedBlindedBeaconBlock: - $ref: './types/eip4844/block.yaml#/Eip4844/SignedBlindedBeaconBlock' + EIP4844.BeaconState: + $ref: './types/eip4844/state.yaml#/EIP4844/BeaconState' + EIP4844.BeaconBlock: + $ref: './types/eip4844/block.yaml#/EIP4844/BeaconBlock' + EIP4844.SignedBeaconBlock: + $ref: './types/eip4844/block.yaml#/EIP4844/SignedBeaconBlock' + EIP4844.BlindedBeaconBlock: + $ref: './types/eip4844/block.yaml#/EIP4844/BlindedBeaconBlock' + EIP4844.SignedBlindedBeaconBlock: + $ref: './types/eip4844/block.yaml#/EIP4844/SignedBlindedBeaconBlock' Node: $ref: './types/fork_choice.yaml#/Node' ExtraData: diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml index 5cba8d2c..a02ff212 100644 --- a/types/eip4844/block.yaml +++ b/types/eip4844/block.yaml @@ -1,4 +1,4 @@ -Eip4844: +EIP4844: BeaconBlockBodyCommon: # An abstract object to collect the common fields between the BeaconBlockBody and the BlindedBeaconBlockBody objects type: object @@ -41,42 +41,42 @@ Eip4844: BeaconBlockBody: allOf: - - $ref: '#/Eip4844/BeaconBlockBodyCommon' + - $ref: '#/EIP4844/BeaconBlockBodyCommon' - type: object properties: execution_payload: - $ref: './execution_payload.yaml#/Eip4844/ExecutionPayload' + $ref: './execution_payload.yaml#/EIP4844/ExecutionPayload' bls_to_execution_changes: type: array items: $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BeaconBlock: - description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/Eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec." + description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/EIP4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec." allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object properties: body: - $ref: '#/Eip4844/BeaconBlockBody' + $ref: '#/EIP4844/BeaconBlockBody' SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#signedbeaconblock) object envelope from the CL EIP-4844 spec." properties: message: - $ref: "#/Eip4844/BeaconBlock" + $ref: "#/EIP4844/BeaconBlock" signature: $ref: "../primitive.yaml#/Signature" BlindedBeaconBlockBody: description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblockbody) object from the CL EIP-4844 spec, which contains a transactions root rather than a full transactions list." allOf: - - $ref: '#/Eip4844/BeaconBlockBodyCommon' + - $ref: '#/EIP4844/BeaconBlockBodyCommon' - type: object properties: execution_payload_header: - $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' + $ref: './execution_payload.yaml#/EIP4844/ExecutionPayloadHeader' bls_to_execution_changes: type: array items: @@ -89,13 +89,13 @@ Eip4844: - type: object properties: body: - $ref: '#/Eip4844/BlindedBeaconBlockBody' + $ref: '#/EIP4844/BlindedBeaconBlockBody' SignedBlindedBeaconBlock: type: object description: "A variant of the the the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#signedbeaconblock) object envelope from the CL EIP-4844 spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." properties: message: - $ref: "#/Eip4844/BlindedBeaconBlock" + $ref: "#/EIP4844/BlindedBeaconBlock" signature: $ref: "../primitive.yaml#/Signature" diff --git a/types/eip4844/execution_payload.yaml b/types/eip4844/execution_payload.yaml index b1778584..8489d14c 100644 --- a/types/eip4844/execution_payload.yaml +++ b/types/eip4844/execution_payload.yaml @@ -1,4 +1,4 @@ -Eip4844: +EIP4844: ExecutionPayloadCommon: # An abstract object to collect the common fields between the ExecutionPayload and the ExecutionPayloadHeader objects. type: object @@ -36,7 +36,7 @@ Eip4844: ExecutionPayload: allOf: - - $ref: '#/Eip4844/ExecutionPayloadCommon' + - $ref: '#/EIP4844/ExecutionPayloadCommon' - type: object properties: transactions: @@ -47,7 +47,7 @@ Eip4844: ExecutionPayloadHeader: description: "The [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#executionpayloadheader) object from the CL EIP-4844 spec." allOf: - - $ref: '#/Eip4844/ExecutionPayloadCommon' + - $ref: '#/EIP4844/ExecutionPayloadCommon' - type: object properties: transactions_root: diff --git a/types/eip4844/state.yaml b/types/eip4844/state.yaml index 294b30c5..67d263f3 100644 --- a/types/eip4844/state.yaml +++ b/types/eip4844/state.yaml @@ -1,4 +1,4 @@ -Eip4844: +EIP4844: BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconstate) object from the Eth2.0 EIP-4844 spec." @@ -81,7 +81,7 @@ Eip4844: next_sync_committee: $ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee' latest_execution_payload_header: - $ref: './execution_payload.yaml#/Eip4844/ExecutionPayloadHeader' + $ref: './execution_payload.yaml#/EIP4844/ExecutionPayloadHeader' next_withdrawal_index: $ref: "../primitive.yaml#/Uint64" next_withdrawal_validator_index: From 0a0319a169a9e6d888aec4a19214d4ec2ec8a1ce Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 15 Dec 2022 09:13:25 +1100 Subject: [PATCH 11/14] Add SignedBeaconBlockAndBlobsSidecar schema --- types/eip4844/block_and_blobs_sidecar.yaml | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 types/eip4844/block_and_blobs_sidecar.yaml diff --git a/types/eip4844/block_and_blobs_sidecar.yaml b/types/eip4844/block_and_blobs_sidecar.yaml new file mode 100644 index 00000000..2f5c7c2b --- /dev/null +++ b/types/eip4844/block_and_blobs_sidecar.yaml @@ -0,0 +1,38 @@ +EIP4844: + SignedBeaconBlockAndBlobsSidecar: + type: object + description: "The `SignedBeaconBlockAndBlobsSidecar` object from the EIP-4844 CL spec." + properties: + beacon_block: + $ref: "./block.yaml#/EIP4844/SignedBeaconBlock" + blobs_sidecar: + $ref: "#/EIP4844/BlobsSidecar" + + BlobsSidecar: + type: object + description: "The `BlobsSidecar` object from the EIP-4844 CL spec." + properties: + beacon_block_root: + $ref: "../types/primitive.yaml#/Root" + beacon_block_slot: + $ref: "../types/primitive.yaml#/Uint64" + blobs: + type: array + maxItems: 16 + minItems: 0 + items: + $ref: "#/EIP4844/Blob" + kzg_aggregated_proof: + $ref: "#/EIP4844/KZGProof" + + KZGProof: + type: string + format: hex + pattern: "^0x[a-fA-F0-9]{96}$" + description: "An aggregated KZG proof. Same check as `KZGCommitment`" + + Blob: + type: string + format: hex + pattern: "^0x[a-fA-F0-9]{262144}$" + description: "A blob is `FIELD_ELEMENTS_PER_BLOB * size_of(BLSFieldElement) = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded Blob as defined in EIP-4844" From 1f177adb67155f63d56fa5f6fcdd1e10a473694f Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 15 Dec 2022 19:43:11 +1100 Subject: [PATCH 12/14] fix incorrect references --- types/bellatrix/execution_payload.yaml | 1 + types/capella/execution_payload.yaml | 1 + types/eip4844/block_and_blobs_sidecar.yaml | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/bellatrix/execution_payload.yaml b/types/bellatrix/execution_payload.yaml index 1ed63ac6..f182a0c0 100644 --- a/types/bellatrix/execution_payload.yaml +++ b/types/bellatrix/execution_payload.yaml @@ -45,6 +45,7 @@ Bellatrix: allOf: - $ref: '#/Bellatrix/ExecutionPayloadCommon' - type: object + additionalProperties: false properties: transactions_root: $ref: '../primitive.yaml#/Root' diff --git a/types/capella/execution_payload.yaml b/types/capella/execution_payload.yaml index 3f543156..0fc85465 100644 --- a/types/capella/execution_payload.yaml +++ b/types/capella/execution_payload.yaml @@ -47,6 +47,7 @@ Capella: allOf: - $ref: '#/Capella/ExecutionPayloadCommon' - type: object + additionalProperties: false properties: transactions_root: $ref: '../primitive.yaml#/Root' diff --git a/types/eip4844/block_and_blobs_sidecar.yaml b/types/eip4844/block_and_blobs_sidecar.yaml index 2f5c7c2b..2ea5b87d 100644 --- a/types/eip4844/block_and_blobs_sidecar.yaml +++ b/types/eip4844/block_and_blobs_sidecar.yaml @@ -13,9 +13,9 @@ EIP4844: description: "The `BlobsSidecar` object from the EIP-4844 CL spec." properties: beacon_block_root: - $ref: "../types/primitive.yaml#/Root" + $ref: "../primitive.yaml#/Root" beacon_block_slot: - $ref: "../types/primitive.yaml#/Uint64" + $ref: "../primitive.yaml#/Uint64" blobs: type: array maxItems: 16 From 77907ea6db2a50bbf6efd44a6b15ea19c2a3b521 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Fri, 16 Dec 2022 13:30:20 +1100 Subject: [PATCH 13/14] Remove SignedBeaconBlockAndBlobsSidecar and update MAX_BLOBS_PER_BLOCK to 4 --- types/eip4844/block_and_blobs_sidecar.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/types/eip4844/block_and_blobs_sidecar.yaml b/types/eip4844/block_and_blobs_sidecar.yaml index 2ea5b87d..b65d24d2 100644 --- a/types/eip4844/block_and_blobs_sidecar.yaml +++ b/types/eip4844/block_and_blobs_sidecar.yaml @@ -1,13 +1,4 @@ EIP4844: - SignedBeaconBlockAndBlobsSidecar: - type: object - description: "The `SignedBeaconBlockAndBlobsSidecar` object from the EIP-4844 CL spec." - properties: - beacon_block: - $ref: "./block.yaml#/EIP4844/SignedBeaconBlock" - blobs_sidecar: - $ref: "#/EIP4844/BlobsSidecar" - BlobsSidecar: type: object description: "The `BlobsSidecar` object from the EIP-4844 CL spec." @@ -18,7 +9,7 @@ EIP4844: $ref: "../primitive.yaml#/Uint64" blobs: type: array - maxItems: 16 + maxItems: 4 minItems: 0 items: $ref: "#/EIP4844/Blob" From ba8db2d17bf6564387c08b3100b435ccb5b801c2 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Sun, 18 Dec 2022 11:56:43 +1100 Subject: [PATCH 14/14] Move `bls_to_execution_changes` to `BeaconBlockBodyCommon` --- types/capella/block.yaml | 12 ++++-------- types/eip4844/block.yaml | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/types/capella/block.yaml b/types/capella/block.yaml index d872b828..127f0de7 100644 --- a/types/capella/block.yaml +++ b/types/capella/block.yaml @@ -34,6 +34,10 @@ Capella: $ref: '../voluntary_exit.yaml#/SignedVoluntaryExit' sync_aggregate: $ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate' + bls_to_execution_changes: + type: array + items: + $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BeaconBlockBody: allOf: @@ -42,10 +46,6 @@ Capella: properties: execution_payload: $ref: './execution_payload.yaml#/Capella/ExecutionPayload' - bls_to_execution_changes: - type: array - items: - $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BeaconBlock: description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/Capella/beacon-chain.md#beaconblock) object from the CL Capella spec." @@ -73,10 +73,6 @@ Capella: properties: execution_payload_header: $ref: './execution_payload.yaml#/Capella/ExecutionPayloadHeader' - bls_to_execution_changes: - type: array - items: - $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BlindedBeaconBlock: description: "A variant of the the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#beaconblock) object from the CL Capella spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`." diff --git a/types/eip4844/block.yaml b/types/eip4844/block.yaml index a02ff212..e6d1c33d 100644 --- a/types/eip4844/block.yaml +++ b/types/eip4844/block.yaml @@ -34,6 +34,10 @@ EIP4844: $ref: '../voluntary_exit.yaml#/SignedVoluntaryExit' sync_aggregate: $ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate' + bls_to_execution_changes: + type: array + items: + $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' blob_kzg_commitments: type: array items: @@ -46,10 +50,6 @@ EIP4844: properties: execution_payload: $ref: './execution_payload.yaml#/EIP4844/ExecutionPayload' - bls_to_execution_changes: - type: array - items: - $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BeaconBlock: description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/EIP4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec." @@ -77,10 +77,6 @@ EIP4844: properties: execution_payload_header: $ref: './execution_payload.yaml#/EIP4844/ExecutionPayloadHeader' - bls_to_execution_changes: - type: array - items: - $ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' BlindedBeaconBlock: description: "A variant of the the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/eip4844/beacon-chain.md#beaconblock) object from the CL EIP-4844 spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`."