-
Notifications
You must be signed in to change notification settings - Fork 625
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
Paginating over ClientStates causes endless requests #2935
Comments
In a different test case performing the same query it looks better:
However, it is still unclear why the first page does not contain a constant number of elements. This is testing against |
Thanks for reporting this issue, @webmaster128. I think it's a bit strange that in the Looking at the code, I see that we use the @webmaster128 what's the impact this bug is causing for you? Just asking so that we can prioritize accordingly. And would you need a fix in the v3 release line or could we just release this fix in the next major release (v7)? Please also note that for v3, only the v3.3.x and v3.4.x branches are currently supported. |
Thank you for the detailed answer.
I think it is safe to call the query practically unusable. However, I don't know which application really needs a list of clients. I wanted to use it for a new detailed home screen of our IBC visualizer tool but I can live without it and just loop over connections instead. At the end of the day this is a nice-to-have debugging tool. |
Thanks for the quick response, @webmaster128!
Yeah, I think that's fair to say. :)
I think @womensrights could help us to figure this out, and see if there's anybody else impacted (although I guess not, otherwise they would have already opened an issue...).
Understood. Then I think, given the information we have at the moment, that we could try to fix and release this with v7 then. |
We would like to use pagination also in Hermes eventually. Not an urgent request. From what I recall we always specify |
It's a good first step. Without significant changes, we can't optimize the iteration over all client store keys to round up all clients, but the issue you pointed out does exist. I was unaware of this before, so which one we use throughout the codebase is likely random. I would recommend all our gRPC's to use Iterating over clients should be the main place we have to iterate over keys we may not care about. Though it looks to be the case here as well Lets switch to Thanks @webmaster128 for the detailed bug report! |
Summary of Bug
I am trying to use the
ClientStates
query with pagination. However, most result pages contain no elements and nextKey is always non-empty.Expected Behaviour
Each page of a
ClientStates
query contains dozens of results by default and after a few pages, the paginationnextKey
is unset.Version
wasmd 0.29.0-rc2
cosmos-sdk 0.45.8
ibc-go 3.3.0
Steps to Reproduce
I query against nois-testnet-003, a network with 48 clients (https://ibc.nois.network/connections). When I do that in CosmJS, I get the following pages. My script stopped after 60 seconds of requests.
Full output with 816 pages: test.log.
This output is generated from a CosmJS test: https://github.com/cosmos/cosmjs/pull/1352/files.
For Admin Use
The text was updated successfully, but these errors were encountered: