-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update types to support EIP-4844 (#271)
Co-authored-by: 0xGabi <[email protected]> Co-authored-by: Paul Harris <[email protected]>
- Loading branch information
1 parent
5531223
commit 5502da1
Showing
16 changed files
with
306 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
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' | ||
bls_to_execution_changes: | ||
type: array | ||
items: | ||
$ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange' | ||
blob_kzg_commitments: | ||
type: array | ||
items: | ||
$ref: '../primitive.yaml#/KZGCommitment' | ||
|
||
BeaconBlockBody: | ||
allOf: | ||
- $ref: '#/EIP4844/BeaconBlockBodyCommon' | ||
- type: object | ||
properties: | ||
execution_payload: | ||
$ref: './execution_payload.yaml#/EIP4844/ExecutionPayload' | ||
|
||
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: '../altair/block.yaml#/Altair/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
EIP4844: | ||
BlobsSidecar: | ||
type: object | ||
description: "The `BlobsSidecar` object from the EIP-4844 CL spec." | ||
properties: | ||
beacon_block_root: | ||
$ref: "../primitive.yaml#/Root" | ||
beacon_block_slot: | ||
$ref: "../primitive.yaml#/Uint64" | ||
blobs: | ||
type: array | ||
maxItems: 4 | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: '../capella/transactions.yaml#/Capella/Transactions' | ||
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." | ||
allOf: | ||
- $ref: '#/EIP4844/ExecutionPayloadCommon' | ||
- type: object | ||
properties: | ||
transactions_root: | ||
$ref: '../primitive.yaml#/Root' | ||
withdrawals_root: | ||
$ref: '../primitive.yaml#/Root' |
Oops, something went wrong.