REST VC: Use POST to fetch validators #13239
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
Our REST validator client on Prater cannot start validating because of this error:
failed to get state validators: HTTP request unsuccessful (431: Request Header Fields Too Large)
. This is happening because we issue a GET request to GetValidators with 1024 validator pubkeys in the query string, which is too long for the HTTP server. To mitigate issues such as this, a POST version of the GetValidators endpoint was proposed in the Beacon API spec: ethereum/beacon-APIs#367. This PR switches how the REST validator client obtains validators - it will use POST from now on.