-
Notifications
You must be signed in to change notification settings - Fork 224
Add POST builders query endpoint #614
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7cdab88
Add POST builders query endpoint
rolfyone 80516ba
Address builder endpoint review feedback
rolfyone 68449e2
Clarify builder status derivation
rolfyone cb45ca3
Merge branch 'master' into builder-endpoint
rolfyone 98142ed
Add builder status request filter
rolfyone 0050f4e
Merge branch 'master' into builder-endpoint
rolfyone be7d5cd
changed builderStatus to string from review feedback, and removed ssz…
rolfyone 9ea2597
Merge branch 'master' into builder-endpoint
rolfyone b415d0f
review feedback
rolfyone f1fd94d
cleanup
rolfyone 4d2c986
Update types/gloas/builder.yaml
rolfyone 3bdbf0e
review feedback
rolfyone 5d8c099
Update apis/beacon/states/builders.yaml
nflaig 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| post: | ||
| operationId: "getStateBuilders" | ||
| summary: "Get builders from state" | ||
| description: | | ||
| Returns filterable list of builders with their status and index. | ||
|
|
||
| Information will be returned for all indices or public keys that match known builders. If an index or public key does not | ||
| match any known builder, no information will be returned but this will not cause an error. There are no guarantees for the | ||
| returned data in terms of ordering; both the index and public key are returned for each builder, and can be used to confirm | ||
| for which inputs a response has been returned. | ||
|
|
||
| Returns 400 if the requested state is prior to Gloas. | ||
| tags: | ||
| - Beacon | ||
| parameters: | ||
| - name: state_id | ||
| in: path | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' | ||
| requestBody: | ||
| description: | | ||
| The lists of builder IDs and statuses to filter on. | ||
| If no body is supplied then all builders will be returned. To return all active builders, omit `ids` and set `statuses` to `["active"]`. | ||
| required: false | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| required: [] | ||
| properties: | ||
| ids: | ||
| type: array | ||
| uniqueItems: true | ||
| description: | | ||
| An array of values, with each value either a hex encoded public key (any bytes48 with 0x prefix) or a builder index. | ||
|
|
||
| If the supplied list is empty (i.e. the value is `[]`) or the property is omitted then all builders will be returned. | ||
| items: | ||
| type: string | ||
| statuses: | ||
| type: array | ||
| uniqueItems: true | ||
| description: | | ||
| An array of builder statuses to filter on. | ||
|
|
||
| If the supplied list is empty (i.e. the value is `[]`) or the property is omitted then builders with all statuses will be returned. | ||
| items: | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/schemas/BuilderStatus' | ||
| responses: | ||
| "200": | ||
| description: Success | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetStateBuildersResponse | ||
| type: object | ||
| required: [execution_optimistic, finalized, data] | ||
| properties: | ||
| execution_optimistic: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" | ||
| finalized: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Finalized" | ||
| data: | ||
| type: array | ||
| items: | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/schemas/BuilderResponse' | ||
| "400": | ||
| description: "Invalid state ID, builder ID, or malformed request" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 400 | ||
| message: "Invalid state ID: current" | ||
| "404": | ||
| description: "State not found" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 404 | ||
| message: "State not found" | ||
| "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
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,23 @@ | ||
| Gloas: | ||
| Builder: | ||
| type: object | ||
| description: "The [`Builder`](https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.11/specs/gloas/beacon-chain.md#builder) object from the CL Gloas spec." | ||
| required: [pubkey, version, execution_address, balance, deposit_epoch, withdrawable_epoch] | ||
| properties: | ||
| pubkey: | ||
| $ref: "../primitive.yaml#/Pubkey" | ||
| version: | ||
| $ref: "../primitive.yaml#/Uint8" | ||
| description: "Builder version." | ||
| execution_address: | ||
| $ref: "../primitive.yaml#/ExecutionAddress" | ||
| description: "Execution-layer address that receives builder withdrawals." | ||
| balance: | ||
| $ref: "../primitive.yaml#/Gwei" | ||
| description: "Current builder balance in gwei." | ||
| deposit_epoch: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| description: "Epoch when the builder deposit was processed." | ||
| withdrawable_epoch: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| description: "Epoch when the builder can withdraw. 'FAR_FUTURE_EPOCH' if not exiting." |
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.