-
Notifications
You must be signed in to change notification settings - Fork 584
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
fix(rpc): address slowness in validator rpc #3960
Conversation
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve to unblock this PR. We discussed it offline, and it seems there is a clear path to implement it in a backward-compatible way ([null]
, ["block-hash"]
, [block-height-u64]
should keep working fine, though the latter two will resolve to the next_epoch_id
of the given block, representing the validators
stats for the whole epoch, but that is fine)
8915a8e
to
6c1935e
Compare
Fix #3614 by disallowing querying the validator rpc endpoint through block hash. Instead, valid queries are either for an epoch or for latest data. Inside epoch manager, validator info for past epochs are stored when we finalize an epoch to ensure that queries will not cause recomputation, which can potentially block the client actor. Test plan --------- * `test_get_validator_info` * `test_get_validator_info_rpc`
Fix #3614 by disallowing querying the validator rpc endpoint through block hash. Instead, valid queries are either for an epoch or for latest data. Inside epoch manager, validator info for past epochs are stored when we finalize an epoch to ensure that queries will not cause recomputation, which can potentially block the client actor.
Test plan
test_get_validator_info
test_get_validator_info_rpc