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 for QueryValidatorDelegationsRequest #21

Open
danbryan opened this issue Aug 30, 2022 · 3 comments
Open

Pagination for QueryValidatorDelegationsRequest #21

danbryan opened this issue Aug 30, 2022 · 3 comments

Comments

@danbryan
Copy link

danbryan commented Aug 30, 2022

Hello, I am a validator on Kujira, and due to a recent change, many people have over 100 delegations now. These are mostly small fractional numbers, but it appears to have passed a limit used by the cosmos-exporter.

# curl -s cosmos-exporter:9300/metrics/validator?address=kujiravaloper1dnmz4yzv73lr3lmauuaa0wpwn8zm8s20memec4 | grep -v "#" |gr
ep cosmos_validator_delegations | wc -l
100

I believe the default pagination limit is 100

It looks like you support pagination in a few staking types like
QueryValidatorsRequest - source

but not for others like
QueryValidatorDelegationsRequest

Any chance you can add pagination support here:

https://github.com/solarlabsteam/cosmos-exporter/blob/master/validator.go#L281

@co8
Copy link

co8 commented Aug 30, 2022

same issue here 🤘

@kj89
Copy link

kj89 commented Aug 30, 2022

we also got the same issue, maybe someone can hep us to figure it out

cosmos-exporter version v0.2.2

@KyleMoser
Copy link

KyleMoser commented Aug 31, 2022

We (Defiant Labs) are working on a fix for this...

BTW, I do not think QueryValidatorsRequest supports pagination either. To support pagination you need to use the NextKey field and make additional requests, which it doesn't do. For now I am going to fix QueryValidatorDelegationsRequest (which is what Dan wanted). If someone confirms that there's other broken pagination I can fix those as well.

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

4 participants