-
Notifications
You must be signed in to change notification settings - Fork 221
Update types to support EIP-4844 #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b947b49
Update types to support EIP-4844
jimmygchen 402e830
Add EIP-4844 BeaconState
jimmygchen 4a84785
Align EIP-4844 beacon state with latest capella changes
jimmygchen 9d614a5
Add eip4844 enum option
0xGabi 1fd5e68
Add missing escape character
jimmygchen 998b3d0
Merge pull request #1 from 0xGabi/eip4844-enum
jimmygchen bd403f9
Update execution payload reference
jimmygchen bd55821
Merge branch 'master' of github.com:jimmygchen/beacon-APIs
jimmygchen d71b100
Fix blob_kzg_commitments type
jimmygchen 562279f
Fix incorrect ref
jimmygchen cc95726
Merge branch 'master' into master
jimmygchen b7ff691
Merge branch 'master' into master
jimmygchen 72408d5
Add bls_to_execution_changes to 4844 BlindedBeaconBlockBody
jimmygchen 5c752b3
Rename Eip4844 fork version to EIP4844
jimmygchen 796a860
Merge branch 'master' into master
rolfyone ba6f77f
Merge branch 'master' into master
jimmygchen 0a0319a
Add SignedBeaconBlockAndBlobsSidecar schema
jimmygchen 1f177ad
fix incorrect references
jimmygchen 645ec5e
Merge branch 'master' into master
jimmygchen 77907ea
Remove SignedBeaconBlockAndBlobsSidecar and update MAX_BLOBS_PER_BLOC…
jimmygchen ba8db2d
Move `bls_to_execution_changes` to `BeaconBlockBodyCommon`
jimmygchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.