Repository navigation
Add PTC state endpoint #657
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
5 commits
Select commit
Hold shift + click to select a range
0de39a2
feat: add ptc state endpoint
nflaig 693a259
docs: clarify ptc slot range
nflaig 6f423fd
Remove redundant allowEmptyValue from PTC endpoint
nflaig 3a9a04f
Merge master into nflaig/ptc-state-endpoint
nflaig b54b823
clarify ptc slot range at genesis
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
Some comments aren't visible on the classic Files Changed page.
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,57 @@ | ||
| get: | ||
| operationId: "getStatePtc" | ||
| summary: "Get the payload timeliness committee for a slot." | ||
| description: | | ||
| Returns the [payload timeliness committee](https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.0/specs/gloas/beacon-chain.md#new-get_ptc) for the requested slot from the state with the given `state_id`. | ||
| Should return 400 if the state retrieved or the requested slot is prior to Gloas. | ||
| tags: | ||
| - Beacon | ||
| parameters: | ||
| - name: state_id | ||
| in: path | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' | ||
| - name: slot | ||
| description: | | ||
| Slot for which to retrieve the committee. Defaults to the state's slot. | ||
| The slot's epoch must be between `get_current_epoch(state) - 1` | ||
| (or the genesis epoch in the case of underflow) and | ||
| `get_current_epoch(state) + MIN_SEED_LOOKAHEAD`, inclusive. | ||
| in: query | ||
| required: false | ||
| schema: | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64' | ||
| responses: | ||
| "200": | ||
| description: Success | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetStatePtcResponse | ||
| 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: object | ||
| required: [slot, validators] | ||
| properties: | ||
| slot: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64" | ||
| validators: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Gloas.PayloadTimelinessCommittee" | ||
| "400": | ||
| description: "Invalid state ID or slot, pre-Gloas state or slot, or slot outside the PTC window" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 400 | ||
| message: "Slot is outside the PTC window of the state" | ||
| "404": | ||
| $ref: '../../../beacon-node-oapi.yaml#/components/responses/NotFound' | ||
| "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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Gloas: | ||
| PayloadTimelinessCommittee: | ||
| type: array | ||
| description: "The [`PayloadTimelinessCommittee`](https://github.com/ethereum/consensus-specs/blob/v1.7.0-beta.0/specs/gloas/beacon-chain.md#new-payloadtimelinesscommittee) vector from the CL Gloas spec. Validator indices are in committee order and may contain duplicates." | ||
| items: | ||
| $ref: '../primitive.yaml#/Uint64' | ||
| minItems: 512 | ||
| maxItems: 512 |
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.
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.
alternatively, or in addition could add a
/eth/v1/beacon/states/{state_id}/ptc_windowendpoint, similar to the existing/proposer_lookaheadendpoint