cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.26k stars 3.62k forks source link

[Bug]: query bank denom-owners does not return all results #22434

Open jgtormo opened 1 day ago

jgtormo commented 1 day ago

Is there an existing issue for this?

What happened?

Querying the Osmosis chain for the CUDOS token I noticed that most results are not displayed for query bank denom-owners.

Cosmos SDK Version

0.50.10

How to reproduce?

running osmosisd query bank denom-owners ibc/E09ED39F390EC51FA9F3F69BEA08B5BBE6A48B3057B2B1C3467FAAE9E58B021B --node https://rpc.osmosis.zone:443 returns, at the time of writing, 272 reponses. Mintscan correctly displays 933.

See for example osmosisd query bank balances osmo16pxcj9kfpqjvng7v8nc9krsgzl7wmuzq4qcrws --node https://rpc.osmosis.zone:443 -- that account has a balance for IBC CUDOS (ibc/E09ED39F390EC51FA9F3F69BEA08B5BBE6A48B3057B2B1C3467FAAE9E58B021B) but is not returned as part of the query bank denom-owners.

GNaD13 commented 4 hours ago

I think because the reason is because the returned results are paginated. Have you try to query the next page?

jgtormo commented 4 hours ago

yes, I did run it with --page-limit 10000 without that though, it still said that the total was 272

GNaD13 commented 3 hours ago

As I see, current cli does't define page limit flags so I think your page limit set flags will not work. I think you can just query with the next page instead of specific page size and it should be ok