From b5367bcb6bc8be00ce78561284513aca49edf7db Mon Sep 17 00:00:00 2001 From: realbigsean Date: Mon, 30 Oct 2023 12:18:56 -0400 Subject: [PATCH 01/12] Revert "Add blob signing endpoints (#302)" This reverts commit f0ffbb8f85f152cbcfe5974c41d0b93cb7264a9d. --- apis/beacon/blocks/blinded_blocks.yaml | 5 ++-- apis/beacon/blocks/blocks.yaml | 5 ++-- apis/validator/blinded_block.yaml | 2 +- apis/validator/block.v2.yaml | 2 +- beacon-node-oapi.yaml | 22 ++------------- types/deneb/block_contents.yaml | 37 -------------------------- types/primitive.yaml | 12 --------- 7 files changed, 8 insertions(+), 77 deletions(-) delete mode 100644 types/deneb/block_contents.yaml diff --git a/apis/beacon/blocks/blinded_blocks.yaml b/apis/beacon/blocks/blinded_blocks.yaml index 23748c99..75253448 100644 --- a/apis/beacon/blocks/blinded_blocks.yaml +++ b/apis/beacon/blocks/blinded_blocks.yaml @@ -13,8 +13,7 @@ post: successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Pre-Bellatrix, this endpoint will accept - a `SignedBeaconBlock`. After Deneb, this additionally instructs the beacon node to broadcast all given - signed blobs. + a `SignedBeaconBlock`. parameters: - in: header schema: @@ -33,7 +32,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBlockContents" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/beacon/blocks/blocks.yaml b/apis/beacon/blocks/blocks.yaml index 18be883f..a7cd3b96 100644 --- a/apis/beacon/blocks/blocks.yaml +++ b/apis/beacon/blocks/blocks.yaml @@ -11,8 +11,7 @@ post: The beacon node is also expected to integrate the block into state, but may broadcast it before doing so, so as to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was - successfully broadcast but failed integration. After Deneb, this additionally instructs - the beacon node to broadcast all given signed blobs. + successfully broadcast but failed integration. parameters: - in: header schema: @@ -31,7 +30,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/validator/blinded_block.yaml b/apis/validator/blinded_block.yaml index 20c2d42b..d1b7a5d0 100644 --- a/apis/validator/blinded_block.yaml +++ b/apis/validator/blinded_block.yaml @@ -63,7 +63,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBlockContents" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index 29ac4cc9..11bcfb2d 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -60,7 +60,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 5e12bfdc..a3d04863 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -355,36 +355,18 @@ components: $ref: './types/capella/light_client.yaml#/Capella/LightClientFinalityUpdate' Capella.LightClientOptimisticUpdate: $ref: './types/capella/light_client.yaml#/Capella/LightClientOptimisticUpdate' - Capella.Withdrawal: - $ref: './types/withdrawal.yaml#/Withdrawal' Deneb.BeaconState: $ref: './types/deneb/state.yaml#/Deneb/BeaconState' Deneb.BeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/BeaconBlock' - Deneb.BlockContents: - $ref: './types/deneb/block_contents.yaml#/Deneb/BlockContents' Deneb.SignedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/SignedBeaconBlock' - Deneb.SignedBlockContents: - $ref: './types/deneb/block_contents.yaml#/Deneb/SignedBlockContents' Deneb.BlindedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/BlindedBeaconBlock' - Deneb.SignedBlindedBlockContents: - $ref: './types/deneb/block_contents.yaml#/Deneb/SignedBlindedBlockContents' - Deneb.BlindedBlockContents: - $ref: './types/deneb/block_contents.yaml#/Deneb/BlindedBlockContents' Deneb.SignedBlindedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock' - Blob: - $ref: './types/primitive.yaml#/Blob' - Deneb.BlobSidecars: - $ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecars' - Deneb.SignedBlobSidecar: - $ref: './types/deneb/blob_sidecar.yaml#/Deneb/SignedBlobSidecar' - Deneb.BlindedBlobSidecar: - $ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlindedBlobSidecar' - Deneb.SignedBlindedBlobSidecar: - $ref: './types/deneb/blob_sidecar.yaml#/Deneb/SignedBlindedBlobSidecar' + Capella.Withdrawal: + $ref: './types/withdrawal.yaml#/Withdrawal' Node: $ref: './types/fork_choice.yaml#/Node' ExtraData: diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml deleted file mode 100644 index 1fa4fddf..00000000 --- a/types/deneb/block_contents.yaml +++ /dev/null @@ -1,37 +0,0 @@ -Deneb: - BlockContents: - type: object - description: "The required object for block production according to the Deneb CL spec." - properties: - block: - $ref: "./block.yaml#/Deneb/BeaconBlock" - blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/BlobSidecars" - - BlindedBlockContents: - type: object - description: "The required object for blinded block production according to the Deneb CL spec." - properties: - blinded_block: - $ref: "./block.yaml#/Deneb/BlindedBeaconBlock" - blinded_blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/BlindedBlobSidecars" - - SignedBlockContents: - type: object - description: "The required signed components of block production according to the Deneb CL spec." - properties: - signed_block: - $ref: "./block.yaml#/Deneb/SignedBeaconBlock" - signed_blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/SignedBlobSidecars" - - SignedBlindedBlockContents: - type: object - description: "The required signed components of block production according to the Deneb CL spec." - properties: - signed_blinded_block: - $ref: "./block.yaml#/Deneb/SignedBlindedBeaconBlock" - signed_blinded_blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/SignedBlindedBlobSidecars" - \ No newline at end of file diff --git a/types/primitive.yaml b/types/primitive.yaml index f87a4718..45ad2842 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -126,21 +126,9 @@ LogsBloom: example: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" pattern: "^0x[a-fA-F0-9]{512}$" -Blob: - type: string - format: hex - pattern: "^0x[a-fA-F0-9]{262144}$" - description: "A blob is `FIELD_ELEMENTS_PER_BLOB * size_of(BLSFieldElement) = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded Blob as defined in Deneb" - KZGCommitment: type: string format: hex pattern: "^0x[a-fA-F0-9]{96}$" description: "A G1 curve point. Same as BLS standard \"is valid pubkey\" check but also allows `0x00..00` for point-at-infinity" example: "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" - -KZGProof: - type: string - format: hex - pattern: "^0x[a-fA-F0-9]{96}$" - description: "A G1 curve point. Used for verifying that the `KZGCommitment` for a given `Blob` is correct." From b43b5a6681d544cf6debcb5f9116b2e76c7d7071 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Mon, 30 Oct 2023 15:38:40 -0400 Subject: [PATCH 02/12] add back things we still need --- apis/beacon/blocks/blocks.yaml | 5 +++-- apis/validator/block.v2.yaml | 2 +- beacon-node-oapi.yaml | 12 ++++++++++-- types/deneb/block_contents.yaml | 19 +++++++++++++++++++ types/primitive.yaml | 6 ++++++ 5 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 types/deneb/block_contents.yaml diff --git a/apis/beacon/blocks/blocks.yaml b/apis/beacon/blocks/blocks.yaml index a7cd3b96..18be883f 100644 --- a/apis/beacon/blocks/blocks.yaml +++ b/apis/beacon/blocks/blocks.yaml @@ -11,7 +11,8 @@ post: The beacon node is also expected to integrate the block into state, but may broadcast it before doing so, so as to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was - successfully broadcast but failed integration. + successfully broadcast but failed integration. After Deneb, this additionally instructs + the beacon node to broadcast all given signed blobs. parameters: - in: header schema: @@ -30,7 +31,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBeaconBlock" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/validator/block.v2.yaml b/apis/validator/block.v2.yaml index 11bcfb2d..29ac4cc9 100644 --- a/apis/validator/block.v2.yaml +++ b/apis/validator/block.v2.yaml @@ -60,7 +60,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconBlock" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents" application/octet-stream: schema: description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`." diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index a3d04863..4b6477cb 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -355,18 +355,26 @@ components: $ref: './types/capella/light_client.yaml#/Capella/LightClientFinalityUpdate' Capella.LightClientOptimisticUpdate: $ref: './types/capella/light_client.yaml#/Capella/LightClientOptimisticUpdate' + Capella.Withdrawal: + $ref: './types/withdrawal.yaml#/Withdrawal' Deneb.BeaconState: $ref: './types/deneb/state.yaml#/Deneb/BeaconState' Deneb.BeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/BeaconBlock' + Deneb.BlockContents: + $ref: './types/deneb/block_contents.yaml#/Deneb/BlockContents' Deneb.SignedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/SignedBeaconBlock' + Deneb.SignedBlockContents: + $ref: './types/deneb/block_contents.yaml#/Deneb/SignedBlockContents' Deneb.BlindedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/BlindedBeaconBlock' Deneb.SignedBlindedBeaconBlock: $ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock' - Capella.Withdrawal: - $ref: './types/withdrawal.yaml#/Withdrawal' + Blob: + $ref: './types/primitive.yaml#/Blob' + Deneb.BlobSidecars: + $ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecars' Node: $ref: './types/fork_choice.yaml#/Node' ExtraData: diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml new file mode 100644 index 00000000..396cf265 --- /dev/null +++ b/types/deneb/block_contents.yaml @@ -0,0 +1,19 @@ +Deneb: + BlockContents: + type: object + description: "The required object for block production according to the Deneb CL spec." + properties: + block: + $ref: "./block.yaml#/Deneb/BeaconBlock" + blob_sidecars: + $ref: "./blob_sidecar.yaml#/Deneb/BlobSidecars" + + SignedBlockContents: + type: object + description: "The required signed components of block production according to the Deneb CL spec." + properties: + signed_block: + $ref: "./block.yaml#/Deneb/SignedBeaconBlock" + signed_blob_sidecars: + $ref: "./blob_sidecar.yaml#/Deneb/SignedBlobSidecars" + diff --git a/types/primitive.yaml b/types/primitive.yaml index 45ad2842..065148f6 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -126,6 +126,12 @@ LogsBloom: example: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" pattern: "^0x[a-fA-F0-9]{512}$" +Blob: + type: string + format: hex + pattern: "^0x[a-fA-F0-9]{262144}$" + description: "A blob is `FIELD_ELEMENTS_PER_BLOB * size_of(BLSFieldElement) = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded Blob as defined in Deneb" + KZGCommitment: type: string format: hex From 131c291103e9d7edacc7717b3d28407ce1770268 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 09:46:00 -0400 Subject: [PATCH 03/12] update blob sidecar structure and block contents structure --- types/deneb/blob_sidecar.yaml | 78 +++++---------------------------- types/deneb/block_contents.yaml | 38 +++++++++++++--- types/primitive.yaml | 7 +++ 3 files changed, 51 insertions(+), 72 deletions(-) diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index 4f287b75..d806c8cc 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -6,83 +6,27 @@ Deneb: minItems: 0 maxItems: 6 + CommitmentInclusionProof: + type: array + items: + $ref: "../primitive.yaml#/Bytes32" + minItems: 17 + maxItems: 17 + BlobSidecar: type: object description: "A blob sidecar as defined in the Deneb consensus spec." properties: - block_root: - $ref: "../primitive.yaml#/Root" index: $ref: "../primitive.yaml#/Uint64" - slot: - $ref: "../primitive.yaml#/Uint64" - block_parent_root: - $ref: "../primitive.yaml#/Root" - proposer_index: - $ref: "../primitive.yaml#/Uint64" blob: $ref: "../primitive.yaml#/Blob" kzg_commitment: $ref: '../primitive.yaml#/KZGCommitment' kzg_proof: $ref: '../primitive.yaml#/KZGProof' + signed_block_header: + $ref: "./block.yaml#/Deneb/SignedBeaconBlockHeader" + commitment_inclusion_proof: + $ref: '#/Deneb/CommitmentInclusionProof' - SignedBlobSidecars: - type: array - items: - $ref: '#/Deneb/SignedBlobSidecar' - minItems: 0 - maxItems: 6 - - SignedBlobSidecar: - type: object - description: "The `SignedBlobSidecar` object envelope from the CL Deneb spec." - properties: - message: - $ref: "#/Deneb/BlobSidecar" - signature: - $ref: "../primitive.yaml#/Signature" - - BlindedBlobSidecars: - type: array - items: - $ref: '#/Deneb/BlindedBlobSidecar' - minItems: 0 - maxItems: 6 - - BlindedBlobSidecar: - type: object - description: "A blob sidecar with the SSZ root of the blob rather than the full blob." - properties: - block_root: - $ref: "../primitive.yaml#/Root" - index: - $ref: "../primitive.yaml#/Uint64" - slot: - $ref: "../primitive.yaml#/Uint64" - block_parent_root: - $ref: "../primitive.yaml#/Root" - proposer_index: - $ref: "../primitive.yaml#/Uint64" - blob_root: - $ref: "../primitive.yaml#/Root" - kzg_commitment: - $ref: '../primitive.yaml#/KZGCommitment' - kzg_proof: - $ref: '../primitive.yaml#/KZGProof' - - SignedBlindedBlobSidecars: - type: array - items: - $ref: '#/Deneb/SignedBlindedBlobSidecar' - minItems: 0 - maxItems: 6 - - SignedBlindedBlobSidecar: - type: object - description: "A variant of the `SignedBlobSidecar` object envelope from the CL Deneb spec, which contains a `BlindedBlobSidecar` rather than a `BlobSidecar`." - properties: - message: - $ref: "#/Deneb/BlindedBlobSidecar" - signature: - $ref: "../primitive.yaml#/Signature" diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml index 396cf265..6df79236 100644 --- a/types/deneb/block_contents.yaml +++ b/types/deneb/block_contents.yaml @@ -1,12 +1,37 @@ Deneb: + KZGCommitments: + type: array + items: + $ref: '../primitive.yaml#/KZGCommitment' + minItems: 0 + maxItems: 6 + + KzgProofs: + type: array + items: + $ref: '../primitive.yaml#/KZGProof' + minItems: 0 + maxItems: 6 + + Blobs: + type: array + items: + $ref: "../primitive.yaml#/Blob" + minItems: 0 + maxItems: 6 + BlockContents: type: object description: "The required object for block production according to the Deneb CL spec." properties: block: $ref: "./block.yaml#/Deneb/BeaconBlock" - blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/BlobSidecars" + kzg_commitments: + $ref: "#/Deneb/KZGCommitments" + kzg_proofs: + $ref: "#/Deneb/KZGProofs" + blobs: + $ref: "#/Deneb/Blobs" SignedBlockContents: type: object @@ -14,6 +39,9 @@ Deneb: properties: signed_block: $ref: "./block.yaml#/Deneb/SignedBeaconBlock" - signed_blob_sidecars: - $ref: "./blob_sidecar.yaml#/Deneb/SignedBlobSidecars" - + kzg_commitments: + $ref: "#/Deneb/KZGCommitments" + kzg_proofs: + $ref: "#/Deneb/KZGProofs" + blobs: + $ref: "#/Deneb/Blobs" diff --git a/types/primitive.yaml b/types/primitive.yaml index 065148f6..4c44bad5 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -138,3 +138,10 @@ KZGCommitment: pattern: "^0x[a-fA-F0-9]{96}$" description: "A G1 curve point. Same as BLS standard \"is valid pubkey\" check but also allows `0x00..00` for point-at-infinity" example: "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" + +KZGProof: + type: string + format: hex + pattern: "^0x[a-fA-F0-9]{96}$" + description: "A G1 curve point. Used for verifying that the `KZGCommitment` for a given `Blob` is correct." + From 7efb8e52b2cd9bebbbff775308f5a834374b6042 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 10:21:18 -0400 Subject: [PATCH 04/12] fix lints --- apis/beacon/blocks/blinded_blocks.v2.yaml | 5 ++--- apis/validator/block.v3.yaml | 2 +- types/deneb/blob_sidecar.yaml | 2 +- types/deneb/block_contents.yaml | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apis/beacon/blocks/blinded_blocks.v2.yaml b/apis/beacon/blocks/blinded_blocks.v2.yaml index ed69b0de..c49fc7ff 100644 --- a/apis/beacon/blocks/blinded_blocks.v2.yaml +++ b/apis/beacon/blocks/blinded_blocks.v2.yaml @@ -13,8 +13,7 @@ post: successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Pre-Bellatrix, this endpoint will accept - a `SignedBeaconBlock`. After Deneb, this additionally instructs the beacon node to broadcast all given - signed blobs. The broadcast behaviour may be adjusted via the `broadcast_validation` + a `SignedBeaconBlock`. The broadcast behaviour may be adjusted via the `broadcast_validation` query parameter. parameters: - name: broadcast_validation @@ -55,7 +54,7 @@ post: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock" - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock" - - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBlockContents" + - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body." diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index c4cfc9c6..b3b5bb12 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -83,7 +83,7 @@ get: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents" - - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBlockContents" + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock" application/octet-stream: schema: description: "SSZ serialized block or blinded block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version` and block type in `Eth-Blinded-Payload`." diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index d806c8cc..101e4f1d 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -26,7 +26,7 @@ Deneb: kzg_proof: $ref: '../primitive.yaml#/KZGProof' signed_block_header: - $ref: "./block.yaml#/Deneb/SignedBeaconBlockHeader" + $ref: "../block.yaml#/Deneb/SignedBeaconBlockHeader" commitment_inclusion_proof: $ref: '#/Deneb/CommitmentInclusionProof' diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml index 6df79236..c0a4adc1 100644 --- a/types/deneb/block_contents.yaml +++ b/types/deneb/block_contents.yaml @@ -6,7 +6,7 @@ Deneb: minItems: 0 maxItems: 6 - KzgProofs: + KZGProofs: type: array items: $ref: '../primitive.yaml#/KZGProof' From 117e7951a8b465f7314d0be6122eefe737677fc3 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 10:23:49 -0400 Subject: [PATCH 05/12] fix path for signed block header --- types/deneb/blob_sidecar.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index 101e4f1d..f9ddbb35 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -26,7 +26,7 @@ Deneb: kzg_proof: $ref: '../primitive.yaml#/KZGProof' signed_block_header: - $ref: "../block.yaml#/Deneb/SignedBeaconBlockHeader" + $ref: "../block.yaml#/SignedBeaconBlockHeader" commitment_inclusion_proof: $ref: '#/Deneb/CommitmentInclusionProof' From a8f3aa9a933ad8b1dbec232aad08617082dd94ff Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 11:35:12 -0400 Subject: [PATCH 06/12] experiment adding type dropdown --- apis/validator/block.v3.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index b3b5bb12..103f156f 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -75,8 +75,10 @@ get: type: string example: "12345" data: + discriminator: + propertyName: type oneOf: - - $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock' + - $ref: "../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" From 82f8667b9ff42128c11f4ee28aff07ff63a8fcd2 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 12:06:09 -0400 Subject: [PATCH 07/12] try again --- apis/validator/block.v3.yaml | 10 +++++++++- beacon-node-oapi.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index 103f156f..e21b3768 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -76,7 +76,15 @@ get: example: "12345" data: discriminator: - propertyName: type + mapping: + BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock" + Altair.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" + Bellatrix.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" + Bellatrix.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" + Capella.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" + Capella.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" + Deneb.BlockContents: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents" + Deneb.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock" oneOf: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 4b6477cb..47690182 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" From f4b053eabf63c08b4d9d17c2e20bc2a5e6834315 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 14:09:24 -0400 Subject: [PATCH 08/12] delete discriminator --- apis/validator/block.v3.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apis/validator/block.v3.yaml b/apis/validator/block.v3.yaml index e21b3768..c7b8ff76 100644 --- a/apis/validator/block.v3.yaml +++ b/apis/validator/block.v3.yaml @@ -75,16 +75,6 @@ get: type: string example: "12345" data: - discriminator: - mapping: - BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock" - Altair.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" - Bellatrix.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock" - Bellatrix.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock" - Capella.BeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock" - Capella.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock" - Deneb.BlockContents: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlockContents" - Deneb.BlindedBeaconBlock: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock" oneOf: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock" - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock" From 5825d081412d84f2c1d46e193b003d65542002ab Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 14:10:17 -0400 Subject: [PATCH 09/12] revert oapi version bump --- beacon-node-oapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 47690182..4b6477cb 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -1,4 +1,4 @@ -openapi: "3.1.0" +openapi: "3.0.3" info: title: "Eth Beacon Node API" From c3775fc2aa9f6a41afff5f7815d2cc322521d85d Mon Sep 17 00:00:00 2001 From: realbigsean Date: Tue, 31 Oct 2023 14:17:55 -0400 Subject: [PATCH 10/12] remove kzg commitments from block contents --- types/deneb/block_contents.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml index c0a4adc1..6dffc3d4 100644 --- a/types/deneb/block_contents.yaml +++ b/types/deneb/block_contents.yaml @@ -1,11 +1,4 @@ Deneb: - KZGCommitments: - type: array - items: - $ref: '../primitive.yaml#/KZGCommitment' - minItems: 0 - maxItems: 6 - KZGProofs: type: array items: @@ -26,8 +19,6 @@ Deneb: properties: block: $ref: "./block.yaml#/Deneb/BeaconBlock" - kzg_commitments: - $ref: "#/Deneb/KZGCommitments" kzg_proofs: $ref: "#/Deneb/KZGProofs" blobs: @@ -39,8 +30,6 @@ Deneb: properties: signed_block: $ref: "./block.yaml#/Deneb/SignedBeaconBlock" - kzg_commitments: - $ref: "#/Deneb/KZGCommitments" kzg_proofs: $ref: "#/Deneb/KZGProofs" blobs: From e9d053821a6e4dafe8651637322fb4ac4da01f6c Mon Sep 17 00:00:00 2001 From: realbigsean Date: Thu, 2 Nov 2023 09:43:45 -0400 Subject: [PATCH 11/12] update commitment inclusion proof name --- types/deneb/blob_sidecar.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index f9ddbb35..ff8c8ca4 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -6,7 +6,7 @@ Deneb: minItems: 0 maxItems: 6 - CommitmentInclusionProof: + KZGCommitmentInclusionProof: type: array items: $ref: "../primitive.yaml#/Bytes32" @@ -27,6 +27,6 @@ Deneb: $ref: '../primitive.yaml#/KZGProof' signed_block_header: $ref: "../block.yaml#/SignedBeaconBlockHeader" - commitment_inclusion_proof: - $ref: '#/Deneb/CommitmentInclusionProof' + kzg_commitment_inclusion_proof: + $ref: '#/Deneb/KZGCommitmentInclusionProof' From 9a7c8b6439673efb1e608209c9e24c8d0721f52a Mon Sep 17 00:00:00 2001 From: realbigsean Date: Mon, 6 Nov 2023 09:03:01 -0500 Subject: [PATCH 12/12] update array max sizes to 4096 --- types/deneb/block_contents.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/deneb/block_contents.yaml b/types/deneb/block_contents.yaml index 6dffc3d4..5bbe86fa 100644 --- a/types/deneb/block_contents.yaml +++ b/types/deneb/block_contents.yaml @@ -4,14 +4,14 @@ Deneb: items: $ref: '../primitive.yaml#/KZGProof' minItems: 0 - maxItems: 6 + maxItems: 4096 Blobs: type: array items: $ref: "../primitive.yaml#/Blob" minItems: 0 - maxItems: 6 + maxItems: 4096 BlockContents: type: object