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

Review all queries that return lists #2187

Open
3 of 5 tasks
webmaster128 opened this issue Jul 14, 2024 · 2 comments
Open
3 of 5 tasks

Review all queries that return lists #2187

webmaster128 opened this issue Jul 14, 2024 · 2 comments

Comments

@webmaster128
Copy link
Member

webmaster128 commented Jul 14, 2024

@chipshort
Copy link
Collaborator

chipshort commented Aug 9, 2024

BankQuery::AllDenomMetadata is already paginated (optionally at least).

All of them should be paginated imo, because the contract has no control over the amount of return values for all of them. Specifically token factory and ibc tokens are turning some of these into a footgun when not paginated.
The only partial exceptions to this are AllDelegations and ListChannels, where the contract can at least control the amount of return values for its own address, but any user-controlled address is still highly problematic.

The problem with this is that we cannot introduce pagination now without breaking contract code or doing some very ugly stuff. We can use Option<PageRequest> and default to None to avoid breaking deployed contracts, but source code breakage is impossible to avoid because the query variants are not marked as #[non_exhaustive].

@webmaster128
Copy link
Member Author

I would say we proceed with AllBalances the same way as with ListChannels. It just cannot be advised to load all denoms for an address if denom generation is practically permissionless.

@chipshort chipshort removed this from the 2.2.0 milestone Sep 5, 2024
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

2 participants