Cosmos-sdk: unify sender tags for ease of querying

Created on 1 Mar 2019  Â·  10Comments  Â·  Source: cosmos/cosmos-sdk

Summary of Bug

Governance txs don't follow tags standard

Steps to Reproduce

While most of the transactions from a delegator can be queried using the delegator=<address> tag. Governance txs don't follow this standard and thus clients have to additionally query each single tx independently. For eg:

For all txs from a delegator but governance:

GET /txs?delegator=<address>

For gov txs:

GET /txs?action=submit_proposal&proposer=<address>
GET /txs?action=deposit&depositor=<address>
GET /txs?action=vote&voter=<address>

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
Legacy API api-breaking

All 10 comments

I don't quite follow the proposal @fedekunze. Where is the bug here?

removed label as it's technically not a bug _per se_

We should one tag that can be queried to return the list of transactions involving an address. Maybe this is something we could add as a flag to gaiacli q account

Or have a --from flag on gaiacli q txs

Like this call

I'm not sure if we should have --from as that may be confusing. Why not just query txs with sender=foo?

We already have that tag, but it’s not standard across all the modules

Also I’d like to get not only the ones I send but also the ones I receive, so maybe address=foo could be a better approach

@faboweb said we should use sender on all transactions, it can be either a validator or delegator address. I like that idea

There should be an easy way to query all txns involving one address.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rigelrozanski picture rigelrozanski  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

fedekunze picture fedekunze  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments