-
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 capella types and endpoints. (#248)
- Loading branch information
Showing
17 changed files
with
378 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
get: | ||
operationId: getPoolBLSToExecutionChanges | ||
summary: Get SignedBLSToExecutionChange from operations pool | ||
description: Retrieves BLS to execution changes known by the node but not necessarily incorporated into any block | ||
tags: | ||
- Beacon | ||
responses: | ||
"200": | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
title: GetPoolBLSToExecutionChangesResponse | ||
type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/SignedBLSToExecutionChange' | ||
"500": | ||
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' | ||
|
||
post: | ||
operationId: submitPoolBLSToExecutionChange | ||
summary: Submit SignedBLSToExecutionChange object to node's pool | ||
description: Submits SignedBLSToExecutionChange object to node's pool and if passes validation node MUST broadcast it to network. | ||
tags: | ||
- Beacon | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/SignedBLSToExecutionChange' | ||
responses: | ||
"200": | ||
description: BLS to execution change is stored in node and broadcasted to network | ||
"400": | ||
description: "Invalid BLS to execution change" | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
example: | ||
code: 400 | ||
message: "Invalid BLS to execution change, it will never pass validation so it's rejected" | ||
"500": | ||
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError' |
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,23 @@ | ||
BLSToExecutionChange: | ||
type: object | ||
description: "The [`BLSToExecutionChange`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#blstoexecutionchange) object from the CL spec." | ||
properties: | ||
validator_index: | ||
$ref: "./primitive.yaml#/Uint64" | ||
description: "Index of the validator for which credentials will be changed." | ||
from_bls_pubkey: | ||
$ref: "./primitive.yaml#/Pubkey" | ||
description: "Public key of existing credentials." | ||
to_execution_address: | ||
$ref: "./primitive.yaml#/ExecutionAddress" | ||
description: "Execution address to which the credentials will be changed." | ||
|
||
SignedBLSToExecutionChange: | ||
type: object | ||
description: "The [`SignedBLSToExecutionChange`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#signedblstoexecutionchange) object from the CL spec." | ||
properties: | ||
message: | ||
$ref: "#/BLSToExecutionChange" | ||
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,93 @@ | ||
Capella: | ||
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/capella/beacon-chain.md#beaconblockbody) object from the CL Capella 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' | ||
|
||
BeaconBlockBody: | ||
allOf: | ||
- $ref: '#/Capella/BeaconBlockBodyCommon' | ||
- type: object | ||
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." | ||
allOf: | ||
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' | ||
- type: object | ||
properties: | ||
body: | ||
$ref: '#/Capella/BeaconBlockBody' | ||
|
||
SignedBeaconBlock: | ||
type: object | ||
description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#signedbeaconblock) object envelope from the CL Capella spec." | ||
properties: | ||
message: | ||
$ref: "#/Capella/BeaconBlock" | ||
signature: | ||
$ref: "../primitive.yaml#/Signature" | ||
|
||
BlindedBeaconBlockBody: | ||
description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#beaconblockbody) object from the CL Capella spec, which contains a transactions root rather than a full transactions list." | ||
allOf: | ||
- $ref: '#/Capella/BeaconBlockBodyCommon' | ||
- type: object | ||
properties: | ||
execution_payload_header: | ||
$ref: './execution_payload.yaml#/Capella/ExecutionPayloadHeader' | ||
|
||
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`." | ||
allOf: | ||
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' | ||
- type: object | ||
properties: | ||
body: | ||
$ref: '#/Capella/BlindedBeaconBlockBody' | ||
|
||
SignedBlindedBeaconBlock: | ||
type: object | ||
description: "A variant of the the the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#signedbeaconblock) object envelope from the CL Capella spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." | ||
properties: | ||
message: | ||
$ref: "#/Capella/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,54 @@ | ||
Capella: | ||
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/capella/beacon-chain.md#executionpayload) object from the CL Capella 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' | ||
block_hash: | ||
$ref: '../primitive.yaml#/Root' | ||
|
||
|
||
ExecutionPayload: | ||
allOf: | ||
- $ref: '#/Capella/ExecutionPayloadCommon' | ||
- type: object | ||
properties: | ||
transactions: | ||
$ref: './transactions.yaml#/Capella/Transactions' | ||
withdrawals: | ||
$ref: './withdrawals.yaml#/Capella/Withdrawals' | ||
|
||
ExecutionPayloadHeader: | ||
description: "The [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/master/specs/capella/beacon-chain.md#executionpayloadheader) object from the CL Capella spec." | ||
allOf: | ||
- $ref: '#/Capella/ExecutionPayloadCommon' | ||
- type: object | ||
properties: | ||
transactions_root: | ||
$ref: '../primitive.yaml#/Root' | ||
withdrawals_root: | ||
$ref: '../primitive.yaml#/Root' |
Oops, something went wrong.