Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use POST to obtain validator data. #146

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Use POST to obtain validator data. #146

merged 1 commit into from
Jul 10, 2024

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented Jun 11, 2024

Beacon nodes now support https://ethereum.github.io/beacon-APIs/#/Beacon/postStateValidators so this moves away from the chunk-based system to obtain all validators in a single request.

Note that if a request is made for all validators it still obtains data from the beacon state, as this will be faster due to SSZ encoding. As such, there is going to be a point at which fetching state would be faster than POSTing for the validators, however to make this work cleanly across relevant networks it's better to not attempt to create heuristics and instead go for this simple approach. Future changes to the beacon API may solve this problem.

Because this call can have a high impact for others I'm requesting comments and/or testing from users before merging. Pinging @moshe-blox @pk910 @y0sher @nkryuchkov .

@pk910
Copy link
Contributor

pk910 commented Jun 13, 2024

I like the simplification :)
Don't see any problems on my side.

@mcdee
Copy link
Contributor Author

mcdee commented Jul 9, 2024

If there are no further comments then I will look to merge this tomorrow.

@mcdee mcdee merged commit 704ceba into master Jul 10, 2024
0 of 3 checks passed
@mcdee mcdee deleted the post-validators branch July 10, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants