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

Query validator by address #755

Closed
Matthews3301 opened this issue Apr 29, 2022 · 3 comments
Closed

Query validator by address #755

Matthews3301 opened this issue Apr 29, 2022 · 3 comments

Comments

@Matthews3301
Copy link

Is your feature request related to a problem? Please describe.
I would like to query validator by address only rather than launchID + address. This is to be used in Ignite front-end.

In https://github.com/tendermint/spn/blob/develop/proto/launch/query.proto you can find

// Queries a genesisValidator by index.
rpc GenesisValidator(QueryGetGenesisValidatorRequest) returns (QueryGetGenesisValidatorResponse) {
  option (google.api.http).get = "/tendermint/spn/launch/genesis_validator/{launchID}/{address}";
}

Describe the solution you'd like
Would it be possible to also add something like this:

// Queries a genesisValidator by address.
rpc GenesisValidator(QueryGetGenesisValidatorRequest) returns (QueryGetGenesisValidatorResponse) {
  option (google.api.http).get = "/tendermint/spn/launch/genesis_validator/{address}";
}

This would return an array since sometimes a validator is present in multiple launches.

Describe alternatives you've considered
Tried querying RPC directly, however this is not possible.

@fadeev
Copy link
Contributor

fadeev commented Apr 29, 2022

Since this is not critical for the UI, let's postpone this.

@fadeev
Copy link
Contributor

fadeev commented May 2, 2022

Right now, we can query for all the "add validator" requests with the following query:

https://api.nightly.starport.network/cosmos/tx/v1beta1/txs?events=message.action=%27request_add_validator%27

This, however, only shows requests for all validators.

What we need instead is:

  • events to filter all "add validator" request of a particular validator that were approved
  • events to filter all "remove validator" request of a particular validator that were approved

Most likely this is going to use txs?events=message.action="settle_request" and we need to add something.validator_address="spn***" and something.request_status="approved".

In any case, what this should allow us to do is fetch all approved add validator requests from a particular validator and remove the approved remove validator requests.

@lumtis
Copy link
Contributor

lumtis commented Jun 9, 2022

Closing as it should be solved by the backend solution

@lumtis lumtis closed this as completed Jun 9, 2022
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

3 participants