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

Panic message when query a IBC denom supply #11037

Closed
4 tasks
RaulBernal opened this issue Jan 27, 2022 · 5 comments · Fixed by #11170
Closed
4 tasks

Panic message when query a IBC denom supply #11037

RaulBernal opened this issue Jan 27, 2022 · 5 comments · Fixed by #11170
Assignees
Labels

Comments

@RaulBernal
Copy link

Summary of Bug

When you ask for a IBC denom supply you get a panic message:

{
  "code": 2,
  "message": "panic message redacted to hide potentially sensitive system info: panic",
  "details": [
  ]
}

https://cosmoshub.stakesystems.io/cosmos/bank/v1beta1/supply/0030B0AA8A1B9028703B1D17B965FBCBE0136571B854410BFEC3475B1DC765A1
https://cosmoshub.stakesystems.io/cosmos/bank/v1beta1/supply/977C824A11AF322AADA025C196ADC3A7F7409E342C35826106F9BF423AF32161

All the denoms with their amounts are here:
https://cosmoshub.stakesystems.io/cosmos/bank/v1beta1/supply

Version

some SDK v.0.44.x chains are affected

Steps to Reproduce

Ask a denom's supply:
https://cosmoshub.stakesystems.io/cosmos/bank/v1beta1/supply/0030B0AA8A1B9028703B1D17B965FBCBE0136571B854410BFEC3475B1DC765A1


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

alexanderbez commented Jan 27, 2022

Well the panic isn't good for sure, but I'm highly doubtful that's the correct URL. Try with ?denom=ibc/....

@tac0turtle
Copy link
Member

@RaulBernal did you have a chance to test this?

@tac0turtle
Copy link
Member

tac0turtle commented Feb 11, 2022

This seems like a bug, @alexanderbez ?denom=ibc/.. isn't supported here.

  rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {
    option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}";
  }

@RaulBernal
Copy link
Author

@RaulBernal did you have a chance to test this?

I didn't make it works

@amaury1093
Copy link
Contributor

In #10394, for querying balances we changed the REST endpoint:

- "/cosmos/bank/v1beta1/balances/{address}/{denom}"
+ "/cosmos/bank/v1beta1/balances/{address}/by_denom?denom={ibc_denom}"

We should do the same here for supply

- "/cosmos/bank/v1beta1/supply/{denom}"
+ "/cosmos/bank/v1beta1/supply/by_denom?denom={ibc_denom}"

It's a client-breaking change, but IMO it's worth it because it fixes querying IBC denoms.

@tac0turtle tac0turtle self-assigned this Feb 11, 2022
@tac0turtle tac0turtle moved this from Todo to In Progress in Cosmos SDK Maintenance Feb 11, 2022
Repository owner moved this from In Progress to Done in Cosmos SDK Maintenance Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants