beacon-APIs
beacon-APIs copied to clipboard
Clarify requirement for validator balances body
Looking at the validator_balances endpoint there is some ambiguity around what to do in some cases. Specifically, for POST to /eth/v1/beacon/states/head/validator_balances:
With no body:
- lighthouse returns an error
- lodestar returns an error
- nimbus returns an error
- prysm returns an error
- teku returns all balances
With an empty array in the body:
- lighthouse returns no balances
- lodestar returns no balances
- nimbus returns all balances
- prysm returns all balances
- teku returns all balances
I think that the best balance of attempting to retain existing functionality whilst firming up the spec is to state that no body will return an error, and an empty array will return all balances. This also ensures that users have a way to obtain all balances easily..