From aca52c91c21267599e4a9152296202cc42ead97b Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Sun, 14 Jan 2024 21:38:23 +0100 Subject: [PATCH 1/6] Add required field to object and request body definitions (#399) * Add required properties to object types * Add required field to request bodies --------- Co-authored-by: Paul Harris --- apis/beacon/blob_sidecars/blob_sidecars.yaml | 1 + apis/beacon/blocks/attestations.yaml | 1 + apis/beacon/blocks/blinded_block.yaml | 1 + apis/beacon/blocks/block.v2.yaml | 1 + apis/beacon/blocks/block.yaml | 1 + apis/beacon/blocks/header.yaml | 2 ++ apis/beacon/blocks/headers.yaml | 2 ++ apis/beacon/blocks/root.yaml | 2 ++ apis/beacon/deposit_snapshot.yaml | 1 + apis/beacon/genesis.yaml | 2 ++ apis/beacon/light_client/bootstrap.yaml | 1 + apis/beacon/light_client/finality_update.yaml | 1 + apis/beacon/light_client/optimistic_update.yaml | 1 + apis/beacon/light_client/updates.yaml | 1 + apis/beacon/pool/attestations.yaml | 1 + apis/beacon/pool/attester_slashings.yaml | 1 + apis/beacon/pool/bls_to_execution_changes.yaml | 1 + apis/beacon/pool/proposer_slashings.yaml | 1 + apis/beacon/pool/voluntary_exists.yaml | 1 + apis/beacon/rewards/attestations.yaml | 1 + apis/beacon/rewards/blocks.yaml | 1 + apis/beacon/rewards/sync_committee.yaml | 1 + apis/beacon/states/committee.yaml | 1 + apis/beacon/states/finality_checkpoints.yaml | 2 ++ apis/beacon/states/fork.yaml | 1 + apis/beacon/states/randao.yaml | 2 ++ apis/beacon/states/root.yaml | 2 ++ apis/beacon/states/sync_committees.yaml | 1 + apis/beacon/states/validator.yaml | 1 + apis/beacon/states/validator_balances.yaml | 2 ++ apis/beacon/states/validators.yaml | 2 ++ apis/builder/states/expected_withdrawals.yaml | 1 + apis/config/deposit_contract.yaml | 2 ++ apis/config/fork_schedule.yaml | 1 + apis/config/spec.yaml | 1 + apis/debug/heads.v2.yaml | 2 ++ apis/debug/state.v2.yaml | 1 + apis/node/identity.yaml | 1 + apis/node/peer.yaml | 1 + apis/node/peer_count.yaml | 2 ++ apis/node/peers.yaml | 2 ++ apis/node/syncing.yaml | 2 ++ apis/node/version.yaml | 2 ++ apis/validator/aggregate_and_proofs.yaml | 1 + apis/validator/aggregate_attestation.yaml | 1 + apis/validator/attestation_data.yaml | 1 + apis/validator/beacon_committee_selections.yaml | 2 ++ apis/validator/beacon_committee_subscriptions.yaml | 2 ++ apis/validator/blinded_block.yaml | 1 + apis/validator/block.v2.yaml | 1 + apis/validator/block.v3.yaml | 1 + apis/validator/duties/attester.yaml | 1 + apis/validator/duties/proposer.yaml | 1 + apis/validator/duties/sync.yaml | 1 + apis/validator/liveness.yaml | 2 ++ apis/validator/prepare_beacon_proposer.yaml | 2 ++ apis/validator/register_validator.yaml | 1 + apis/validator/sync_committee_contribution.yaml | 1 + .../validator/sync_committee_contribution_and_proof.yaml | 1 + apis/validator/sync_committee_selections.yaml | 2 ++ apis/validator/sync_committee_subscriptions.yaml | 1 + types/altair/block.yaml | 4 ++++ types/altair/light_client.yaml | 5 +++++ types/altair/state.yaml | 1 + types/altair/sync_aggregate.yaml | 1 + types/altair/sync_committee.yaml | 7 +++++++ types/api.yaml | 4 ++++ types/attestation.yaml | 3 +++ types/attester_slashing.yaml | 1 + types/bellatrix/block.yaml | 7 +++++++ types/bellatrix/execution_payload.yaml | 3 +++ types/bellatrix/state.yaml | 1 + types/block.yaml | 6 ++++++ types/bls_to_execution_change.yaml | 2 ++ types/capella/block.yaml | 7 +++++++ types/capella/execution_payload.yaml | 3 +++ types/capella/historical_summary.yaml | 1 + types/capella/light_client.yaml | 5 +++++ types/capella/state.yaml | 1 + types/deneb/blob_sidecar.yaml | 1 + types/deneb/block.yaml | 7 +++++++ types/deneb/block_contents.yaml | 2 ++ types/deneb/execution_payload.yaml | 3 +++ types/deneb/state.yaml | 1 + types/deposit.yaml | 2 ++ types/eth1.yaml | 1 + types/fork_choice.yaml | 1 + types/http.yaml | 9 +++++++++ types/misc.yaml | 2 ++ types/p2p.yaml | 4 +++- types/proposer_slashing.yaml | 1 + types/registration.yaml | 2 ++ types/rewards.yaml | 9 +++++---- types/selection.yaml | 2 ++ types/state.yaml | 1 + types/validator.yaml | 7 +++++++ types/voluntary_exit.yaml | 2 ++ types/withdrawal.yaml | 1 + 98 files changed, 196 insertions(+), 5 deletions(-) diff --git a/apis/beacon/blob_sidecars/blob_sidecars.yaml b/apis/beacon/blob_sidecars/blob_sidecars.yaml index a527b8ad..bd1e0110 100644 --- a/apis/beacon/blob_sidecars/blob_sidecars.yaml +++ b/apis/beacon/blob_sidecars/blob_sidecars.yaml @@ -31,6 +31,7 @@ get: schema: title: GetBlobSidecarsResponse type: object + required: [data] properties: data: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlobSidecars" diff --git a/apis/beacon/blocks/attestations.yaml b/apis/beacon/blocks/attestations.yaml index cd7946a7..420c33c9 100644 --- a/apis/beacon/blocks/attestations.yaml +++ b/apis/beacon/blocks/attestations.yaml @@ -18,6 +18,7 @@ get: schema: title: GetBlockAttestationsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/blocks/blinded_block.yaml b/apis/beacon/blocks/blinded_block.yaml index 1bdfae9f..2e9bd225 100644 --- a/apis/beacon/blocks/blinded_block.yaml +++ b/apis/beacon/blocks/blinded_block.yaml @@ -22,6 +22,7 @@ get: schema: title: GetBlindedBlockResponse type: object + required: [version, execution_optimistic, finalized, data] properties: version: type: string diff --git a/apis/beacon/blocks/block.v2.yaml b/apis/beacon/blocks/block.v2.yaml index a6aec89d..5f4645a3 100644 --- a/apis/beacon/blocks/block.v2.yaml +++ b/apis/beacon/blocks/block.v2.yaml @@ -22,6 +22,7 @@ get: schema: title: GetBlockV2Response type: object + required: [version, execution_optimistic, finalized, data] properties: version: type: string diff --git a/apis/beacon/blocks/block.yaml b/apis/beacon/blocks/block.yaml index ac673b06..8ac4c768 100644 --- a/apis/beacon/blocks/block.yaml +++ b/apis/beacon/blocks/block.yaml @@ -26,6 +26,7 @@ get: schema: title: GetBlockResponse type: object + required: [data] properties: data: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/SignedBeaconBlock" diff --git a/apis/beacon/blocks/header.yaml b/apis/beacon/blocks/header.yaml index e62d6be0..8d36d25a 100644 --- a/apis/beacon/blocks/header.yaml +++ b/apis/beacon/blocks/header.yaml @@ -17,6 +17,7 @@ get: schema: title: GetBlockHeaderResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -24,6 +25,7 @@ get: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: type: object + required: [root, canonical, header] properties: root: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root" diff --git a/apis/beacon/blocks/headers.yaml b/apis/beacon/blocks/headers.yaml index d913189e..dc43e2ae 100644 --- a/apis/beacon/blocks/headers.yaml +++ b/apis/beacon/blocks/headers.yaml @@ -28,6 +28,7 @@ get: schema: title: GetBlockHeadersResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -37,6 +38,7 @@ get: type: array items: type: object + required: [root, canonical, header] properties: root: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Root" diff --git a/apis/beacon/blocks/root.yaml b/apis/beacon/blocks/root.yaml index e3a08d83..8d5683b9 100644 --- a/apis/beacon/blocks/root.yaml +++ b/apis/beacon/blocks/root.yaml @@ -23,6 +23,7 @@ get: schema: type: object title: GetBlockRootResponse + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -30,6 +31,7 @@ get: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: type: object + required: [root] properties: root: allOf: diff --git a/apis/beacon/deposit_snapshot.yaml b/apis/beacon/deposit_snapshot.yaml index 0951a63f..15a3444f 100644 --- a/apis/beacon/deposit_snapshot.yaml +++ b/apis/beacon/deposit_snapshot.yaml @@ -14,6 +14,7 @@ schema: type: object title: GetDepositSnapshotResponse + required: [data] properties: data: $ref: '../../beacon-node-oapi.yaml#/components/schemas/DepositSnapshotResponse' diff --git a/apis/beacon/genesis.yaml b/apis/beacon/genesis.yaml index e1d6bea0..6687020c 100644 --- a/apis/beacon/genesis.yaml +++ b/apis/beacon/genesis.yaml @@ -13,9 +13,11 @@ schema: type: object title: GetGenesisResponse + required: [data] properties: data: type: object + required: [genesis_time, genesis_validators_root, genesis_fork_version] properties: genesis_time: $ref: '../../beacon-node-oapi.yaml#/components/schemas/GenesisTime' diff --git a/apis/beacon/light_client/bootstrap.yaml b/apis/beacon/light_client/bootstrap.yaml index 7df74520..faa32591 100644 --- a/apis/beacon/light_client/bootstrap.yaml +++ b/apis/beacon/light_client/bootstrap.yaml @@ -24,6 +24,7 @@ get: schema: title: GetLightClientBootstrapResponse type: object + required: [version, data] properties: version: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion' diff --git a/apis/beacon/light_client/finality_update.yaml b/apis/beacon/light_client/finality_update.yaml index 876fd10c..95c229e5 100644 --- a/apis/beacon/light_client/finality_update.yaml +++ b/apis/beacon/light_client/finality_update.yaml @@ -19,6 +19,7 @@ get: schema: title: GetLightClientFinalityUpdateResponse type: object + required: [version, data] properties: version: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion' diff --git a/apis/beacon/light_client/optimistic_update.yaml b/apis/beacon/light_client/optimistic_update.yaml index 10210e14..c3cb96a8 100644 --- a/apis/beacon/light_client/optimistic_update.yaml +++ b/apis/beacon/light_client/optimistic_update.yaml @@ -19,6 +19,7 @@ get: schema: title: GetLightClientOptimisticUpdateResponse type: object + required: [version, data] properties: version: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion' diff --git a/apis/beacon/light_client/updates.yaml b/apis/beacon/light_client/updates.yaml index bcb86022..27f72e4e 100644 --- a/apis/beacon/light_client/updates.yaml +++ b/apis/beacon/light_client/updates.yaml @@ -29,6 +29,7 @@ get: type: array items: type: object + required: [version, data] properties: version: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion' diff --git a/apis/beacon/pool/attestations.yaml b/apis/beacon/pool/attestations.yaml index 7f4f60ab..b3107dff 100644 --- a/apis/beacon/pool/attestations.yaml +++ b/apis/beacon/pool/attestations.yaml @@ -23,6 +23,7 @@ get: schema: title: GetPoolAttestationsResponse type: object + required: [data] properties: data: type: array diff --git a/apis/beacon/pool/attester_slashings.yaml b/apis/beacon/pool/attester_slashings.yaml index c48daa33..08c4c41e 100644 --- a/apis/beacon/pool/attester_slashings.yaml +++ b/apis/beacon/pool/attester_slashings.yaml @@ -12,6 +12,7 @@ get: schema: title: GetPoolAttesterSlashingsResponse type: object + required: [data] properties: data: type: array diff --git a/apis/beacon/pool/bls_to_execution_changes.yaml b/apis/beacon/pool/bls_to_execution_changes.yaml index 56bd4d49..5d7514e0 100644 --- a/apis/beacon/pool/bls_to_execution_changes.yaml +++ b/apis/beacon/pool/bls_to_execution_changes.yaml @@ -12,6 +12,7 @@ get: schema: title: GetPoolBLSToExecutionChangesResponse type: object + required: [data] properties: data: type: array diff --git a/apis/beacon/pool/proposer_slashings.yaml b/apis/beacon/pool/proposer_slashings.yaml index 46611603..7f08b83f 100644 --- a/apis/beacon/pool/proposer_slashings.yaml +++ b/apis/beacon/pool/proposer_slashings.yaml @@ -12,6 +12,7 @@ get: schema: title: GetPoolProposerSlashingsResponse type: object + required: [data] properties: data: type: array diff --git a/apis/beacon/pool/voluntary_exists.yaml b/apis/beacon/pool/voluntary_exists.yaml index 82ff6dfd..ac4e4574 100644 --- a/apis/beacon/pool/voluntary_exists.yaml +++ b/apis/beacon/pool/voluntary_exists.yaml @@ -12,6 +12,7 @@ get: schema: title: GetPoolVoluntaryExitsResponse type: object + required: [data] properties: data: type: array diff --git a/apis/beacon/rewards/attestations.yaml b/apis/beacon/rewards/attestations.yaml index 5644c8d7..da9d8b8e 100644 --- a/apis/beacon/rewards/attestations.yaml +++ b/apis/beacon/rewards/attestations.yaml @@ -32,6 +32,7 @@ post: schema: title: GetAttestationsRewardsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/rewards/blocks.yaml b/apis/beacon/rewards/blocks.yaml index 68b84d68..1644a787 100644 --- a/apis/beacon/rewards/blocks.yaml +++ b/apis/beacon/rewards/blocks.yaml @@ -19,6 +19,7 @@ get: schema: title: GetBlockRewardsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/rewards/sync_committee.yaml b/apis/beacon/rewards/sync_committee.yaml index 006da8f5..51359a1b 100644 --- a/apis/beacon/rewards/sync_committee.yaml +++ b/apis/beacon/rewards/sync_committee.yaml @@ -31,6 +31,7 @@ post: schema: title: GetSyncCommitteeRewardsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/committee.yaml b/apis/beacon/states/committee.yaml index fa246f4c..730d0282 100644 --- a/apis/beacon/states/committee.yaml +++ b/apis/beacon/states/committee.yaml @@ -41,6 +41,7 @@ get: schema: title: GetEpochCommitteesResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/finality_checkpoints.yaml b/apis/beacon/states/finality_checkpoints.yaml index ce1ec831..e97e235d 100644 --- a/apis/beacon/states/finality_checkpoints.yaml +++ b/apis/beacon/states/finality_checkpoints.yaml @@ -18,6 +18,7 @@ get: schema: title: GetStateFinalityCheckpointsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -25,6 +26,7 @@ get: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: type: object + required: [previous_justified, current_justified, finalized] properties: previous_justified: $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Checkpoint' diff --git a/apis/beacon/states/fork.yaml b/apis/beacon/states/fork.yaml index b8424fa7..706c69f4 100644 --- a/apis/beacon/states/fork.yaml +++ b/apis/beacon/states/fork.yaml @@ -17,6 +17,7 @@ get: schema: title: GetStateForkResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/randao.yaml b/apis/beacon/states/randao.yaml index 5533565f..0484191c 100644 --- a/apis/beacon/states/randao.yaml +++ b/apis/beacon/states/randao.yaml @@ -32,6 +32,7 @@ get: schema: title: GetStateRandaoResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -39,6 +40,7 @@ get: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: type: object + required: [randao] properties: randao: allOf: diff --git a/apis/beacon/states/root.yaml b/apis/beacon/states/root.yaml index 0d176a98..0dcb354e 100644 --- a/apis/beacon/states/root.yaml +++ b/apis/beacon/states/root.yaml @@ -16,6 +16,7 @@ get: schema: title: GetStateRootResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -23,6 +24,7 @@ get: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" data: type: object + required: [root] properties: root: allOf: diff --git a/apis/beacon/states/sync_committees.yaml b/apis/beacon/states/sync_committees.yaml index 616149de..0e5b2426 100644 --- a/apis/beacon/states/sync_committees.yaml +++ b/apis/beacon/states/sync_committees.yaml @@ -25,6 +25,7 @@ get: schema: title: GetEpochSyncCommitteesResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/validator.yaml b/apis/beacon/states/validator.yaml index e919c600..1501e27f 100644 --- a/apis/beacon/states/validator.yaml +++ b/apis/beacon/states/validator.yaml @@ -24,6 +24,7 @@ get: schema: title: GetStateValidatorResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/validator_balances.yaml b/apis/beacon/states/validator_balances.yaml index aca406a3..b7117190 100644 --- a/apis/beacon/states/validator_balances.yaml +++ b/apis/beacon/states/validator_balances.yaml @@ -34,6 +34,7 @@ get: schema: title: GetStateValidatorBalancesResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -107,6 +108,7 @@ post: schema: title: GetStateValidatorBalancesResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/beacon/states/validators.yaml b/apis/beacon/states/validators.yaml index b85c829c..bdcb9014 100644 --- a/apis/beacon/states/validators.yaml +++ b/apis/beacon/states/validators.yaml @@ -45,6 +45,7 @@ get: schema: title: GetStateValidatorsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" @@ -132,6 +133,7 @@ post: schema: title: GetStateValidatorsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/builder/states/expected_withdrawals.yaml b/apis/builder/states/expected_withdrawals.yaml index e22aa1e9..658c676a 100644 --- a/apis/builder/states/expected_withdrawals.yaml +++ b/apis/builder/states/expected_withdrawals.yaml @@ -25,6 +25,7 @@ get: schema: title: GetNextWithdrawalsResponse type: object + required: [execution_optimistic, finalized, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/config/deposit_contract.yaml b/apis/config/deposit_contract.yaml index 02e17dd5..2489f503 100644 --- a/apis/config/deposit_contract.yaml +++ b/apis/config/deposit_contract.yaml @@ -12,9 +12,11 @@ get: schema: title: GetDepositContractResponse type: object + required: [data] properties: data: type: object + required: [chain_id, address] properties: chain_id: allOf: diff --git a/apis/config/fork_schedule.yaml b/apis/config/fork_schedule.yaml index 402b7f6b..8510400a 100644 --- a/apis/config/fork_schedule.yaml +++ b/apis/config/fork_schedule.yaml @@ -12,6 +12,7 @@ get: schema: title: GetForkScheduleResponse type: object + required: [data] properties: data: type: array diff --git a/apis/config/spec.yaml b/apis/config/spec.yaml index 2fe1eb4d..46a70653 100644 --- a/apis/config/spec.yaml +++ b/apis/config/spec.yaml @@ -21,6 +21,7 @@ get: schema: title: GetSpecResponse type: object + required: [data] properties: data: description: | diff --git a/apis/debug/heads.v2.yaml b/apis/debug/heads.v2.yaml index 90eb09e4..1db96b41 100644 --- a/apis/debug/heads.v2.yaml +++ b/apis/debug/heads.v2.yaml @@ -12,11 +12,13 @@ get: schema: title: GetDebugChainHeadsResponse type: object + required: [data] properties: data: type: array items: type: object + required: [root, slot, execution_optimistic] properties: root: $ref: "../../beacon-node-oapi.yaml#/components/schemas/Root" diff --git a/apis/debug/state.v2.yaml b/apis/debug/state.v2.yaml index 8fd2058b..dde88704 100644 --- a/apis/debug/state.v2.yaml +++ b/apis/debug/state.v2.yaml @@ -22,6 +22,7 @@ get: schema: title: GetStateV2Response type: object + required: [version, execution_optimistic, finalized, data] properties: version: type: string diff --git a/apis/node/identity.yaml b/apis/node/identity.yaml index 060e979b..80a6ca0e 100644 --- a/apis/node/identity.yaml +++ b/apis/node/identity.yaml @@ -12,6 +12,7 @@ get: schema: title: GetNetworkIdentityResponse type: object + required: [data] properties: data: $ref: "../../beacon-node-oapi.yaml#/components/schemas/NetworkIdentity" diff --git a/apis/node/peer.yaml b/apis/node/peer.yaml index bd3bb698..e4097871 100644 --- a/apis/node/peer.yaml +++ b/apis/node/peer.yaml @@ -18,6 +18,7 @@ get: schema: title: GetPeerResponse type: object + required: [data] properties: data: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Peer' diff --git a/apis/node/peer_count.yaml b/apis/node/peer_count.yaml index ec43ee80..c2f0a6c8 100644 --- a/apis/node/peer_count.yaml +++ b/apis/node/peer_count.yaml @@ -12,9 +12,11 @@ get: schema: title: GetPeerCountResponse type: object + required: [data] properties: data: type: object + required: [disconnected, connecting, connected, disconnecting] properties: disconnected: allOf: diff --git a/apis/node/peers.yaml b/apis/node/peers.yaml index 3730c880..89f25345 100644 --- a/apis/node/peers.yaml +++ b/apis/node/peers.yaml @@ -29,6 +29,7 @@ get: schema: title: GetPeersResponse type: object + required: [data, meta] properties: data: type: array @@ -36,6 +37,7 @@ get: $ref: "../../beacon-node-oapi.yaml#/components/schemas/Peer" meta: type: object + required: [count] properties: count: description: "Total number of items" diff --git a/apis/node/syncing.yaml b/apis/node/syncing.yaml index a2f07d71..ad055eaf 100644 --- a/apis/node/syncing.yaml +++ b/apis/node/syncing.yaml @@ -13,9 +13,11 @@ schema: title: GetSyncingStatusResponse type: object + required: [data] properties: data: type: object + required: [head_slot, sync_distance, is_syncing, is_optimistic, el_offline] properties: head_slot: allOf: diff --git a/apis/node/version.yaml b/apis/node/version.yaml index 541ddc4f..89c69d88 100644 --- a/apis/node/version.yaml +++ b/apis/node/version.yaml @@ -12,9 +12,11 @@ get: schema: title: GetVersionResponse type: object + required: [data] properties: data: type: object + required: [version] properties: version: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Version' diff --git a/apis/validator/aggregate_and_proofs.yaml b/apis/validator/aggregate_and_proofs.yaml index a2545a94..e919dac5 100644 --- a/apis/validator/aggregate_and_proofs.yaml +++ b/apis/validator/aggregate_and_proofs.yaml @@ -6,6 +6,7 @@ post: - ValidatorRequiredApi - Validator requestBody: + required: true content: application/json: schema: diff --git a/apis/validator/aggregate_attestation.yaml b/apis/validator/aggregate_attestation.yaml index 869e6b32..e6ee3b34 100644 --- a/apis/validator/aggregate_attestation.yaml +++ b/apis/validator/aggregate_attestation.yaml @@ -33,6 +33,7 @@ get: schema: title: GetAggregatedAttestationResponse type: object + required: [data] properties: data: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Attestation' diff --git a/apis/validator/attestation_data.yaml b/apis/validator/attestation_data.yaml index 65cfb94b..7c54f8a4 100644 --- a/apis/validator/attestation_data.yaml +++ b/apis/validator/attestation_data.yaml @@ -31,6 +31,7 @@ get: schema: title: ProduceAttestationDataResponse type: object + required: [data] properties: data: $ref: '../../beacon-node-oapi.yaml#/components/schemas/AttestationData' diff --git a/apis/validator/beacon_committee_selections.yaml b/apis/validator/beacon_committee_selections.yaml index 991b5ee4..d714630b 100644 --- a/apis/validator/beacon_committee_selections.yaml +++ b/apis/validator/beacon_committee_selections.yaml @@ -12,6 +12,7 @@ post: tags: - Validator requestBody: + required: true content: application/json: schema: @@ -29,6 +30,7 @@ post: schema: title: BeaconCommitteeSelectionResponse type: object + required: [data] properties: data: type: array diff --git a/apis/validator/beacon_committee_subscriptions.yaml b/apis/validator/beacon_committee_subscriptions.yaml index d6650afd..e200f606 100644 --- a/apis/validator/beacon_committee_subscriptions.yaml +++ b/apis/validator/beacon_committee_subscriptions.yaml @@ -12,6 +12,7 @@ post: - ValidatorRequiredApi - Validator requestBody: + required: true content: application/json: schema: @@ -19,6 +20,7 @@ post: type: array items: type: object + required: [validator_index, committee_index, committees_at_slot, slot, is_aggregator] properties: validator_index: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' diff --git a/apis/validator/blinded_block.yaml b/apis/validator/blinded_block.yaml index c64e4959..009c2557 100644 --- a/apis/validator/blinded_block.yaml +++ b/apis/validator/blinded_block.yaml @@ -52,6 +52,7 @@ get: schema: title: ProduceBlindedBlockResponse type: object + required: [version, data] properties: version: type: string diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index 29ac4cc9..3e1fe104 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -49,6 +49,7 @@ get: schema: title: ProduceBlockV2Response type: object + required: [version, data] properties: version: type: string diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index ba0439d2..c99bb40e 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -93,6 +93,7 @@ get: schema: title: ProduceBlockV3Response type: object + required: [version, execution_payload_blinded, execution_payload_value, consensus_block_value, data] properties: version: type: string diff --git a/apis/validator/duties/attester.yaml b/apis/validator/duties/attester.yaml index c15eccb0..ea912a8b 100644 --- a/apis/validator/duties/attester.yaml +++ b/apis/validator/duties/attester.yaml @@ -47,6 +47,7 @@ post: schema: title: GetAttesterDutiesResponse type: object + required: [dependent_root, execution_optimistic, data] properties: dependent_root: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/DependentRoot" diff --git a/apis/validator/duties/proposer.yaml b/apis/validator/duties/proposer.yaml index c7e88da9..b0175bdf 100644 --- a/apis/validator/duties/proposer.yaml +++ b/apis/validator/duties/proposer.yaml @@ -31,6 +31,7 @@ get: schema: title: GetProposerDutiesResponse type: object + required: [dependent_root, execution_optimistic, data] properties: dependent_root: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/DependentRoot" diff --git a/apis/validator/duties/sync.yaml b/apis/validator/duties/sync.yaml index 812059b9..ae119aca 100644 --- a/apis/validator/duties/sync.yaml +++ b/apis/validator/duties/sync.yaml @@ -31,6 +31,7 @@ post: schema: title: GetSyncCommitteeDutiesResponse type: object + required: [execution_optimistic, data] properties: execution_optimistic: $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" diff --git a/apis/validator/liveness.yaml b/apis/validator/liveness.yaml index 15c09444..74688dbd 100644 --- a/apis/validator/liveness.yaml +++ b/apis/validator/liveness.yaml @@ -38,11 +38,13 @@ post: schema: title: PostLivenessResponseBody type: object + required: [data] properties: data: type: array items: type: object + required: [index, is_live] properties: index: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' diff --git a/apis/validator/prepare_beacon_proposer.yaml b/apis/validator/prepare_beacon_proposer.yaml index d40bbfa5..59c2ca19 100644 --- a/apis/validator/prepare_beacon_proposer.yaml +++ b/apis/validator/prepare_beacon_proposer.yaml @@ -21,12 +21,14 @@ post: - ValidatorRequiredApi - Validator requestBody: + required: true content: application/json: schema: type: array items: type: object + required: [validator_index, fee_recipient] properties: validator_index: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' diff --git a/apis/validator/register_validator.yaml b/apis/validator/register_validator.yaml index 6dc0538e..14687965 100644 --- a/apis/validator/register_validator.yaml +++ b/apis/validator/register_validator.yaml @@ -15,6 +15,7 @@ post: tags: - Validator requestBody: + required: true content: application/json: schema: diff --git a/apis/validator/sync_committee_contribution.yaml b/apis/validator/sync_committee_contribution.yaml index 791d0db3..3aac4a21 100644 --- a/apis/validator/sync_committee_contribution.yaml +++ b/apis/validator/sync_committee_contribution.yaml @@ -37,6 +37,7 @@ get: schema: title: produceSyncCommitteeContributionResponse type: object + required: [data] properties: data: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Altair.SyncCommitteeContribution' diff --git a/apis/validator/sync_committee_contribution_and_proof.yaml b/apis/validator/sync_committee_contribution_and_proof.yaml index 66bdfee4..164503eb 100644 --- a/apis/validator/sync_committee_contribution_and_proof.yaml +++ b/apis/validator/sync_committee_contribution_and_proof.yaml @@ -6,6 +6,7 @@ post: - ValidatorRequiredApi - Validator requestBody: + required: true content: application/json: schema: diff --git a/apis/validator/sync_committee_selections.yaml b/apis/validator/sync_committee_selections.yaml index a04c3f6a..226b33fc 100644 --- a/apis/validator/sync_committee_selections.yaml +++ b/apis/validator/sync_committee_selections.yaml @@ -13,6 +13,7 @@ post: tags: - Validator requestBody: + required: true content: application/json: schema: @@ -29,6 +30,7 @@ post: schema: title: SyncCommitteeSelectionResponse type: object + required: [data] properties: data: type: array diff --git a/apis/validator/sync_committee_subscriptions.yaml b/apis/validator/sync_committee_subscriptions.yaml index 88c06ae0..a3eec8e1 100644 --- a/apis/validator/sync_committee_subscriptions.yaml +++ b/apis/validator/sync_committee_subscriptions.yaml @@ -12,6 +12,7 @@ post: - ValidatorRequiredApi - Validator requestBody: + required: true content: application/json: schema: diff --git a/types/altair/block.yaml b/types/altair/block.yaml index cd9cdd68..19e2c2d8 100644 --- a/types/altair/block.yaml +++ b/types/altair/block.yaml @@ -2,6 +2,7 @@ Altair: BeaconBlockCommon: # An abstract object to collect the common fields between the BeaconBlockHeader and the BeaconBlock objects type: object + required: [slot, proposer_index, parent_root, state_root] properties: slot: allOf: @@ -23,6 +24,7 @@ Altair: BeaconBlockBody: type: object description: "The [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/beacon-chain.md#beaconblockbody) object from the CL Altair spec." + required: [randao_reveal, eth1_data, graffiti, proposer_slashings, attester_slashings, attestations, deposits, voluntary_exits, sync_aggregate] properties: randao_reveal: allOf: @@ -60,6 +62,7 @@ Altair: allOf: - $ref: '#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Altair/BeaconBlockBody' @@ -67,6 +70,7 @@ Altair: SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Altair spec." + required: [message, signature] properties: message: $ref: "#/Altair/BeaconBlock" diff --git a/types/altair/light_client.yaml b/types/altair/light_client.yaml index 42fd4bc6..d6f08f45 100644 --- a/types/altair/light_client.yaml +++ b/types/altair/light_client.yaml @@ -23,12 +23,14 @@ Altair: LightClientHeader: type: object + required: [beacon] properties: beacon: $ref: '../block.yaml#/BeaconBlockHeader' LightClientBootstrap: type: object + required: [header, current_sync_committee, current_sync_committee_branch] properties: header: $ref: '#/Altair/LightClientHeader' @@ -38,6 +40,7 @@ Altair: $ref: '#/Altair/CurrentSyncCommitteeBranch' LightClientUpdate: type: object + required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Altair/LightClientHeader' @@ -55,6 +58,7 @@ Altair: $ref: '../primitive.yaml#/Uint64' LightClientFinalityUpdate: type: object + required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Altair/LightClientHeader' @@ -68,6 +72,7 @@ Altair: $ref: '../primitive.yaml#/Uint64' LightClientOptimisticUpdate: type: object + required: [attested_header, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Altair/LightClientHeader' diff --git a/types/altair/state.yaml b/types/altair/state.yaml index 42f7d024..8ffe0a10 100644 --- a/types/altair/state.yaml +++ b/types/altair/state.yaml @@ -2,6 +2,7 @@ Altair: BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/beacon-chain.md#beaconstate) object from the CL Altair spec." + required: [genesis_time, genesis_validators_root, slot, fork, latest_block_header, block_roots, state_roots, historical_roots, eth1_data, eth1_data_votes, eth1_deposit_index, validators, balances, randao_mixes, slashings, previous_epoch_participation, current_epoch_participation, justification_bits, previous_justified_checkpoint, current_justified_checkpoint, finalized_checkpoint, inactivity_scores, current_sync_committee, next_sync_committee] properties: genesis_time: $ref: "../primitive.yaml#/Uint64" diff --git a/types/altair/sync_aggregate.yaml b/types/altair/sync_aggregate.yaml index 28c0b837..a3a54e76 100644 --- a/types/altair/sync_aggregate.yaml +++ b/types/altair/sync_aggregate.yaml @@ -2,6 +2,7 @@ Altair: SyncAggregate: type: object description: "The [`SyncAggregate`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/beacon-chain.md#syncaggregate) object from the CL Altair spec." + required: [sync_committee_bits, sync_committee_signature] properties: sync_committee_bits: $ref: "../primitive.yaml#/BitList" diff --git a/types/altair/sync_committee.yaml b/types/altair/sync_committee.yaml index 1ccee2f8..5a166d39 100644 --- a/types/altair/sync_committee.yaml +++ b/types/altair/sync_committee.yaml @@ -1,6 +1,7 @@ Altair: SyncCommittee: type: object + required: [pubkeys, aggregate_pubkey] properties: pubkeys: type: array @@ -13,6 +14,7 @@ Altair: $ref: '../primitive.yaml#/Pubkey' SyncCommitteeSignature: type: object + required: [slot, beacon_block_root, validator_index, signature] properties: slot: $ref: '../primitive.yaml#/Uint64' @@ -24,6 +26,7 @@ Altair: $ref: '../primitive.yaml#/Signature' SyncCommitteeSubscription: type: object + required: [validator_index, sync_committee_indices, until_epoch] properties: validator_index: $ref: '../primitive.yaml#/Uint64' @@ -39,6 +42,7 @@ Altair: SignedContributionAndProof: type: object + required: [message, signature] properties: message: $ref: '../../beacon-node-oapi.yaml#/components/schemas/Altair.ContributionAndProof' @@ -47,6 +51,7 @@ Altair: ContributionAndProof: type: object + required: [aggregator_index, selection_proof, contribution] properties: aggregator_index: allOf: @@ -59,6 +64,7 @@ Altair: SyncCommitteeContribution: type: object + required: [slot, beacon_block_root, subcommittee_index, aggregation_bits, signature] properties: slot: allOf: @@ -88,6 +94,7 @@ Altair: - $ref: '../primitive.yaml#/Uint64' SyncCommitteeByValidatorIndices: type: object + required: [validators, validator_aggregates] properties: validators: allOf: diff --git a/types/api.yaml b/types/api.yaml index e877ad3e..22a7271b 100644 --- a/types/api.yaml +++ b/types/api.yaml @@ -2,6 +2,7 @@ DepositSnapshotResponse: type: object + required: [finalized, deposit_root, deposit_count, execution_block_hash, execution_block_height] properties: finalized: type: array @@ -21,6 +22,7 @@ DepositSnapshotResponse: ValidatorResponse: type: object + required: [index, balance, status, validator] properties: index: allOf: @@ -37,6 +39,7 @@ ValidatorResponse: ValidatorBalanceResponse: type: object + required: [index, balance] properties: index: allOf: @@ -68,6 +71,7 @@ ValidatorStatus: Committee: description: Group of validators assigned to attest at specific slot and that have the same committee index (shard in phase 1) type: object + required: [index, slot, validators] properties: index: allOf: diff --git a/types/attestation.yaml b/types/attestation.yaml index 834eb0e2..41a77c50 100644 --- a/types/attestation.yaml +++ b/types/attestation.yaml @@ -18,6 +18,7 @@ IndexedAttestation: Attestation: type: object description: "The [`Attestation`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#attestation) object from the CL spec." + required: [aggregation_bits, signature, data] properties: aggregation_bits: $ref: "./primitive.yaml#/BitList" @@ -32,6 +33,7 @@ Attestation: PendingAttestation: type: object description: "The [`PendingAttestation`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#pendingattestation) object from the CL spec." + required: [aggregation_bits, data, inclusion_delay, proposer_index] properties: aggregation_bits: $ref: "./primitive.yaml#/BitList" @@ -46,6 +48,7 @@ PendingAttestation: AttestationData: type: object description: "The [`AttestationData`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#attestationdata) object from the CL spec." + required: [slot, index, beacon_block_root, source, target] properties: slot: $ref: "./primitive.yaml#/Uint64" diff --git a/types/attester_slashing.yaml b/types/attester_slashing.yaml index bdc636ef..636192d2 100644 --- a/types/attester_slashing.yaml +++ b/types/attester_slashing.yaml @@ -1,6 +1,7 @@ AttesterSlashing: type: object description: "The [`AttesterSlashing`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#attesterslashing) object from the CL spec." + required: [attestation_1, attestation_2] properties: attestation_1: $ref: './attestation.yaml#/IndexedAttestation' diff --git a/types/bellatrix/block.yaml b/types/bellatrix/block.yaml index 027efbc0..50c8b2ac 100644 --- a/types/bellatrix/block.yaml +++ b/types/bellatrix/block.yaml @@ -3,6 +3,7 @@ Bellatrix: # 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.3.0/specs/bellatrix/beacon-chain.md#beaconblockbody) object from the CL Bellatrix spec." + required: [randao_reveal, eth1_data, graffiti, proposer_slashings, attester_slashings, attestations, deposits, voluntary_exits, sync_aggregate] properties: randao_reveal: allOf: @@ -39,6 +40,7 @@ Bellatrix: allOf: - $ref: '#/Bellatrix/BeaconBlockBodyCommon' - type: object + required: [execution_payload] properties: execution_payload: $ref: './execution_payload.yaml#/Bellatrix/ExecutionPayload' @@ -48,6 +50,7 @@ Bellatrix: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Bellatrix/BeaconBlockBody' @@ -55,6 +58,7 @@ Bellatrix: SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Bellatrix spec." + required: [message, signature] properties: message: $ref: "#/Bellatrix/BeaconBlock" @@ -66,6 +70,7 @@ Bellatrix: allOf: - $ref: '#/Bellatrix/BeaconBlockBodyCommon' - type: object + required: [execution_payload_header] properties: execution_payload_header: $ref: './execution_payload.yaml#/Bellatrix/ExecutionPayloadHeader' @@ -75,6 +80,7 @@ Bellatrix: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Bellatrix/BlindedBeaconBlockBody' @@ -82,6 +88,7 @@ Bellatrix: SignedBlindedBeaconBlock: type: object description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Bellatrix spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." + required: [message, signature] properties: message: $ref: "#/Bellatrix/BlindedBeaconBlock" diff --git a/types/bellatrix/execution_payload.yaml b/types/bellatrix/execution_payload.yaml index ab71881c..b73eb623 100644 --- a/types/bellatrix/execution_payload.yaml +++ b/types/bellatrix/execution_payload.yaml @@ -3,6 +3,7 @@ Bellatrix: # 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/v1.3.0/specs/bellatrix/beacon-chain.md#executionpayload) object from the CL Bellatrix spec." + required: [parent_hash, fee_recipient, state_root, receipts_root, logs_bloom, prev_randao, block_number, gas_limit, gas_used, timestamp, extra_data, base_fee_per_gas, block_hash] properties: parent_hash: $ref: '../primitive.yaml#/Root' @@ -36,6 +37,7 @@ Bellatrix: allOf: - $ref: '#/Bellatrix/ExecutionPayloadCommon' - type: object + required: [transactions] properties: transactions: $ref: './transactions.yaml#/Bellatrix/Transactions' @@ -46,6 +48,7 @@ Bellatrix: - $ref: '#/Bellatrix/ExecutionPayloadCommon' - type: object additionalProperties: false + required: [transactions_root] properties: transactions_root: $ref: '../primitive.yaml#/Root' diff --git a/types/bellatrix/state.yaml b/types/bellatrix/state.yaml index fd5dc6b5..fafb455b 100644 --- a/types/bellatrix/state.yaml +++ b/types/bellatrix/state.yaml @@ -2,6 +2,7 @@ Bellatrix: BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/bellatrix/beacon-chain.md#beaconstate) object from the Eth2.0 Bellatrix spec." + required: [genesis_time, genesis_validators_root, slot, fork, latest_block_header, block_roots, state_roots, historical_roots, eth1_data, eth1_data_votes, eth1_deposit_index, validators, balances, randao_mixes, slashings, previous_epoch_participation, current_epoch_participation, justification_bits, previous_justified_checkpoint, current_justified_checkpoint, finalized_checkpoint, inactivity_scores, current_sync_committee, next_sync_committee, latest_execution_payload_header] properties: genesis_time: $ref: "../primitive.yaml#/Uint64" diff --git a/types/block.yaml b/types/block.yaml index 58bbd165..8a6a73cf 100644 --- a/types/block.yaml +++ b/types/block.yaml @@ -1,6 +1,7 @@ BeaconBlockCommon: # An abstract object to collect the common fields between the BeaconBlockHeader and the BeaconBlock objects type: object + required: [slot, proposer_index, parent_root, state_root] properties: slot: allOf: @@ -22,6 +23,7 @@ BeaconBlockCommon: BeaconBlockBody: type: object description: "The [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconblockbody) object from the CL spec." + required: [randao_reveal, eth1_data, graffiti, proposer_slashings, attester_slashings, attestations, deposits, voluntary_exits] properties: randao_reveal: allOf: @@ -58,6 +60,7 @@ BeaconBlock: allOf: - $ref: '#/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/BeaconBlockBody' @@ -65,6 +68,7 @@ BeaconBlock: SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL spec." + required: [message, signature] properties: message: $ref: "#/BeaconBlock" @@ -76,6 +80,7 @@ BeaconBlockHeader: allOf: - $ref: './block.yaml#/BeaconBlockCommon' - type: object + required: [body_root] properties: body_root: allOf: @@ -85,6 +90,7 @@ BeaconBlockHeader: SignedBeaconBlockHeader: type: object description: "The [`SignedBeaconBlockHeader`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblockheader) object envelope from the CL spec." + required: [message, signature] properties: message: $ref: "./block.yaml#/BeaconBlockHeader" diff --git a/types/bls_to_execution_change.yaml b/types/bls_to_execution_change.yaml index 9d6dea84..3f4657e8 100644 --- a/types/bls_to_execution_change.yaml +++ b/types/bls_to_execution_change.yaml @@ -1,6 +1,7 @@ BLSToExecutionChange: type: object description: "The [`BLSToExecutionChange`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#blstoexecutionchange) object from the CL spec." + required: [validator_index, from_bls_pubkey, to_execution_address] properties: validator_index: $ref: "./primitive.yaml#/Uint64" @@ -15,6 +16,7 @@ BLSToExecutionChange: SignedBLSToExecutionChange: type: object description: "The [`SignedBLSToExecutionChange`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#signedblstoexecutionchange) object from the CL spec." + required: [message, signature] properties: message: $ref: "#/BLSToExecutionChange" diff --git a/types/capella/block.yaml b/types/capella/block.yaml index e080332d..828dd5cc 100644 --- a/types/capella/block.yaml +++ b/types/capella/block.yaml @@ -3,6 +3,7 @@ Capella: # 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.3.0/specs/capella/beacon-chain.md#beaconblockbody) object from the CL Capella spec." + required: [randao_reveal, eth1_data, graffiti, proposer_slashings, attester_slashings, attestations, deposits, voluntary_exits, sync_aggregate, bls_to_execution_changes] properties: randao_reveal: allOf: @@ -43,6 +44,7 @@ Capella: allOf: - $ref: '#/Capella/BeaconBlockBodyCommon' - type: object + required: [execution_payload] properties: execution_payload: $ref: './execution_payload.yaml#/Capella/ExecutionPayload' @@ -52,6 +54,7 @@ Capella: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Capella/BeaconBlockBody' @@ -59,6 +62,7 @@ Capella: SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Capella spec." + required: [message, signature] properties: message: $ref: "#/Capella/BeaconBlock" @@ -70,6 +74,7 @@ Capella: allOf: - $ref: '#/Capella/BeaconBlockBodyCommon' - type: object + required: [execution_payload_header] properties: execution_payload_header: $ref: './execution_payload.yaml#/Capella/ExecutionPayloadHeader' @@ -79,6 +84,7 @@ Capella: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Capella/BlindedBeaconBlockBody' @@ -86,6 +92,7 @@ Capella: SignedBlindedBeaconBlock: type: object description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Capella spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." + required: [message, signature] properties: message: $ref: "#/Capella/BlindedBeaconBlock" diff --git a/types/capella/execution_payload.yaml b/types/capella/execution_payload.yaml index 7c768754..e3f417ae 100644 --- a/types/capella/execution_payload.yaml +++ b/types/capella/execution_payload.yaml @@ -3,6 +3,7 @@ Capella: # 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/v1.3.0/specs/capella/beacon-chain.md#executionpayload) object from the CL Capella spec." + required: [parent_hash, fee_recipient, state_root, receipts_root, logs_bloom, prev_randao, block_number, gas_limit, gas_used, timestamp, extra_data, base_fee_per_gas, block_hash] properties: parent_hash: $ref: '../primitive.yaml#/Root' @@ -36,6 +37,7 @@ Capella: allOf: - $ref: '#/Capella/ExecutionPayloadCommon' - type: object + required: [transactions, withdrawals] properties: transactions: $ref: '../bellatrix/transactions.yaml#/Bellatrix/Transactions' @@ -48,6 +50,7 @@ Capella: - $ref: '#/Capella/ExecutionPayloadCommon' - type: object additionalProperties: false + required: [transactions_root, withdrawals_root] properties: transactions_root: $ref: '../primitive.yaml#/Root' diff --git a/types/capella/historical_summary.yaml b/types/capella/historical_summary.yaml index dc346ac3..b95a9d6a 100644 --- a/types/capella/historical_summary.yaml +++ b/types/capella/historical_summary.yaml @@ -2,6 +2,7 @@ Capella: HistoricalSummary: type: object description: "The [`HistoricalSummary`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#historicalsummary) object from the CL Capella spec." + required: [block_summary_root, state_summary_root] properties: block_summary_root: $ref: '../primitive.yaml#/Root' diff --git a/types/capella/light_client.yaml b/types/capella/light_client.yaml index 693b3731..912ae1e4 100644 --- a/types/capella/light_client.yaml +++ b/types/capella/light_client.yaml @@ -9,6 +9,7 @@ Capella: LightClientHeader: type: object + required: [beacon, execution, execution_branch] properties: beacon: $ref: '../block.yaml#/BeaconBlockHeader' @@ -19,6 +20,7 @@ Capella: LightClientBootstrap: type: object + required: [header, current_sync_committee, current_sync_committee_branch] properties: header: $ref: '#/Capella/LightClientHeader' @@ -28,6 +30,7 @@ Capella: $ref: '../altair/light_client.yaml#/Altair/CurrentSyncCommitteeBranch' LightClientUpdate: type: object + required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Capella/LightClientHeader' @@ -45,6 +48,7 @@ Capella: $ref: '../primitive.yaml#/Uint64' LightClientFinalityUpdate: type: object + required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Capella/LightClientHeader' @@ -58,6 +62,7 @@ Capella: $ref: '../primitive.yaml#/Uint64' LightClientOptimisticUpdate: type: object + required: [attested_header, sync_aggregate, signature_slot] properties: attested_header: $ref: '#/Capella/LightClientHeader' diff --git a/types/capella/state.yaml b/types/capella/state.yaml index 624a63ac..9fc8f612 100644 --- a/types/capella/state.yaml +++ b/types/capella/state.yaml @@ -2,6 +2,7 @@ Capella: BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#beaconstate) object from the Eth2.0 Capella spec." + required: [genesis_time, genesis_validators_root, slot, fork, latest_block_header, block_roots, state_roots, historical_roots, eth1_data, eth1_data_votes, eth1_deposit_index, validators, balances, randao_mixes, slashings, previous_epoch_participation, current_epoch_participation, justification_bits, previous_justified_checkpoint, current_justified_checkpoint, finalized_checkpoint, inactivity_scores, current_sync_committee, next_sync_committee, latest_execution_payload_header, next_withdrawal_index, next_withdrawal_validator_index, historical_summaries] properties: genesis_time: $ref: "../primitive.yaml#/Uint64" diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index ff8c8ca4..c5d4b42a 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -16,6 +16,7 @@ Deneb: BlobSidecar: type: object description: "A blob sidecar as defined in the Deneb consensus spec." + required: [index, blob, kzg_commitment, kzg_proof, signed_block_header, kzg_commitment_inclusion_proof] properties: index: $ref: "../primitive.yaml#/Uint64" diff --git a/types/deneb/block.yaml b/types/deneb/block.yaml index 86a0f24d..4891c25f 100644 --- a/types/deneb/block.yaml +++ b/types/deneb/block.yaml @@ -3,6 +3,7 @@ Deneb: # 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/deneb/beacon-chain.md#beaconblockbody) object from the CL Deneb 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: @@ -47,6 +48,7 @@ Deneb: allOf: - $ref: '#/Deneb/BeaconBlockBodyCommon' - type: object + required: [execution_payload] properties: execution_payload: $ref: './execution_payload.yaml#/Deneb/ExecutionPayload' @@ -56,6 +58,7 @@ Deneb: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Deneb/BeaconBlockBody' @@ -63,6 +66,7 @@ Deneb: SignedBeaconBlock: type: object description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec." + required: [message, signature] properties: message: $ref: "#/Deneb/BeaconBlock" @@ -74,6 +78,7 @@ Deneb: allOf: - $ref: '#/Deneb/BeaconBlockBodyCommon' - type: object + required: [execution_payload_header] properties: execution_payload_header: $ref: './execution_payload.yaml#/Deneb/ExecutionPayloadHeader' @@ -83,6 +88,7 @@ Deneb: allOf: - $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon' - type: object + required: [body] properties: body: $ref: '#/Deneb/BlindedBeaconBlockBody' @@ -90,6 +96,7 @@ Deneb: SignedBlindedBeaconBlock: type: object description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." + required: [message, signature] properties: message: $ref: "#/Deneb/BlindedBeaconBlock" diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml index 5bbe86fa..f642f1c0 100644 --- a/types/deneb/block_contents.yaml +++ b/types/deneb/block_contents.yaml @@ -16,6 +16,7 @@ Deneb: BlockContents: type: object description: "The required object for block production according to the Deneb CL spec." + required: [block, kzg_proofs, blobs] properties: block: $ref: "./block.yaml#/Deneb/BeaconBlock" @@ -27,6 +28,7 @@ Deneb: SignedBlockContents: type: object description: "The required signed components of block production according to the Deneb CL spec." + required: [signed_block, kzg_proofs, blobs] properties: signed_block: $ref: "./block.yaml#/Deneb/SignedBeaconBlock" diff --git a/types/deneb/execution_payload.yaml b/types/deneb/execution_payload.yaml index 54322f51..be4ef871 100644 --- a/types/deneb/execution_payload.yaml +++ b/types/deneb/execution_payload.yaml @@ -3,6 +3,7 @@ Deneb: # 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/deneb/beacon-chain.md#executionpayload) object from the CL Deneb spec." + required: [parent_hash, fee_recipient, state_root, receipts_root, logs_bloom, prev_randao, block_number, gas_limit, gas_used, timestamp, extra_data, base_fee_per_gas, excess_data_gas, block_hash] properties: parent_hash: $ref: '../primitive.yaml#/Root' @@ -38,6 +39,7 @@ Deneb: allOf: - $ref: '#/Deneb/ExecutionPayloadCommon' - type: object + required: [transactions, withdrawals] properties: transactions: $ref: '../bellatrix/transactions.yaml#/Bellatrix/Transactions' @@ -49,6 +51,7 @@ Deneb: allOf: - $ref: '#/Deneb/ExecutionPayloadCommon' - type: object + required: [transactions_root, withdrawals_root] properties: transactions_root: $ref: '../primitive.yaml#/Root' diff --git a/types/deneb/state.yaml b/types/deneb/state.yaml index 987cdd4f..271df577 100644 --- a/types/deneb/state.yaml +++ b/types/deneb/state.yaml @@ -2,6 +2,7 @@ Deneb: BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconstate) object from the Eth2.0 Deneb spec." + required: [genesis_time, genesis_validators_root, slot, fork, latest_block_header, block_roots, state_roots, historical_roots, eth1_data, eth1_data_votes, eth1_deposit_index, validators, balances, randao_mixes, slashings, previous_epoch_participation, current_epoch_participation, justification_bits, previous_justified_checkpoint, current_justified_checkpoint, finalized_checkpoint, inactivity_scores, current_sync_committee, next_sync_committee, latest_execution_payload_header, next_withdrawal_index, next_withdrawal_validator_index, historical_summaries] properties: genesis_time: $ref: "../primitive.yaml#/Uint64" diff --git a/types/deposit.yaml b/types/deposit.yaml index 7eb120de..8d651191 100644 --- a/types/deposit.yaml +++ b/types/deposit.yaml @@ -1,6 +1,7 @@ Deposit: type: object description: "The [`Deposit`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#deposit) object from the CL spec." + required: [proof, data] properties: proof: type: array @@ -15,6 +16,7 @@ Deposit: DepositData: type: object description: "The [`DepositData`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#depositdata) object from the CL spec." + required: [pubkey, withdrawal_credentials, amount, signature] properties: pubkey: $ref: './primitive.yaml#/Pubkey' diff --git a/types/eth1.yaml b/types/eth1.yaml index 50951e4f..f02719e7 100644 --- a/types/eth1.yaml +++ b/types/eth1.yaml @@ -1,6 +1,7 @@ Eth1Data: type: object description: "The [`Eth1Data`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#eth1data) object from the CL spec." + required: [deposit_root, deposit_count, block_hash] properties: deposit_root: allOf: diff --git a/types/fork_choice.yaml b/types/fork_choice.yaml index 47ba691a..660927cd 100644 --- a/types/fork_choice.yaml +++ b/types/fork_choice.yaml @@ -1,6 +1,7 @@ Node: type: object description: "fork choice node attributes" + required: [slot, block_root, parent_root, justified_epoch, finalized_epoch, weight, validity, execution_block_hash] properties: slot: allOf: diff --git a/types/http.yaml b/types/http.yaml index 16221692..60ec9a33 100644 --- a/types/http.yaml +++ b/types/http.yaml @@ -4,6 +4,7 @@ InvalidRequest: application/json: schema: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -23,6 +24,7 @@ InternalError: application/json: schema: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -45,6 +47,7 @@ NotImplementedError: application/json: schema: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -67,6 +70,7 @@ CurrentlySyncing: application/json: schema: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -89,6 +93,7 @@ NotFound: application/json: schema: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -111,6 +116,7 @@ UnsupportedMediaType: application/json: schema: type: object + required: [code, message] properties: code: description: "The media type supplied is unsupported, and the request has been rejected. This occurs when a HTTP request supplies a payload in a content-type that the service is not able to accept." @@ -129,6 +135,7 @@ UnsupportedMediaType: message: "Cannot read the supplied content type." ErrorMessage: type: object + required: [code, message] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -144,6 +151,7 @@ ErrorMessage: type: string IndexedErrorMessage: type: object + required: [code, message, failures] properties: code: description: "Either specific error code in case of invalid request or http status code" @@ -158,6 +166,7 @@ IndexedErrorMessage: type: array items: type: object + required: [index, message] properties: index: description: "Index of item in the request list that caused the error" diff --git a/types/misc.yaml b/types/misc.yaml index a177c0e4..54b913ea 100644 --- a/types/misc.yaml +++ b/types/misc.yaml @@ -1,6 +1,7 @@ Fork: type: object description: "The [`Fork`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#fork) object from the CL spec." + required: [previous_version, current_version, epoch] properties: previous_version: $ref: "./primitive.yaml#/ForkVersion" @@ -12,6 +13,7 @@ Fork: Checkpoint: type: object description: "The [`Checkpoint`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#checkpoint" + required: [epoch, root] properties: epoch: $ref: "./primitive.yaml#/Uint64" diff --git a/types/p2p.yaml b/types/p2p.yaml index dce9f71d..dc61ba07 100644 --- a/types/p2p.yaml +++ b/types/p2p.yaml @@ -1,5 +1,6 @@ NetworkIdentity: type: object + required: [peer_id, enr, p2p_addresses, discovery_addresses, metadata] properties: peer_id: $ref: "./p2p.yaml#/PeerId" @@ -24,7 +25,7 @@ NetworkIdentity: MetaData: type: object description: "Based on eth2 [Metadata object](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/p2p-interface.md#metadata)" - required: ["seq_number", "attnets"] + required: [seq_number, attnets] properties: seq_number: allOf: @@ -43,6 +44,7 @@ MetaData: Peer: type: object + required: [peer_id, enr, last_seen_p2p_address, state, direction] properties: peer_id: $ref: "./p2p.yaml#/PeerId" diff --git a/types/proposer_slashing.yaml b/types/proposer_slashing.yaml index 30e3f9db..7e676e45 100644 --- a/types/proposer_slashing.yaml +++ b/types/proposer_slashing.yaml @@ -1,6 +1,7 @@ ProposerSlashing: type: object description: "The [`ProposerSlashing`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#proposerslashing) object from the CL spec." + required: [signed_header_1, signed_header_2] properties: signed_header_1: $ref: './block.yaml#/SignedBeaconBlockHeader' diff --git a/types/registration.yaml b/types/registration.yaml index e7601c35..e3384b3c 100644 --- a/types/registration.yaml +++ b/types/registration.yaml @@ -1,6 +1,7 @@ ValidatorRegistration: type: object description: "The `ValidatorRegistration` object from the Builder API specification." + required: [fee_recipient, gas_limit, timestamp, pubkey] properties: fee_recipient: $ref: 'primitive.yaml#/ExecutionAddress' @@ -18,6 +19,7 @@ ValidatorRegistration: SignedValidatorRegistration: type: object description: "The `SignedValidatorRegistration` object from the Builder API specification." + required: [message, signature] properties: message: $ref: "#/ValidatorRegistration" diff --git a/types/rewards.yaml b/types/rewards.yaml index 66e990dd..8ff05466 100644 --- a/types/rewards.yaml +++ b/types/rewards.yaml @@ -4,7 +4,7 @@ SyncCommitteeRewards: items: type: object description: "Rewards info for a single sync committee member" - required: ["validator_index", "reward"] + required: [validator_index, reward] properties: validator_index: allOf: @@ -20,7 +20,7 @@ SyncCommitteeRewards: AttestationsRewards: type: object description: "Rewards info for attestations" - required: ["ideal_rewards", "total_rewards"] + required: [ideal_rewards, total_rewards] properties: ideal_rewards: type: array @@ -34,7 +34,7 @@ AttestationsRewards: AttestationRewards: type: object description: "Rewards info for a single attestation" - required: ["validator_index", "head", "target", "source", "inactivity"] + required: [validator_index, head, target, source, inactivity] properties: validator_index: allOf: @@ -70,7 +70,7 @@ AttestationRewards: IdealAttestationRewards: type: object description: "Ideal rewards info for a single attestation" - required: ["effective_balance", "head", "target", "source", "inactivity"] + required: [effective_balance, head, target, source, inactivity] properties: effective_balance: allOf: @@ -106,6 +106,7 @@ IdealAttestationRewards: BlockRewards: type: object description: "Rewards info for a single block" + required: [proposer_index, total, attestations, sync_aggregate, proposer_slashings, attester_slashings] properties: proposer_index: allOf: diff --git a/types/selection.yaml b/types/selection.yaml index 28d67c88..ea213c81 100644 --- a/types/selection.yaml +++ b/types/selection.yaml @@ -1,5 +1,6 @@ BeaconCommitteeSelection: type: object + required: [validator_index, slot, selection_proof] properties: validator_index: allOf: @@ -16,6 +17,7 @@ BeaconCommitteeSelection: SyncCommitteeSelection: type: object + required: [validator_index, slot, subcommittee_index, selection_proof] properties: validator_index: allOf: diff --git a/types/state.yaml b/types/state.yaml index 132838b5..a6e30deb 100644 --- a/types/state.yaml +++ b/types/state.yaml @@ -1,6 +1,7 @@ BeaconState: type: object description: "The [`BeaconState`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconblock) object from the CL spec." + required: [genesis_time, genesis_validators_root, slot, fork, latest_block_header, block_roots, state_roots, historical_roots, eth1_data, eth1_data_votes, eth1_deposit_index, validators, balances, randao_mixes, slashings, previous_epoch_attestations, current_epoch_attestations, justification_bits, previous_justified_checkpoint, current_justified_checkpoint, finalized_checkpoint] properties: genesis_time: $ref: "./primitive.yaml#/Uint64" diff --git a/types/validator.yaml b/types/validator.yaml index 2174e2d3..9e8f66e4 100644 --- a/types/validator.yaml +++ b/types/validator.yaml @@ -1,5 +1,6 @@ Validator: type: object + required: [pubkey, withdrawal_credentials, effective_balance, slashed, activation_eligibility_epoch, activation_epoch, exit_epoch, withdrawable_epoch] properties: pubkey: $ref: './primitive.yaml#/Pubkey' @@ -34,6 +35,7 @@ Validator: AttesterDuty: type: object + required: [pubkey, validator_index, committee_index, committee_length, committees_at_slot, validator_committee_index, slot] properties: pubkey: $ref: './primitive.yaml#/Pubkey' @@ -64,6 +66,7 @@ AttesterDuty: ProposerDuty: type: object + required: [pubkey, validator_index, slot] properties: pubkey: $ref: './primitive.yaml#/Pubkey' @@ -79,6 +82,7 @@ ProposerDuty: Altair: SyncDuty: type: object + required: [pubkey, validator_index, validator_sync_committee_indices] properties: pubkey: $ref: './primitive.yaml#/Pubkey' @@ -97,6 +101,7 @@ AggregateAndProof: allOf: - $ref: '#/Aggregate' - type: object + required: [selection_proof] properties: selection_proof: $ref: './primitive.yaml#/Signature' @@ -104,6 +109,7 @@ AggregateAndProof: Aggregate: type: object description: "The [`AggregateAndProof`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/validator.md#aggregateandproof) without selection_proof" + required: [aggregator_index, aggregate] properties: aggregator_index: $ref: './primitive.yaml#/Uint64' @@ -114,6 +120,7 @@ Aggregate: SignedAggregateAndProof: type: object description: "The [`SignedAggregateAndProof`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/validator.md#signedaggregateandproof) object" + required: [message, signature] properties: message: $ref: "#/AggregateAndProof" diff --git a/types/voluntary_exit.yaml b/types/voluntary_exit.yaml index f9a43ec7..eacda492 100644 --- a/types/voluntary_exit.yaml +++ b/types/voluntary_exit.yaml @@ -1,6 +1,7 @@ VoluntaryExit: type: object description: "The [`VoluntaryExit`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#voluntaryexit) object from the CL spec." + required: [epoch, validator_index] properties: epoch: allOf: @@ -14,6 +15,7 @@ VoluntaryExit: SignedVoluntaryExit: type: object description: "The [`SignedVoluntaryExit`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#signedvoluntaryexit) object from the CL spec." + required: [message, signature] properties: message: $ref: "#/VoluntaryExit" diff --git a/types/withdrawal.yaml b/types/withdrawal.yaml index d6bae619..d9beee44 100644 --- a/types/withdrawal.yaml +++ b/types/withdrawal.yaml @@ -1,5 +1,6 @@ Withdrawal: type: object + required: [index, validator_index, address, amount] properties: index: $ref: './primitive.yaml#/Uint64' From 8421ce5d931b8254d1837a29717eb22ca273f574 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Sun, 14 Jan 2024 21:41:45 +0100 Subject: [PATCH 2/6] Use ERC-55 mixed-case checksum address encoding for execution address (#396) Co-authored-by: Paul Harris --- apis/eventstream/index.yaml | 2 +- types/primitive.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/eventstream/index.yaml b/apis/eventstream/index.yaml index 682972db..39dda46c 100644 --- a/apis/eventstream/index.yaml +++ b/apis/eventstream/index.yaml @@ -79,7 +79,7 @@ get: description: The node has received a BLS to execution change (from P2P or API) value: | event: bls_to_execution_change - data: {"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9be8d619c56699667c1fedcd15f6b14d8B067f72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"} + data: {"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9Be8d619c56699667c1feDCD15f6b14D8B067F72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"} finalized_checkpoint: description: Finalized checkpoint has been updated value: | diff --git a/types/primitive.yaml b/types/primitive.yaml index 4c44bad5..1ecf3f5a 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -103,7 +103,7 @@ ExecutionAddress: type: string format: hex description: "An address on the execution (Ethereum 1) network." - example: "0xabcf8e0d4e9587369b2301d0790347320302cc09" + example: "0xAbcF8e0d4e9587369b2301D0790347320302cc09" pattern: "^0x[a-fA-F0-9]{40}$" Transaction: From 9d0e5fa3db0d72f68dc35b51e8c45318d98c27ac Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 15 Jan 2024 07:43:19 +1100 Subject: [PATCH 3/6] Clarify that payload & block values are in Wei (#400) Co-authored-by: Paul Harris --- beacon-node-oapi.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index d7fb7be8..164baed6 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -420,12 +420,16 @@ components: schema: type: boolean Eth-Execution-Payload-Value: - description: Required in response so client can determine relative value of execution payloads. + description: | + Execution payload value in Wei. Required in response so client can determine relative value + of execution payloads. required: true schema: $ref: './types/primitive.yaml#/Wei' Eth-Consensus-Block-Value: - description: Required in response so client can determine relative value of consensus blocks. + description: | + Consensus rewards paid to the proposer for this block, in Wei. Required in response so + client can determine relative value of consensus blocks. required: true schema: $ref: './types/primitive.yaml#/Wei' From 7bf78526ba321fc06c96c5c9e24b5a25fe05b44c Mon Sep 17 00:00:00 2001 From: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Mon, 15 Jan 2024 03:49:53 +0700 Subject: [PATCH 4/6] Specify 'valid' condition of SSE topics (#403) Co-authored-by: Paul Harris --- apis/eventstream/index.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/eventstream/index.yaml b/apis/eventstream/index.yaml index 39dda46c..f46203c6 100644 --- a/apis/eventstream/index.yaml +++ b/apis/eventstream/index.yaml @@ -56,12 +56,12 @@ get: event: block data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "execution_optimistic": false} attestation: - description: The node has received a valid attestation (from P2P or API) + description: The node has received an Attestation (from P2P or API) that passes validation rules of the `beacon_attestation_{subnet_id}` topic value: | event: attestation data: {"aggregation_bits":"0x01", "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}} voluntary_exit: - description: The node has received a valid voluntary exit (from P2P or API) + description: The node has received a SignedVoluntaryExit (from P2P or API) that passes validation rules of `voluntary_exit` topic value: | event: voluntary_exit data: {"message":{"epoch":"1", "validator_index":"1"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"} @@ -76,7 +76,7 @@ get: event: attester_slashing data: {"attestation_1":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"attestation_2":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}} bls_to_execution_change: - description: The node has received a BLS to execution change (from P2P or API) + description: The node has received a SignedBLSToExecutionChange (from P2P or API) that passes validation rules of the `bls_to_execution_change` topic value: | event: bls_to_execution_change data: {"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9Be8d619c56699667c1feDCD15f6b14D8B067F72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"} @@ -91,7 +91,7 @@ get: event: chain_reorg data: {"slot":"200", "depth":"50", "old_head_block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_block":"0x76262e91970d375a19bfe8a867288d7b9cde43c8635f598d93d39d041706fc76", "old_head_state":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false} contribution_and_proof: - description: The node has received a valid sync committee SignedContributionAndProof (from P2P or API) + description: The node has received a SignedContributionAndProof (from P2P or API) that passes validation rules of the `sync_committee_contribution_and_proof` topic value: | event: contribution_and_proof data: {"message": {"aggregator_index": "997", "contribution": {"slot": "168097", "beacon_block_root": "0x56f1fd4262c08fa81e27621c370e187e621a67fc80fe42340b07519f84b42ea1", "subcommittee_index": "0", "aggregation_bits": "0xffffffffffffffffffffffffffffffff", "signature": "0x85ab9018e14963026476fdf784cc674da144b3dbdb47516185438768774f077d882087b90ad642469902e782a8b43eed0cfc1b862aa9a473b54c98d860424a702297b4b648f3f30bdaae8a8b7627d10d04cb96a2cc8376af3e54a9aa0c8145e3"}, "selection_proof": "0x87c305f04bfe5db27c2b19fc23e00d7ac496ec7d3e759cbfdd1035cb8cf6caaa17a36a95a08ba78c282725e7b66a76820ca4eb333822bd399ceeb9807a0f2926c67ce67cfe06a0b0006838203b493505a8457eb79913ce1a3bcd1cc8e4ef30ed"}, "signature": "0xac118511474a94f857300b315c50585c32a713e4452e26a6bb98cdb619936370f126ed3b6bb64469259ee92e69791d9e12d324ce6fd90081680ce72f39d85d50b0ff977260a8667465e613362c6d6e6e745e1f9323ec1d6f16041c4e358839ac"} From 42e7dd574f01deafcddf451dd9abc91c3da69745 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 14 Jan 2024 13:49:25 -0800 Subject: [PATCH 5/6] Make sure version matches (#406) Co-authored-by: Paul Harris --- apis/eventstream/index.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/eventstream/index.yaml b/apis/eventstream/index.yaml index f46203c6..36140c7d 100644 --- a/apis/eventstream/index.yaml +++ b/apis/eventstream/index.yaml @@ -99,12 +99,12 @@ get: description: The node's latest known `LightClientFinalityUpdate` has been updated value: | event: light_client_finality_update - data: {"version":"phase0", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finalized_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finality_branch": ["0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"], "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}} + data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finalized_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finality_branch": ["0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"], "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}} light_client_optimistic_update: description: The node's latest known `LightClientOptimisticUpdate` has been updated value: | event: light_client_optimistic_update - data: {"version":"phase0", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}} + data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "sync_aggregate": {"sync_committee_bits":"0x01", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}} payload_attributes: description: | The node has computed new payload attributes for execution payload building. From 0d2aa4c6cd856a0640fac2afcea3185138cc01e5 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 14 Jan 2024 16:20:40 -0800 Subject: [PATCH 6/6] chore: upgrade to latest openapi (#409) Co-authored-by: Paul Harris --- beacon-node-oapi.yaml | 2 +- types/p2p.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 164baed6..09597aba 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -1,4 +1,4 @@ -openapi: "3.0.3" +openapi: "3.1.0" info: title: "Eth Beacon Node API" diff --git a/types/p2p.yaml b/types/p2p.yaml index dc61ba07..3859ccb6 100644 --- a/types/p2p.yaml +++ b/types/p2p.yaml @@ -49,8 +49,9 @@ Peer: peer_id: $ref: "./p2p.yaml#/PeerId" enr: - nullable: true - $ref: "./p2p.yaml#/ENR" + oneOf: + - type: "null" + - $ref: "./p2p.yaml#/ENR" last_seen_p2p_address: allOf: - $ref: "./p2p.yaml#/Multiaddr"