-
Notifications
You must be signed in to change notification settings - Fork 207
Standardized Epbs Beacon Api #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
683a1e7
757f072
fecb841
740bf10
e605625
3ad50a6
f5dca29
d1c62fb
cd77f62
7a3d0e1
be01b6a
8730379
813c46e
1940d3f
994c2b7
6def5f7
17869db
5b395c3
6dea1bb
1e11453
37eaf5c
7bcc791
fe36269
de0d740
e12bf98
97f582f
eeeb4a1
8da01b0
e697311
347dabc
9c2acde
bd9a3c8
1aafd35
1e02d0a
62aee32
38694b5
91d634a
317e9d9
a0e5d77
9bedb00
fcf0d91
2196102
1679d4a
841f603
cbc7a43
7c50bdc
d5036b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,9 +11,10 @@ post: | |
| The beacon node is also expected to integrate the block into the 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 blobs. The broadcast behaviour may be adjusted via the | ||
| `broadcast_validation` query parameter. | ||
| successfully broadcast but failed integration. For Deneb/Electra/Fulu, this additionally instructs | ||
| the beacon node to broadcast all given blobs. For Gloas and later, blobs are broadcast as part | ||
| of the `ExecutionPayloadEnvelope` and are not submitted with the block. The broadcast behaviour | ||
| may be adjusted via the `broadcast_validation` query parameter. | ||
| parameters: | ||
| - name: broadcast_validation | ||
| in: query | ||
|
|
@@ -49,6 +50,7 @@ post: | |
| application/json: | ||
| schema: | ||
| anyOf: | ||
| - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.SignedBeaconBlock" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we deprecate blinded_blocks v2 in this pr?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can but it will be needed for pre-gloas, same as maybe deprecate them in h* release, and finally remove them in i* release |
||
| - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Fulu.SignedBlockContents" | ||
| - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlockContents" | ||
| - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| post: | ||
| operationId: publishExecutionPayloadBid | ||
| summary: Publish signed execution payload bid | ||
| description: | | ||
| Instructs the beacon node to broadcast a signed execution payload bid to the network, | ||
| to be gossiped for potential inclusion in block building. A success response (20x) indicates | ||
| that the bid passed gossip validation and was successfully broadcast onto the network. | ||
| tags: | ||
| - Beacon | ||
| parameters: | ||
| - in: header | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion" | ||
| required: true | ||
| name: Eth-Consensus-Version | ||
| description: "The active consensus version to which the execution payload bid being submitted belongs." | ||
| requestBody: | ||
| description: "The `SignedExecutionPayloadBid` object to be broadcast." | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.SignedExecutionPayloadBid" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `SignedExecutionPayloadBid` bytes. Use Content-Type header to specify this format" | ||
| responses: | ||
| "200": | ||
| description: "The bid was validated successfully and has been broadcast." | ||
| "400": | ||
| description: "The `SignedExecutionPayloadBid` object is invalid or failed gossip validation" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 400 | ||
| message: "Invalid signed execution payload bid" | ||
| "415": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| get: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this API assumes that the execution payload and blobs are built locally. This might not be the case for a builder who builds the block using custom block building software. The builder will have the execution payload, blobs bundle and execution requests ready with them, they will require a beacon-api which will construct the ExecutionPayloadEnvelope for them to sign. It would be desirable to also be able to pass in the bid, beacon block, execution payload, blobs bundle, execution requests to get the ExecutionPayloadEnvelope corresponding to the bid sent by the builder.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to send the blobs bundle? The KZG commitments are anyways included in the bid and we don't have to add it in the envelope, maybe we can skip it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've created an issue for this #575, we definitely need a new api for that. The current api as defined in this PR was primarily introduced for local block building but from discussions it became clear that we wanna keep the local block production stateless which does not work if you have 2 separate api calls. But there is still a use case for the api as specified here which is for builders that wanna build an execution payload with their local EL, these are likely not gonna be the sophisticated builders but useful if CL clients want to implement "act as a builder".
might be needed if builders want this to be stateless? not sure if that's a concern for them |
||
| operationId: getSignedExecutionPayloadEnvelope | ||
| summary: Get signed execution payload envelope | ||
| description: | | ||
| Retrieves signed execution payload envelope for a given block id. | ||
| Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ. | ||
| tags: | ||
| - Beacon | ||
| parameters: | ||
| - name: block_id | ||
| in: path | ||
| required: true | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/parameters/BlockId' | ||
| responses: | ||
| "200": | ||
| description: "Successful response" | ||
| headers: | ||
| Eth-Consensus-Version: | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version' | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetExecutionPayloadEnvelopeResponse | ||
| type: object | ||
| required: [version, execution_optimistic, finalized, data] | ||
| properties: | ||
| version: | ||
| type: string | ||
| enum: [gloas] | ||
| example: "gloas" | ||
| execution_optimistic: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" | ||
| finalized: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" | ||
| data: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.SignedExecutionPayloadEnvelope" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `SignedExecutionPayloadEnvelope` 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: "Execution payload envelope not found" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 404 | ||
| message: "Execution payload envelope not found" | ||
| "406": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/NotAcceptable" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| get: | ||
| operationId: getPoolPayloadAttestations | ||
| summary: Get payload attestations from operations pool | ||
| description: Retrieves payload attestations known by the node but not necessarily incorporated into any block | ||
nflaig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| parameters: | ||
| - name: slot | ||
| in: query | ||
| required: false | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64" | ||
| tags: | ||
| - Beacon | ||
| responses: | ||
| "200": | ||
| description: Successful response | ||
| headers: | ||
| Eth-Consensus-Version: | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version' | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetPoolPayloadAttestationsResponse | ||
| type: object | ||
| required: [version, data] | ||
| properties: | ||
| version: | ||
| type: string | ||
| enum: [gloas] | ||
| example: "gloas" | ||
| data: | ||
| type: array | ||
| items: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadAttestation" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `List[PayloadAttestation, MAX_PAYLOAD_ATTESTATIONS]` bytes. Use Accept header to choose this response type" | ||
| "400": | ||
| description: "The slot could not be parsed" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 400 | ||
| message: "Invalid slot parameter" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
|
|
||
| post: | ||
| operationId: submitPayloadAttestationMessages | ||
| summary: Submit payload attestation messages | ||
| description: | | ||
| Submits payload attestation messages to the beacon node. | ||
|
|
||
| The beacon node will validate each payload attestation message according to the gossip validation rules | ||
| and, if valid, store it in the pool and broadcast it globally to the network. | ||
|
|
||
| A success response indicates that the payload attestation message passed validation and was | ||
| successfully stored and broadcast. | ||
|
|
||
| If one or more payload attestation messages fail validation, the node MUST return a 400 error with details of which messages have failed, and why. | ||
| parameters: | ||
| - in: header | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion" | ||
| required: true | ||
| name: Eth-Consensus-Version | ||
| description: "The active consensus version to which the payload attestation message being submitted belongs." | ||
| tags: | ||
| - Beacon | ||
| - ValidatorRequiredApi | ||
| requestBody: | ||
| description: "Array of `PayloadAttestationMessage` objects to be submitted." | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadAttestationMessage" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `List[PayloadAttestationMessage, PTC_SIZE]` bytes. Use Content-Type header to indicate that SSZ data is contained in the request body." | ||
| responses: | ||
| "200": | ||
| description: "Payload attestation messages are stored in pool and broadcasted to the network" | ||
| "400": | ||
| description: "Errors with one or more payload attestation messages" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/IndexedErrorMessage" | ||
| "415": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
Uh oh!
There was an error while loading. Please reload this page.