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

Add pagination support for AllValidatorsQuery #268

Open
alpe opened this issue Dec 2, 2021 · 2 comments
Open

Add pagination support for AllValidatorsQuery #268

alpe opened this issue Dec 2, 2021 · 2 comments

Comments

@alpe
Copy link
Member

alpe commented Dec 2, 2021

The AllValidatorsQuery queries the active set only (in wasmd). But it may become a more expensive query with a big set as seen on evmos testnet (300 validators)

The SDK provides a pagination object. But for an efficient query we should restrict this to:

  • key
  • limit
@ethanfrey
Copy link
Member

Hmmm... this is part of the CosmWasm API. We stabilised and tagged 1.0 API now. Guess we have to live with it, or find some non-breaking way to move forward. That will involve coordination of cosmwasm-std and wasmd....

@webmaster128
Copy link
Member

Where does this cause problems?

Breaking down one query into multiple will only be more expensive because you still need to serialize and deserialize every validator entry. It might save a bit of memory. So the real benefit would be for contracts that only want to query a subset of validators.

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

No branches or pull requests

3 participants