-
Notifications
You must be signed in to change notification settings - Fork 201
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
Open
shane-moore
wants to merge
21
commits into
ethereum:master
Choose a base branch
from
shane-moore:epbs-standardized
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
982a63b
modified block production end points
shane-moore 7e5ec6b
epbs execution_payload_bid get and post
shane-moore dd77eaf
epbs execution_payload_envelope get and post
shane-moore 235b7d7
new epbs ptc assignment POST
shane-moore 016a598
new epbs payload_attestations get and post
shane-moore 052e2c5
small fixes
shane-moore ac6330d
epbs documentation updates
shane-moore 1f4497c
updates per pr review
shane-moore de25cb4
add produceBlockV4 endpoint
shane-moore 12845c0
epbs related copy changes
shane-moore 3e82332
add consensus version to bid and envelope post
shane-moore bf22476
gloas container links updated to use specific commit
shane-moore 2768a2e
add get bid error message for invalid builder index
shane-moore 4d8245b
add slot voting time parameters to validator-flow
shane-moore d18db70
add eth-consensus-version for payload attestations
shane-moore 7b8f609
update payload attestation get to have slot in path
shane-moore d20a86d
payload attestation post should support an array in the request
shane-moore b9177a7
updates per nico review
shane-moore a65ab3a
get execution payload envelope by block id
shane-moore 76165b8
updates per nico review
shane-moore bcbb22b
add payload attestation and execution payload bid events
shane-moore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| get: | ||
| 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: | ||
| - $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 execution payload envelope 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| post: | ||
| operationId: publishExecutionPayloadEnvelope | ||
| summary: Publish signed execution payload envelope | ||
| description: | | ||
| Instructs the beacon node to broadcast a signed execution payload envelope to the network, | ||
| to be gossiped for payload validation. A success response (20x) indicates | ||
| that the envelope passed gossip validation and was successfully broadcast onto the network. | ||
| tags: | ||
| - Beacon | ||
| - ValidatorRequiredApi | ||
| 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 envelope being submitted belongs." | ||
| requestBody: | ||
| description: "The `SignedExecutionPayloadEnvelope` object to be broadcast." | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.SignedExecutionPayloadEnvelope" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `SignedExecutionPayloadEnvelope` bytes. Use Content-Type header to specify this format" | ||
| responses: | ||
| "200": | ||
| description: "The envelope was validated successfully and has been broadcast." | ||
| "400": | ||
| description: "The SignedExecutionPayloadEnvelope 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 envelope" | ||
| "415": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/UnsupportedMediaType" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| 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" | ||
| "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" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,9 @@ get: | |
| - payload_attributes | ||
| - blob_sidecar | ||
| - data_column_sidecar | ||
| - execution_payload_available | ||
| - execution_payload_bid | ||
| - payload_attestation | ||
| responses: | ||
| "200": | ||
| description: Opened SSE stream. | ||
|
|
@@ -158,6 +161,21 @@ get: | |
| value: | | ||
| event: data_column_sidecar | ||
| data: {"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1", "kzg_commitments": ["0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"]} | ||
| execution_payload_available: | ||
|
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 we need one event stream for execution payload, bid and payload attestation
Author
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. |
||
| description: The node has verified that the execution payload and blobs for a block are available and ready for payload attestation | ||
| value: | | ||
| event: execution_payload_available | ||
| data: {"slot": "10", "block_root": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf"} | ||
| execution_payload_bid: | ||
| description: The node has received a `SignedExecutionPayloadBid` (from P2P or API) that passes gossip validation on the `execution_payload_bid` topic | ||
| value: | | ||
| event: execution_payload_bid | ||
| data: {"slot": "10", "builder_index": "42", "parent_block_root": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "block_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "value": "1000000000"} | ||
| payload_attestation: | ||
| description: The node has received a `PayloadAttestationMessage` that passes validation rules of the `payload_attestation` topic | ||
| value: | | ||
| event: payload_attestation | ||
| data: {"validator_index": "123", "slot": "10", "beacon_block_root": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "payload_present": true, "blob_data_available": true} | ||
| "400": | ||
| description: "The topics supplied could not be parsed" | ||
| content: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.