Skip to content

Commit

Permalink
Give liveness epoch same "shape" as attester duties (#253)
Browse files Browse the repository at this point in the history
#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 <[email protected]>
  • Loading branch information
arnetheduck and rolfyone authored Nov 16, 2022
1 parent b3c4def commit 263f4ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions apis/validator/liveness.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ 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
content:
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
Expand Down
2 changes: 1 addition & 1 deletion beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 263f4ed

Please sign in to comment.