-
Notifications
You must be signed in to change notification settings - Fork 715
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
Add a command to Gaia to retrieve all consumer chain keys for a specific consumer chain #2555
Comments
As a suggester of the feature in the first place, here's my usecase. I am writing a tool to track validators' uptime on cosmos-sdk chains. For that, I need two things
Without RS it's quite easy, as I can just query SigningInfos and Validators, and for each validator I can find its signing info by taking its consensus address and finding the SigningInfos entry with the same consensus address.
Problem is, imagine there are 175 validators. To calculate missed blocks for all active validators, I need to do the following queries as of now:
This might be 1) slow and 2) unreliable, and it'd be nice to have a possibility to query for all assigned consensus key for a consumer chain, so I'll need to do 3 queries in total to calculate the missed blocks counter for all validators on a consumer chain. I am pretty sure other maintainers of bots tracking the validators' uptime will face it, so I think this will be useful. I'm mostly interested in the API to return all the consensus keys on a specific consumer chain, however having a command to do it from CLI shouldn't be that difficult to make I assume. |
Wouldn't this make sense to define the cobra command in interchain-security and then import into gaia? |
Actually it seems like the keeper method is already in place: https://github.com/cosmos/interchain-security/blob/e8868556cadfa95a6b0786bd75d7a42debabc57a/x/ccv/provider/keeper/key_assignment.go#L62. I guess what's needed is only 1) add a query handler and 2) add a CLI command. If it's that simple I can try implementing this on my own, is that good?
Seems so |
This is to track when it actually lands in Gaia. cc @freak12techno Will create an ICS issue linked to this. |
This issue is blocked for now as the work will be done on the interchain-security repo. |
Summary
Add a command for getting all consumer keys for a consumer chain.
Problem Definition
I want to be able to add a consumer chain support for my monitoring bot, and I’ll need to query for consumer keys on all validators, and it’s more correct to query all of it at once with one query instead of querying it for each validator separately
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: