osmosis-labs / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
14 stars 31 forks source link

cosmossdk.io/math.LegacyDec and Int are not correctly deserialized in "some" grpc queries #550

Open doggystylez opened 4 months ago

doggystylez commented 4 months ago

Summary of Bug

please see https://github.com/cosmos/cosmos-sdk/issues/18430

it has been suggested that replace google.golang.org/grpc => google.golang.org/grpc v1.33.2 will fix it but it requires changing the grpc client implementation and some other stuff to get it to build

Version

osmosisd v23

Steps to Reproduce

$ osmosisd q poolmanager estimate-single-pool-swap-exact-amount-in 1399 41489642uosmo ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2 --grpc-insecure --grpc-addr grpc.osmosis.zone:9090
panic: invalid Go type math.Int for field osmosis.poolmanager.v1beta1.EstimateSwapExactAmountInResponse.token_out_amount

<...>

$ osmosisd q mint epoch-provisions --grpc-insecure --grpc-addr grpc.osmosis.zone:9090
panic: invalid Go type math.LegacyDec for field osmosis.mint.v1beta1.QueryEpochProvisionsResponse.epoch_provisions

<...>

interestingly, other queries which also include a LegacyDec, such as in concentratedliquidity module seem to work...