Add get_delegators_for_validator
Motivation
Adds an endpoint to get all delegators for a particular validator.
Test Plan
See the sister PR: https://github.com/AleoHQ/snarkVM/pull/2434
This is awaiting a benchmark. We will perform this soon.
What's the status on this PR? I see failing CIs across the board and no benchmarks.
Thx for pushing on this. Looks like a valid DoS vector if someone exposes their endpoints.
I think its likely other REST endpoints (e.g. GET /<network>/block/{height}/transactions and GET /<network>/blocks?) would cause similar performance issues. If you agree, it might be good to tackle defenses which apply across multiple REST endpoints in a separate PR so its easier to review.
Or perhaps our recommendation should be for clients with a public endpoint to have a very low general rate limit. Infura doesn't let you query geth directly either.