-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Electra block and state objects from CL spec (#469)
- Loading branch information
Showing
20 changed files
with
397 additions
and
11 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
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,108 @@ | ||
Electra: | ||
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/v1.5.0-alpha.5/specs/electra/beacon-chain.md#beaconblockbody) object from the CL Electra spec." | ||
required: [randao_reveal, eth1_data, graffiti, proposer_slashings, attester_slashings, attestations, deposits, voluntary_exits, sync_aggregate, bls_to_execution_changes, blob_kzg_commitments] | ||
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#/Electra/AttesterSlashing" | ||
attestations: | ||
type: array | ||
items: | ||
$ref: "./attestation.yaml#/Electra/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: "#/Electra/BeaconBlockBodyCommon" | ||
- type: object | ||
required: [execution_payload, execution_requests] | ||
properties: | ||
execution_payload: | ||
$ref: "../deneb/execution_payload.yaml#/Deneb/ExecutionPayload" | ||
execution_requests: | ||
$ref: "./execution_requests.yaml#/Electra/ExecutionRequests" | ||
|
||
BeaconBlock: | ||
description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/phase0/beacon-chain.md#beaconblock) object from the CL Electra spec." | ||
allOf: | ||
- $ref: "../altair/block.yaml#/Altair/BeaconBlockCommon" | ||
- type: object | ||
required: [body] | ||
properties: | ||
body: | ||
$ref: "#/Electra/BeaconBlockBody" | ||
|
||
SignedBeaconBlock: | ||
type: object | ||
description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Electra spec." | ||
required: [message, signature] | ||
properties: | ||
message: | ||
$ref: "#/Electra/BeaconBlock" | ||
signature: | ||
$ref: "../primitive.yaml#/Signature" | ||
|
||
BlindedBeaconBlockBody: | ||
description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/electra/beacon-chain.md#beaconblockbody) object from the CL Electra spec, which contains a transactions root rather than a full transactions list." | ||
allOf: | ||
- $ref: "#/Electra/BeaconBlockBodyCommon" | ||
- type: object | ||
required: [execution_payload_header, execution_requests_root] | ||
properties: | ||
execution_payload_header: | ||
$ref: "../deneb/execution_payload.yaml#/Deneb/ExecutionPayloadHeader" | ||
execution_requests_root: | ||
$ref: "../primitive.yaml#/Root" | ||
|
||
BlindedBeaconBlock: | ||
description: "A variant of the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/phase0/beacon-chain.md#beaconblock) object from the CL Electra spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`." | ||
allOf: | ||
- $ref: "../altair/block.yaml#/Altair/BeaconBlockCommon" | ||
- type: object | ||
required: [body] | ||
properties: | ||
body: | ||
$ref: "#/Electra/BlindedBeaconBlockBody" | ||
|
||
SignedBlindedBeaconBlock: | ||
type: object | ||
description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Electra spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." | ||
required: [message, signature] | ||
properties: | ||
message: | ||
$ref: "#/Electra/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,24 @@ | ||
Electra: | ||
BlockContents: | ||
type: object | ||
description: "The required object for block production according to the Electra CL spec." | ||
required: [block, kzg_proofs, blobs] | ||
properties: | ||
block: | ||
$ref: "./block.yaml#/Electra/BeaconBlock" | ||
kzg_proofs: | ||
$ref: "../deneb/block_contents.yaml#/Deneb/KZGProofs" | ||
blobs: | ||
$ref: "../deneb/block_contents.yaml#/Deneb/Blobs" | ||
|
||
SignedBlockContents: | ||
type: object | ||
description: "The required signed components of block production according to the Electra CL spec." | ||
required: [signed_block, kzg_proofs, blobs] | ||
properties: | ||
signed_block: | ||
$ref: "./block.yaml#/Electra/SignedBeaconBlock" | ||
kzg_proofs: | ||
$ref: "../deneb/block_contents.yaml#/Deneb/KZGProofs" | ||
blobs: | ||
$ref: "../deneb/block_contents.yaml#/Deneb/Blobs" |
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,27 @@ | ||
Electra: | ||
ConsolidationRequest: | ||
type: object | ||
description: "The [`ConsolidationRequest`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/electra/beacon-chain.md#consolidationrequest) object from the CL Electra spec." | ||
required: [source_address, source_pubkey, target_pubkey] | ||
properties: | ||
source_address: | ||
$ref: "../primitive.yaml#/ExecutionAddress" | ||
description: "Execution address which sent the request." | ||
source_pubkey: | ||
$ref: "../primitive.yaml#/Pubkey" | ||
description: "BLS public key of validator to consolidate from." | ||
target_pubkey: | ||
$ref: "../primitive.yaml#/Pubkey" | ||
description: "BLS public key of validator to consolidate to." | ||
|
||
PendingConsolidation: | ||
type: object | ||
description: "The [`PendingConsolidation`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/electra/beacon-chain.md#pendingconsolidation) object from the CL Electra spec." | ||
required: [source_index, target_index] | ||
properties: | ||
source_index: | ||
$ref: "../primitive.yaml#/Uint64" | ||
description: "Index of validator to consolidate from." | ||
target_index: | ||
$ref: "../primitive.yaml#/Uint64" | ||
description: "Index of validator to consolidate to." |
Oops, something went wrong.