diff --git a/CHANGES.md b/CHANGES.md index c15ebdd4..a3cbeb8a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,7 @@ There are likely to be descriptions etc outside of the list below, but new query | [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v2/beacon/blocks/{block_id}` added `deneb` block to response | | | | | | | [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v1/validator/blinded_blocks/{slot}` added `deneb` blinded block | | | | | | | [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v1/validator/blocks/{slot}` added `deneb` block | | | | | | +| [#286](https://github.com/ethereum/beacon-APIs/pull/286) NEW `/eth/v1/beacon/blob_sidecars/{block_id}` | | | | | | | [#319](https://github.com/ethereum/beacon-APIs/pull/319) `/eth/v1/debug/beacon/heads` removed deprecated endpoint | | | | | | | [#302](https://github.com/ethereum/beacon-APIs/pull/302) Added `BlockContents` structures for `deneb` blocks and blob_sidecars | | | | | | diff --git a/apis/beacon/blob_sidecars/blob_sidecars.yaml b/apis/beacon/blob_sidecars/blob_sidecars.yaml new file mode 100644 index 00000000..9d9b4bf3 --- /dev/null +++ b/apis/beacon/blob_sidecars/blob_sidecars.yaml @@ -0,0 +1,59 @@ +get: + operationId: getBlobSidecars + summary: Get blob sidecars + description: | + Retrieves blob sidecars for a given block id. + Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ. + + If the `indices` paramneter is specified, only the blob sidecars with the specified indices will be returned. There are no guarantees + for the returned blob sidecars in terms of ordering. + tags: + - Beacon + parameters: + - name: block_id + in: path + required: true + $ref: '../../../beacon-node-oapi.yaml#/components/parameters/BlockId' + - name: indices + in: query + description: Array of indices for blob sidecars to request for in the specified block. Returns all blob sidecars in the block if not speicfied. + required: false + schema: + type: array + uniqueItems: true + items: + $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64' + responses: + "200": + description: "Successful response" + content: + application/json: + schema: + title: GetBlobsResponse + type: object + properties: + data: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlobSidecars" + application/octet-stream: + schema: + description: "SSZ serialized `BlobSidecars` bytes. Use Accept header to choose this response type" + "400": + description: "The block ID supplied could not be parsed" + content: + application/json: + schema: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" + example: + code: 400 + message: "Invalid block ID: current" + "404": + description: "Block not found" + content: + application/json: + schema: + $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" + example: + code: 404 + message: "Block not found" + "500": + $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index fb7ba960..9e96d18b 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -101,6 +101,8 @@ paths: $ref: "./apis/beacon/blocks/root.yaml" /eth/v1/beacon/blocks/{block_id}/attestations: $ref: "./apis/beacon/blocks/attestations.yaml" + /eth/v1/beacon/blob_sidecars/{block_id}: + $ref: "./apis/beacon/blob_sidecars/blob_sidecars.yaml" /eth/v1/beacon/rewards/sync_committee/{block_id}: $ref: "./apis/beacon/rewards/sync_committee.yaml" /eth/v1/beacon/deposit_snapshot: @@ -372,8 +374,8 @@ components: $ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock' Blob: $ref: './types/primitive.yaml#/Blob' - Deneb.BlobSidecar: - $ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecar' + Deneb.BlobSidecars: + $ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecars' Deneb.SignedBlobSidecar: $ref: './types/deneb/blob_sidecar.yaml#/Deneb/SignedBlobSidecar' Deneb.BlindedBlobSidecar: diff --git a/types/deneb/blob_sidecar.yaml b/types/deneb/blob_sidecar.yaml index 9fd0e511..5bb43ff3 100644 --- a/types/deneb/blob_sidecar.yaml +++ b/types/deneb/blob_sidecar.yaml @@ -86,5 +86,3 @@ Deneb: $ref: "#/Deneb/BlindedBlobSidecar" signature: $ref: "../primitive.yaml#/Signature" - - diff --git a/types/deneb/block.yaml b/types/deneb/block.yaml index 4a6bf653..bbc0f3a6 100644 --- a/types/deneb/block.yaml +++ b/types/deneb/block.yaml @@ -7,7 +7,7 @@ Deneb: randao_reveal: allOf: - $ref: '../primitive.yaml#/Signature' - - description: "The RanDAO reveal value provided by the validator." + - description: "The RANDAO reveal value provided by the validator." eth1_data: $ref: '../eth1.yaml#/Eth1Data' graffiti: diff --git a/types/deneb/block_and_blobs_sidecar.yaml b/types/deneb/block_and_blobs_sidecar.yaml deleted file mode 100644 index 8cce35f1..00000000 --- a/types/deneb/block_and_blobs_sidecar.yaml +++ /dev/null @@ -1,29 +0,0 @@ -Deneb: - BlobsSidecar: - type: object - description: "The `BlobsSidecar` object from the Deneb CL spec." - properties: - beacon_block_root: - $ref: "../primitive.yaml#/Root" - beacon_block_slot: - $ref: "../primitive.yaml#/Uint64" - blobs: - type: array - maxItems: 4 - minItems: 0 - items: - $ref: "#/Deneb/Blob" - kzg_aggregated_proof: - $ref: "#/Deneb/KZGProof" - - KZGProof: - type: string - format: hex - pattern: "^0x[a-fA-F0-9]{96}$" - description: "An aggregated KZG proof. Same check as `KZGCommitment`" - - Blob: - type: string - format: hex - pattern: "^0x[a-fA-F0-9]{262144}$" - description: "A blob is `FIELD_ELEMENTS_PER_BLOB * size_of(BLSFieldElement) = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded Blob as defined in Deneb" diff --git a/types/primitive.yaml b/types/primitive.yaml index d3cdede3..65fe7dde 100644 --- a/types/primitive.yaml +++ b/types/primitive.yaml @@ -140,4 +140,4 @@ KZGProof: type: string format: hex pattern: "^0x[a-fA-F0-9]{96}$" - description: "A KZG proof. Same check as `KZGCommitment`" + description: "A G1 curve point. Used for verifying that the `KZGCommitment` for a given `Blob` is correct."