snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

Add get_delegators_for_validator

Open vicsn opened this issue 1 year ago • 3 comments

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

vicsn avatar Apr 16 '24 14:04 vicsn

This is awaiting a benchmark. We will perform this soon.

iamalwaysuncomfortable avatar Apr 23 '24 21:04 iamalwaysuncomfortable

What's the status on this PR? I see failing CIs across the board and no benchmarks.

howardwu avatar Apr 29 '24 23:04 howardwu

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.

vicsn avatar May 04 '24 19:05 vicsn