You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug seems to be similar to #8560 but different a little bit.
The pagination "total" in the return result of this gRPC call to cosmos.base.tendermint.Service. GetValidatorSetByHeight is always 180 and the number of elements in Validators is 100 even if a PageRequest is already set in the GetValidatorSetByHeightRequest. The validator set will return maximum of 100 validators without the pagination key to query the next page. The corresponding rest API doesn't work.
chemonoworld
changed the title
[Bug]: Result and Pagination is not available in gRPC cosmos.base.tendermint.Service. GetValidatorSetByHeight / GetLastestValidatorSet
[Bug]: Result and Pagination are not available in gRPC cosmos.base.tendermint.Service. GetValidatorSetByHeight / GetLastestValidatorSet
Oct 11, 2023
The core issue arises when querying validators from cometBFT, which enforces a maximum query limit of 100 validators to avoid overloading the node. This means that even if you set a limit above 100, 101 or 200, the query will always return the first page capped at 100 validators. You can find the code that enforces this limit here: cometBFT Code
Therefore, to retrieve the second page (the remaining 80 validators), you must use an offset equal to the limit you're setting, which is also the maximum limit allowed.
You will receive the remaining 80 validators as expected.
@tac0turtle it would be great to have this pagination behavior documented. I couldn't find anything about it, do you know if it's documented somewhere? If not, should we add it? Where do you think would be a good place to put it?
Is there an existing issue for this?
What happened?
This bug seems to be similar to #8560 but different a little bit.
The pagination "total" in the return result of this gRPC call to cosmos.base.tendermint.Service. GetValidatorSetByHeight is always 180 and the number of elements in Validators is 100 even if a PageRequest is already set in the GetValidatorSetByHeightRequest. The validator set will return maximum of 100 validators without the pagination key to query the next page. The corresponding rest API doesn't work.
Cosmos SDK Version
0.45, 0.47, 0.46(probably, but not checked)
How to reproduce?
Not happened in Tendermint RPC
But it happens in rest API
It looks good on the face of it but the number of validators is always 100 even if "pagination.limit" in query string is changed.
Also happens in gRPC
This always return the below result.
However,
This result in the return of this command is 100.
I also tried these with gRPC code(Golang) changing Request Pagination parameter but can take just only the same result.
The text was updated successfully, but these errors were encountered: