From 4533e4e7160b117dd17bda543c06f9ea8558597a Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Wed, 12 Jun 2024 08:18:45 +0100 Subject: [PATCH 1/2] Clarify requiremnt for validator balances body. --- apis/beacon/states/validator_balances.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apis/beacon/states/validator_balances.yaml b/apis/beacon/states/validator_balances.yaml index cf9ccf1e..7fbe6d05 100644 --- a/apis/beacon/states/validator_balances.yaml +++ b/apis/beacon/states/validator_balances.yaml @@ -79,7 +79,7 @@ post: description: | Returns filterable list of validators balances. - Balances will be returned for all indices or public key that match known validators. If an index or public key does not + Balances will be returned for all indices or public keys that match known validators. If an index or public key does not match any known validator, no balance will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; the index is returned for each balance, and can be used to confirm for which inputs a response has been returned. @@ -90,8 +90,11 @@ post: in: path $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' requestBody: - description: "An array of either hex encoded public key (any bytes48 with 0x prefix) or validator index" - required: false + description: | + Either hex encoded public key (any bytes48 with 0x prefix) or validator index. + + If the supplied list is empty (i.e. the body is `[]`) then balances will be returned for all validators. + required: true content: application/json: schema: From 32ef522688afa5ab417ecd859c382c604b60268d Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Tue, 13 Aug 2024 11:25:09 +0100 Subject: [PATCH 2/2] Updates after review. --- apis/beacon/states/validator_balances.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/beacon/states/validator_balances.yaml b/apis/beacon/states/validator_balances.yaml index 7fbe6d05..aa0c3b7d 100644 --- a/apis/beacon/states/validator_balances.yaml +++ b/apis/beacon/states/validator_balances.yaml @@ -91,10 +91,10 @@ post: $ref: '../../../beacon-node-oapi.yaml#/components/parameters/StateId' requestBody: description: | - Either hex encoded public key (any bytes48 with 0x prefix) or validator index. + An array of values, with each value either a hex encoded public key (any bytes48 with 0x prefix) or a validator index. - If the supplied list is empty (i.e. the body is `[]`) then balances will be returned for all validators. - required: true + If the supplied list is empty (i.e. the body is `[]`) or no body is supplied then balances will be returned for all validators. + required: false content: application/json: schema: