gaia icon indicating copy to clipboard operation
gaia copied to clipboard

GRPC reflection is broken on the hub

Open mmulji-ic opened this issue 1 year ago • 5 comments

Summary of Bug

Hubl is a tool that allows to query any Cosmos SDK based chain. @tac0turtle reported the following error:

$ ./hubl init cosmoshub
Configuring cosmoshub
Found data for cosmoshub in the chain registry
✔ Notional: grpc-cosmoshub-ia.cosmosia.notional.ventures:443

Error: error building protoregistry.Files: proto: message field "tendermint.liquidity.v1beta1.MsgCreatePool.deposit_coins" cannot resolve type: resolved "cosmos.base.v1beta1.Coin", but "cosmos/base/v1beta1/coin.proto" is not imported

Using a different query endpoint, results in a different error:

❯ hubl init cosmoshub
Configuring cosmoshub
Found data for cosmoshub in the chain registry
✔ Lavender.Five Nodes :bee:: cosmoshub-grpc.lavenderfive.com:443
cosmoshub-grpc.lavenderfive.com:443 endpoint selected
This chain does not support cosmos.reflection.v1 yet... attempting to use a fallback. Some features may be unsupported and it may not be possible to read all data.
panic: rpc error: code = Unavailable desc = unexpected HTTP status code received from server: 429 (Too Many Requests); malformed header: missing HTTP content-type

goroutine 26 [running]:
cosmossdk.io/tools/hubl/internal.loadFileDescriptorsGRPCReflection.func1()
	/Users/mmulji/pkg/mod/cosmossdk.io/tools/[email protected]/internal/compat.go:55 +0x158
created by cosmossdk.io/tools/hubl/internal.loadFileDescriptorsGRPCReflection
	/Users/mmulji/pkg/mod/cosmossdk.io/tools/[email protected]/internal/compat.go:46 +0x1ec

Other chains such as Osmosis and Regen also have limited support at the moment.

Version

Latest version of hubl and 9.0.x series of Gaia, possibly earlier.

Steps to Reproduce

Install hubl using go install cosmossdk.io/tools/hubl/cmd/hubl@latest Then run the following command: hubl init cosmoshub


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
  • [ ] Is a spike necessary to map out how the issue should be approached?

mmulji-ic avatar Apr 04 '23 08:04 mmulji-ic

Do you have any thoughts on how to best resolve this?

faddat avatar Apr 10 '23 19:04 faddat

Our team is also interested on this issue and its resolution, we would be glad to help or test :D

bizk avatar May 15 '23 18:05 bizk

And now grpcurl is also broken.

grpcurl grpc.cosmos.dragonstake.io:443 describe cosmos.staking.v1beta1.Query.ValidatorDelegations     
                                 
Failed to resolve symbol "cosmos.staking.v1beta1.Query.ValidatorDelegations": file "cosmos/staking/v1beta1/query.proto" included an unresolvable reference to ".cosmos.staking.v1beta1.TokenizeShareRecord"

alexesDev avatar Sep 21 '23 20:09 alexesDev

Seems like in Gaia v12.0.0 Release SDK should have been updated to the version https://github.com/cosmos/cosmos-sdk/tree/v0.45.16-ics-lsm but: gaiad version --long response is cosmos_sdk_version: v0.45.16-ics without lsm. Is it OK?

SergeyMitk avatar Oct 03 '23 11:10 SergeyMitk

Same here, v14.1.0, grpcurl v1.8.9. I did not verify the other references to errors.

gaia avatar Mar 04 '24 23:03 gaia

Seems to be resolved for v15.1.0. gaiad <= v14.2.0 was using cosmos-sdk/v0.45.16-ics and a hand rolled proto builder.

With the upgrade to cosmos-sdk/v0.47.x the issue should be solved.

➜ grpcurl grpc.cosmos.dragonstake.io:443 describe cosmos.staking.v1beta1.Query.ValidatorDelegations

cosmos.staking.v1beta1.Query.ValidatorDelegations is a method:
rpc ValidatorDelegations ( .cosmos.staking.v1beta1.QueryValidatorDelegationsRequest ) returns ( .cosmos.staking.v1beta1.QueryValidatorDelegationsResponse ) {
  option (.cosmos.query.v1.module_query_safe) = true;
  option (.google.api.http) = {
    get: "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"
  };
}

MSalopek avatar Mar 25 '24 17:03 MSalopek