Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ There are likely to be descriptions etc outside of the list below, but new query
| [#641](https://github.com/ethereum/beacon-APIs/pull/641) `block EVENT` updated | | | | | |
| [#615](https://github.com/ethereum/beacon-APIs/pull/615) `GET /eth/v2/debug/fork_choice` added | | | | | |
| [#615](https://github.com/ethereum/beacon-APIs/pull/615) `GET /eth/v1/debug/fork_choice` deprecated | | | | | |
| [#657](https://github.com/ethereum/beacon-APIs/pull/657) `GET /eth/v1/beacon/states/{state_id}/ptc` added | | | | | |

The Following are no longer in the Standard API, removed since the latest version.

Expand Down
57 changes: 57 additions & 0 deletions apis/beacon/states/ptc.yaml
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'
4 changes: 4 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ paths:
$ref: "./apis/beacon/states/committee.yaml"
/eth/v1/beacon/states/{state_id}/sync_committees:
$ref: "./apis/beacon/states/sync_committees.yaml"
/eth/v1/beacon/states/{state_id}/ptc:

Copy link
Copy Markdown
Member Author

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_window endpoint, similar to the existing /proposer_lookahead endpoint

$ref: "./apis/beacon/states/ptc.yaml"
/eth/v1/beacon/states/{state_id}/randao:
$ref: "./apis/beacon/states/randao.yaml"
/eth/v1/beacon/states/{state_id}/pending_consolidations:
Expand Down Expand Up @@ -509,6 +511,8 @@ components:
$ref: "./types/gloas/execution_payload_envelope.yaml#/Gloas/SignedExecutionPayloadEnvelopeContents"
Gloas.PayloadAttestationData:
$ref: "./types/gloas/payload_attestation.yaml#/Gloas/PayloadAttestationData"
Gloas.PayloadTimelinessCommittee:
$ref: "./types/gloas/payload_timeliness_committee.yaml#/Gloas/PayloadTimelinessCommittee"
Gloas.PayloadAttestation:
$ref: "./types/gloas/payload_attestation.yaml#/Gloas/PayloadAttestation"
Gloas.PayloadAttestationMessage:
Expand Down
8 changes: 8 additions & 0 deletions types/gloas/payload_timeliness_committee.yaml
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
7 changes: 1 addition & 6 deletions types/gloas/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ Gloas:
type: array
description: "Fixed vector of 96 payload-timeliness committees."
items:
type: array
description: "Fixed vector of 512 validator indices."
items:
$ref: "../primitive.yaml#/Uint64"
minItems: 512
maxItems: 512
$ref: "./payload_timeliness_committee.yaml#/Gloas/PayloadTimelinessCommittee"
minItems: 96
maxItems: 96
Loading