-
Notifications
You must be signed in to change notification settings - Fork 210
add proposer preferences related api specifications #593
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
base: master
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| get: | ||
| operationId: getPoolProposerPreferences | ||
| summary: Get proposer preferences from operations pool | ||
| description: Retrieves proposer preferences known by the node but not necessarily incorporated into any block | ||
| 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: GetPoolProposerPreferencesResponse | ||
| 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.SignedProposerPreferences" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `List[SignedProposerPreferences]` 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: submitSignedProposerPreferences | ||
| summary: Submit signed proposer preferences | ||
| description: | | ||
| Submits signed proposer preferences to the beacon node. | ||
|
|
||
| The beacon node will validate each signed proposer preferences 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 signed proposer preferences passed validation and was | ||
| successfully stored and broadcast. | ||
|
|
||
| If one or more signed proposer preferences 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 signed proposer preferences being submitted belongs." | ||
| tags: | ||
| - Beacon | ||
| - ValidatorRequiredApi | ||
| requestBody: | ||
| description: "Array of `SignedProposerPreferences` objects to be submitted." | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.SignedProposerPreferences" | ||
| application/octet-stream: | ||
| schema: | ||
| description: "SSZ serialized `List[SignedProposerPreferences]` bytes. Use Content-Type header to indicate that SSZ data is contained in the request body." | ||
| responses: | ||
| "200": | ||
| description: "Signed proposer preferences are stored in pool and broadcasted to the network" | ||
| "400": | ||
| description: "Errors with one or more signed proposer preferences" | ||
| 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" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ get: | |
| - execution_payload_available | ||
| - execution_payload_bid | ||
| - payload_attestation_message | ||
| - proposer_preferences | ||
| responses: | ||
| "200": | ||
| description: Opened SSE stream. | ||
|
|
@@ -170,6 +171,11 @@ get: | |
| value: | | ||
| event: payload_attestation_message | ||
| data: {"version":"gloas", "data":{"validator_index": "123", "data": {"beacon_block_root": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "slot": "10", "payload_present": true, "blob_data_available": true}, "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}} | ||
| proposer_preferences: | ||
| description: The node has received a `SignedProposerPreferences` (from P2P or API) that passes gossip validation on the `proposer_preferences` topic | ||
| value: | | ||
| event: proposer_preferences | ||
| data: {"version":"gloas", "data":{"message": {"proposal_slot": "32", "validator_index": "123", "fee_recipient": "0x0000000000000000000000000000000000000000", "gas_limit": "30000000"}, "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}} | ||
|
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. you want an event for every single proposer preference? not like an array of everything that was sent?
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. guess we can go with this for now and change it if it's too noisy |
||
| "400": | ||
| description: "The topics supplied could not be parsed" | ||
| content: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| Gloas: | ||
| ProposerPreferences: | ||
| type: object | ||
| description: "The [`ProposerPreferences`](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/p2p-interface.md#proposerpreferences) object from the CL Gloas spec." | ||
| required: [proposal_slot, validator_index, fee_recipient, gas_limit] | ||
| properties: | ||
| proposal_slot: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| validator_index: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| fee_recipient: | ||
| $ref: "../primitive.yaml#/ExecutionAddress" | ||
| gas_limit: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
|
|
||
| SignedProposerPreferences: | ||
| type: object | ||
| description: "The [`SignedProposerPreferences`](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/p2p-interface.md#signedproposerpreferences) object from the CL Gloas spec." | ||
| required: [message, signature] | ||
| properties: | ||
| message: | ||
| $ref: "#/Gloas/ProposerPreferences" | ||
| signature: | ||
| $ref: "../primitive.yaml#/Signature" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should be under the validator client folder not pool