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

[Bug]: Querying cosmos-sdk native modules without --node flag #20689

Closed
1 task done
Lockwarr opened this issue Jun 17, 2024 · 4 comments
Closed
1 task done

[Bug]: Querying cosmos-sdk native modules without --node flag #20689

Lockwarr opened this issue Jun 17, 2024 · 4 comments
Assignees
Labels

Comments

@Lockwarr
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

On a chain which has upgraded to cosmos-sdk v0.50+ if you try to query a native cosmos-sdk module without using the --node flag, the node serves responses only on localhost:26657, no matter what configuration is set.

For example:
gaiad query gov params returns:
Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refuse

The localhost:26657 value is taken from client/config/config.go func DefaultConfig()
I suspect this problems is connected to the new AutoCLI feature.

  • I've tested this on a chain which is still with legacy wiring (no depinject)

Cosmos SDK Version

0.50+

How to reproduce?

Run binary query gov params on a node with sdk v0.50+

@Lockwarr Lockwarr added the T:Bug label Jun 17, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Jun 17, 2024
@julienrbrt julienrbrt self-assigned this Jun 17, 2024
@julienrbrt
Copy link
Member

julienrbrt commented Jun 17, 2024

Are you modifying the node in client.toml?
Which version of client/v2 are you using?

I am unable to reproduce on main (latest client/v2) and release/v0.50.x (latest client/v2 v0.50 based)
image

@Lockwarr
Copy link
Author

Lockwarr commented Jun 17, 2024

I've set up my node in config.toml to serve at rpc tcp://0.0.0.0:26610, the client.toml is also set to use node = "tcp://0.0.0.0:26110".
All cli commands work except querying commands for native cosmos-sdk modules, queries to those modules always try to use 0.0.0.0:26657

I'm using cosmossdk.io/client/v2 v2.0.0-beta.1 and github.com/cosmos/cosmos-sdk v0.50.7
I've double checked and I build the rootCmd as it is shown in the cosmos-sdk/simd/cmd/root.go

image

@julienrbrt
Copy link
Member

I see, yes we fixed the bug on release/v0.50.x (#19060) but haven't tagged a the next version of client/v2 just yet (#19530). Still blocked on one PR of mine to proceed. I would suggest if pressing to use v2.0.0-beta.1.0.20240124105859-5ad1805d0e79 (keep in mind that until #19646 is fixed the keyring UX may decrease compared to the released version)

@Lockwarr
Copy link
Author

Thanks for the quick responses, I've tested it with the suggested client/v2 version and it works as expected!
Will use replace temporarily and looking forward to the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants