From 0fd86fe8419f98fffa6e2769aa41dbd86546f414 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 27 Oct 2022 10:10:47 +0200 Subject: [PATCH 1/3] Give liveness epoch same "shape" as attester duties 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. --- apis/validator/liveness.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apis/validator/liveness.yaml b/apis/validator/liveness.yaml index 601a7268..ae1b7acb 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 From d55e1e01385ef52309d823bcf6699597f34c0bb5 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 27 Oct 2022 10:11:54 +0200 Subject: [PATCH 2/3] fix dots --- apis/validator/liveness.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/validator/liveness.yaml b/apis/validator/liveness.yaml index ae1b7acb..1dc92c05 100644 --- a/apis/validator/liveness.yaml +++ b/apis/validator/liveness.yaml @@ -18,7 +18,7 @@ post: in: path required: true schema: - $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64" + $ref: "../../beacon-node-oapi.yaml#/components/schemas/Uint64" requestBody: description: "An array of the validator indices for which to detect liveness." required: true @@ -28,7 +28,7 @@ post: title: PostLivenessRequestBody type: array items: - $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Uint64' + $ref: '../../beacon-node-oapi.yaml#/components/schemas/Uint64' minItems: 1 responses: "200": From 3719c25665704b9497dc7692f2d020aac1628e03 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 27 Oct 2022 10:15:45 +0200 Subject: [PATCH 3/3] add epoch to top level doc --- beacon-node-oapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 2c5fe225..6b324274 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -168,7 +168,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: