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

Pagination not available in gRPC base.tendermint.Service. GetValidatorSetByHeight #8560

Closed
4 tasks
kwunyeung opened this issue Feb 10, 2021 · 0 comments · Fixed by #8567
Closed
4 tasks

Pagination not available in gRPC base.tendermint.Service. GetValidatorSetByHeight #8560

kwunyeung opened this issue Feb 10, 2021 · 0 comments · Fixed by #8567
Assignees

Comments

@kwunyeung
Copy link
Contributor

Summary of Bug

The pagination in the return result of this gRPC call to cosmos.base.tendermint.Service. GetValidatorSetByHeight is always undefined 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 legacy API doesn't work.

Version

v0.40.1

Steps to Reproduce

Desmos testnet currently have 125 validators. The validators set queried by this gRPC call only shows 100 validators.

Query validator set directly from Tendermint RPC

http://rpc.morpheus.desmos.network:26657/validators?height=300516

Query validator set using legacy API

http://lcd.morpheus.desmos.network:1317/cosmos/base/tendermint/v1beta1/validatorsets/300516

{
  "code": 12,
  "message": "Not Implemented",
  "details": [
  ]
}

Query validator set using legacy API with Tendermint RPC

curl -s http://lcd.morpheus.desmos.network:1317/validatorsets/300516 | jq '.result.validators | length'

100

It returns result with 100 validators without pagination information.

Query validator set using tendermint.Service.GetValidatorSetByHeight via gRPC-web in node.js

The returned result is an array of 100 validators with pagination undefined.

I20210210-11:39:49.206(0)?     {
I20210210-11:39:49.206(0)?       address: 'desmosvalcons10xxdl3dljx3ff8gzexumfyf745fvlkegtga06l',
I20210210-11:39:49.206(0)?       pubKey: [Object],
I20210210-11:39:49.207(0)?       votingPower: 1,
I20210210-11:39:49.207(0)?       proposerPriority: -78029
I20210210-11:39:49.207(0)?     },
I20210210-11:39:49.207(0)?     {
I20210210-11:39:49.207(0)?       address: 'desmosvalcons10cnrenu8a0hqdlxunr33ectaj2rkhha8m0n0g7',
I20210210-11:39:49.207(0)?       pubKey: [Object],
I20210210-11:39:49.207(0)?       votingPower: 1,
I20210210-11:39:49.207(0)?       proposerPriority: 103846
I20210210-11:39:49.207(0)?     }
I20210210-11:39:49.207(0)?   ],
I20210210-11:39:49.208(0)?   pagination: undefined
I20210210-11:39:49.208(0)? }

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
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

Successfully merging a pull request may close this issue.

2 participants