Skip to content

Add support for query parameters on staking queriers #2202

Closed

Description

Summary

Add support for query parameters on staking queriers for Gaia-lite GET requests

Problem Definition

No current way to query staking parameters from validators or delegation txs.

Rephrasing @sunnya97 #2139 (comment):

It'd be nice for staking queriers to support query parameters so you can query specifically bonded, jailed, etc

Same applies for the state of delegations, unbonds and redelegations on a specific block height, which is currently supported on CLI

Proposal

Delegation txs:

For the following endpoints:

  • delegator summary (delegators/{delegatorAddr})
  • .../<delegations>/...
  • .../unbonding-delegations/...
  • .../redelegations/...

Queries supported:

  • ?height=<block_height>: status at a specific block height.

Examples:

GET /stake/delegators/{delegatorAddr}?height=<block_height>
GET /stake/delegators/{delegatorAddr}/delegations/{validatorAddr}?height=<block_height>
GET /stake/delegators/{delegatorAddr}/unbonding-delegations/{validatorAddr}?height=<block_height>

Validators query

For the following endpoints:

  • .../validators:

Queries supported:

  • ?jailed=<true/false>
  • ?status=<bonded/unbonding/unbonded>
  • ?height=<block_height>: status at a specific block height. Useful to track voting power progress
  • ?moniker=<name>
  • ?website=<website>

Examples:

GET /stake/delegators/{delegatorAddr}/validators?jailed=true&status=unbonded
GET /stake/validators?height=32213

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions