From 263f4ed6c263c967f13279c7a9f5629b51c5fc55 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 16 Nov 2022 06:54:53 +0100 Subject: [PATCH] Give liveness epoch same "shape" as attester duties (#253) https://github.com/ethereum/beacon-APIs/pull/131 introduced a new liveness endpoint - the request is similar to attester duties in that we query a list of attesters for data pertaining to a particular epoch - as such, it seems reasonable to keep the two requests similar in terms of their URL/postdata structure. Co-authored-by: Paul Harris --- apis/validator/liveness.yaml | 20 +++++++++++--------- beacon-node-oapi.yaml | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/apis/validator/liveness.yaml b/apis/validator/liveness.yaml index 601a7268..1dc92c05 100644 --- a/apis/validator/liveness.yaml +++ b/apis/validator/liveness.yaml @@ -12,6 +12,13 @@ post: and based upon a subjective view of the network. A beacon node that was recently started or suffered a network partition may indicate that a validator is not live when it actually is." + parameters: + - name: epoch + description: "The epoch for which liveness is being queried" + in: path + required: true + schema: + $ref: "../../beacon-node-oapi.yaml#/components/schemas/Uint64" requestBody: description: "An array of the validator indices for which to detect liveness." required: true @@ -19,15 +26,10 @@ post: application/json: schema: title: PostLivenessRequestBody - type: object - properties: - epoch: - $ref: "../../beacon-node-oapi.yaml#/components/schemas/Uint64" - indices: - type: array - items: - $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' - minItems: 1 + type: array + items: + $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' + minItems: 1 responses: "200": description: Success response diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index dcf6b094..fa1e6a22 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -172,7 +172,7 @@ paths: $ref: "./apis/validator/prepare_beacon_proposer.yaml" /eth/v1/validator/register_validator: $ref: "./apis/validator/register_validator.yaml" - /eth/v1/validator/liveness: + /eth/v1/validator/liveness/{epoch}: $ref: "./apis/validator/liveness.yaml" /eth/v1/events: