ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.15k stars 283 forks source link

Replace GET validators api calls with POST api where possible #6831

Closed nflaig closed 5 days ago

nflaig commented 4 months ago

We might wanna start using the postStateValidators api instead of getStateValidators to avoid issues such as https://github.com/ChainSafe/lodestar/discussions/6830.

This should be pretty safe to change this in CLI commands such as voluntary exit as users will likely interact with a Lodestar BN which implements the api https://github.com/ChainSafe/lodestar/blob/8b6ecc44c1892115d0e7396b2a5f0ae8fc0d9e6f/packages/cli/src/cmds/validator/voluntaryExit.ts#L212

We could also consider doing it in indicies store but need to ensure all other CL clients support the api (maybe switch after electra) https://github.com/ChainSafe/lodestar/blob/8b6ecc44c1892115d0e7396b2a5f0ae8fc0d9e6f/packages/validator/src/services/indices.ts#L129