Skip to content

Commit 0648809

Browse files
authored
Merge branch 'master' into electra-payload-attributes
2 parents 34db8e6 + 5091f41 commit 0648809

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ There are likely to be descriptions etc outside of the list below, but new query
1111
| [#535](https://github.com/ethereum/beacon-APIs/pull/535) `data_column_sidecar EVENT` added | | | | | |
1212
| [#537](https://github.com/ethereum/beacon-APIs/pull/537) `GET /eth/v1/debug/beacon/data_column_sidecars/{block_id}` added | | | | | |
1313
| [#539](https://github.com/ethereum/beacon-APIs/pull/539) `GET /eth/v1/beacon/states/{state_id}/proposer_lookahead` added | | | | | |
14+
| [#546](https://github.com/ethereum/beacon-APIs/pull/546) `GET /eth/v1/beacon/blobs/{block_id}` added | | | | | |
1415

1516
The Following are no longer in the Standard API, removed since the latest version.
1617

apis/beacon/blob_sidecars/blob_sidecars.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
get:
22
operationId: getBlobSidecars
33
summary: Get blob sidecars
4+
deprecated: true
45
description: |
56
Retrieves blob sidecars for a given block id.
67
Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ.

apis/beacon/blobs/blobs.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
get:
2+
operationId: getBlobs
3+
summary: Get blobs
4+
description: |
5+
Retrieves blobs for a given block id.
6+
Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ.
7+
8+
If the `versioned_hashes` parameter is specified, only the blobs for the specified versioned hashes will be returned. Blobs are
9+
returned as an ordered list matching the order of their corresponding KZG commitments in the block.
10+
11+
After the Fulu fork, only supernodes (which custody all data columns) are required to return blobs. Clients may implement
12+
blob reconstruction logic for non-super nodes.
13+
tags:
14+
- Beacon
15+
parameters:
16+
- name: block_id
17+
in: path
18+
required: true
19+
$ref: "../../../beacon-node-oapi.yaml#/components/parameters/BlockId"
20+
- name: versioned_hashes
21+
in: query
22+
description: Array of versioned hashes for blobs to request for in the specified block. Returns all blobs in the block if not specified.
23+
required: false
24+
schema:
25+
type: array
26+
uniqueItems: true
27+
items:
28+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/VersionedHash"
29+
responses:
30+
"200":
31+
description: "Successful response"
32+
content:
33+
application/json:
34+
schema:
35+
title: GetBlobsResponse
36+
type: object
37+
required: [execution_optimistic, finalized, data]
38+
properties:
39+
execution_optimistic:
40+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
41+
finalized:
42+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized"
43+
data:
44+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/Blobs"
45+
application/octet-stream:
46+
schema:
47+
description: "SSZ serialized `List[Blob, MAX_BLOB_COMMITMENTS_PER_BLOCK]` bytes. Use Accept header to choose this response type"
48+
"400":
49+
description: "The block ID supplied could not be parsed"
50+
content:
51+
application/json:
52+
schema:
53+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
54+
example:
55+
code: 400
56+
message: "Invalid block ID: current"
57+
"404":
58+
description: "Block not found"
59+
content:
60+
application/json:
61+
schema:
62+
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage"
63+
example:
64+
code: 404
65+
message: "Block not found"
66+
"406":
67+
$ref: "../../../beacon-node-oapi.yaml#/components/responses/NotAcceptable"
68+
"500":
69+
$ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError"

beacon-node-oapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ paths:
112112
$ref: "./apis/beacon/blocks/attestations.v2.yaml"
113113
/eth/v1/beacon/blob_sidecars/{block_id}:
114114
$ref: "./apis/beacon/blob_sidecars/blob_sidecars.yaml"
115+
/eth/v1/beacon/blobs/{block_id}:
116+
$ref: "./apis/beacon/blobs/blobs.yaml"
115117
/eth/v1/debug/beacon/data_column_sidecars/{block_id}:
116118
$ref: "./apis/debug/data_column_sidecars.yaml"
117119
/eth/v1/beacon/rewards/sync_committee/{block_id}:
@@ -381,6 +383,10 @@ components:
381383
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientOptimisticUpdate'
382384
Blob:
383385
$ref: './types/primitive.yaml#/Blob'
386+
Blobs:
387+
$ref: './types/deneb/block_contents.yaml#/Deneb/Blobs'
388+
VersionedHash:
389+
$ref: './types/primitive.yaml#/VersionedHash'
384390
Deneb.BlobSidecars:
385391
$ref: './types/deneb/blob_sidecar.yaml#/Deneb/BlobSidecars'
386392
Electra.BeaconState:

types/primitive.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,10 @@ KZGProof:
141141
format: hex
142142
pattern: "^0x[a-fA-F0-9]{96}$"
143143
description: "A G1 curve point. Used for verifying that the `KZGCommitment` for a given `Blob` is correct."
144+
145+
VersionedHash:
146+
type: string
147+
format: hex
148+
pattern: "^0x[a-fA-F0-9]{64}$"
149+
description: "A versioned hash used to identify a Blob."
150+
example: "0x01cf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"

0 commit comments

Comments
 (0)