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

F/validator historical query #122

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Conversation

maurolacy
Copy link
Collaborator

@maurolacy maurolacy commented Sep 12, 2023

Closes #119.

Turns out only this is required to have historical validator queries (if we don't mind losing history when validator is tombstoned).

This can be improved by doing a lower bound binary search for a given height. Given that queries will be mostly from recent heights, and that the list will be generally short, and can even be pruned relatively easily, I don't think it's worth it. In fact, linear search will probably be more efficient in practice.

Copy link
Collaborator

@JakeHartnell JakeHartnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@JakeHartnell JakeHartnell merged commit 8e520df into main Sep 12, 2023
2 checks passed
@JakeHartnell JakeHartnell deleted the f/validator-historical-query branch September 12, 2023 19:24
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.

Implement validator set historical queries
2 participants