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]: AutoCli cannot serialize Coin positional args #21071

Closed
1 task done
NeverHappened opened this issue Jul 25, 2024 · 10 comments · Fixed by #22817
Closed
1 task done

[Bug]: AutoCli cannot serialize Coin positional args #21071

NeverHappened opened this issue Jul 25, 2024 · 10 comments · Fixed by #22817
Assignees
Labels

Comments

@NeverHappened
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

We're integrating Autocli into neutron and have a problem with Coin as a positional argument.

If you're trying make cli tx with chaind command 1token_a, it returns error.

Can you help me understand? Since I believe there is not much more that can be changed.

Autocli link to code here:
https://github.com/neutron-org/neutron/blob/98f6c79c6092f37aa95f71035ad6841c40f1526d/x/tokenfactory/autocli.go#L58
Proto type:
https://github.com/neutron-org/neutron/blob/e855c8f1901a6954dec97748baabd7f98b5e02bc/proto/osmosis/tokenfactory/v1beta1/tx.proto#L59

I also have problems with some queries returning '{}' empty response, but this is another story

Cosmos SDK Version

0.50.7

How to reproduce?

  1. clone neutron: https://github.com/neutron-org/neutron
  2. checkout feat/autocli-all branch
  3. make build
  4. make init it can error, do not mind it for now (you can see working chain logs in tail -f ./data/test-1/test-1.log)
  5. ./build/neutrond tx tokenfactory mint "100tokenaa" --from demowallet1 --keyring-backend test --home ./data/test-1 --chain-id test-1 --fees 1000untr
@julienrbrt
Copy link
Member

Thanks! I'll check this ASAP.
My first thought on discord was a missing annotation, but I'll dig it further, as for instance, on main it works fine with tx bank send (or any other cosmos.base.v1beta1.Coin)

@NeverHappened
Copy link
Author

Yep, I saw that. But in tx bank send it's not a single Coin, but repeated Coins in the proto types.
Is this any different?

@NeverHappened
Copy link
Author

@julienrbrt did you had any chance looking at it?

@julienrbrt
Copy link
Member

I haven't yet. I am currently off. I'll look when I'm back.

@julienrbrt julienrbrt moved this from 📋 Backlog to 🤸‍♂️ In Progress in Cosmos-SDK Aug 7, 2024
@julienrbrt julienrbrt removed the status in Cosmos-SDK Sep 13, 2024
@julienrbrt
Copy link
Member

Looking now, sorry for the delay

@julienrbrt
Copy link
Member

I am unable to reproduce:

main...julien/autocli-debug

make install
make init-simapp
simd start &
simd q counter count # {}
simd tx counter increase-couter 100stake 5 --yes
simd q counter count # total_count: "5"

@julienrbrt julienrbrt added the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Sep 13, 2024
@julienrbrt
Copy link
Member

Can you make sure you use the latest version of autocli and of x/tx?
Additionally, are you still encountering the problem?

@julienrbrt julienrbrt moved this to ❌ Blocked in Cosmos-SDK Sep 13, 2024
@julienrbrt
Copy link
Member

Closing this as stale. Feel free to re-open.

@julienrbrt julienrbrt closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@github-project-automation github-project-automation bot moved this from ❌ Blocked to 🥳 Done in Cosmos-SDK Sep 27, 2024
@julienrbrt julienrbrt reopened this Nov 20, 2024
@github-project-automation github-project-automation bot moved this from 🥳 Done to 📋 Backlog in Cosmos-SDK Nov 20, 2024
@julienrbrt
Copy link
Member

Re-opening as Noble is encountering the same issue:

You can run make build to build the SimApp, and then can test the issue with ./simapp/build/simd tx globalfee update-gas-prices 0.1uusdc
https://github.com/noble-assets/globalfee/tree/autocli
AutoCLI is configured in module.go#138-183

@julienrbrt julienrbrt removed the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Nov 20, 2024
@julienrbrt julienrbrt moved this from 📋 Backlog to 🤸‍♂️ In Progress in Cosmos-SDK Nov 20, 2024
@JulianToledano
Copy link
Contributor

I could not reproduce the issue for the Coin type. However, in the case of Noble, it fails due to the use of DecCoin. Currently, we don’t have a flag for the DecCoin type. As a result, it represents the argument as jsonMessageFlagValue and fails during decoding because it expects a number.

@julienrbrt julienrbrt linked a pull request Dec 10, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🥳 Done
Development

Successfully merging a pull request may close this issue.

3 participants