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 when send tx and set fees without typing unit. #2857

Closed
HoytRen opened this issue Nov 20, 2023 · 8 comments
Closed

Panic when send tx and set fees without typing unit. #2857

HoytRen opened this issue Nov 20, 2023 · 8 comments
Labels
proposal item is not yet actionable and is suggesting a change that must first be agreed upon

Comments

@HoytRen
Copy link

HoytRen commented Nov 20, 2023

Summary of Bug

celestia-appd tx distribution withdraw-rewards celestiavaloper1zdrz4w2pwwffdvmpum0626vycel9caay9n3pll --from W3 --commission --fees 21500

It's panic because '21500' but not '21500utia'.

Version

1.3.0 on mainnet.

@HoytRen HoytRen added the bug Something isn't working label Nov 20, 2023
@evan-forbes
Copy link
Member

evan-forbes commented Nov 20, 2023

Hey again @HoytRen, I believe this is intented behavior from the cosmos-sdk. If you think this should be changed, then I would reccomend moving this upstream. There might be a way to pick a default denomination for fees, but I'm not sure we would adopt such a feature without it also being adopted upstream.

If this is a bug or something else, please elaborate further. If it is not a bug, then please close this issue 🙂 thanks!

@evan-forbes evan-forbes added proposal item is not yet actionable and is suggesting a change that must first be agreed upon and removed bug Something isn't working labels Nov 20, 2023
@HoytRen
Copy link
Author

HoytRen commented Nov 20, 2023

Hi, @evan-forbes don't see you for a while. I believe it just need to be wrapped with a error prompt. I may have time to look into the code on thursday or friday.

@HoytRen
Copy link
Author

HoytRen commented Nov 24, 2023

I checked the code and need more time to work out a solution because the sdk doesn't throw out errors by design. Hardcoding the error prompt could be a solution, but can not be pushed back to upstream, then I need to think about a better solution so that we don't need to maintain the modification over and over again.

@HoytRen
Copy link
Author

HoytRen commented Dec 6, 2023

Finally, I've completed a patch. Now the issue is, I not only modified a lot of code inside the SDK but also changed a file in this repo. If the two repos are not modified simultaneously, it will result in build errors. This is the first time I've encountered such a situation in the Celestia project. How should I submit the changes? Please provide me with some guidance.

@HoytRen
Copy link
Author

HoytRen commented Dec 6, 2023

Maybe, I should close this issue, and try a PR to Cosmos SDK, and wait until Celestia imports the new version of SDK?

@HoytRen
Copy link
Author

HoytRen commented Dec 6, 2023

I checked the latest version of Cosmos SDK, this problem is fixed already, then, let me close this issue and simply wait for bump up of the sdk.

@HoytRen HoytRen closed this as completed Dec 6, 2023
@rootulp
Copy link
Collaborator

rootulp commented Dec 6, 2023

Thanks for investigating this! Out of curiosity which Cosmos SDK version fixes this? celestia-app currently uses a fork of cosmos-sdk that we regularly pull upstream changes from.

Ref: https://github.com/celestiaorg/cosmos-sdk/releases/tag/v1.20.0-sdk-v0.46.16 which is based on Cosmos SDK v0.46.16

@HoytRen
Copy link
Author

HoytRen commented Dec 7, 2023

Oh, I made a typo, I mean the latest code in cosmos's main branch.

https://github.com/cosmos/cosmos-sdk/tree/main

In their code, you could find:

txFactory, err := tx.NewFactoryCLI(clientCtx, cmd.Flags())

which do not cause panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal item is not yet actionable and is suggesting a change that must first be agreed upon
Projects
None yet
Development

No branches or pull requests

3 participants