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]: Unable to sign txs with ledger after upgrading Ledger Firmware 2.2.3+ & Ledger cosmos app v2.35.13+ #18319

Closed
1 task done
ysv opened this issue Oct 31, 2023 · 6 comments
Labels

Comments

@ysv
Copy link
Contributor

ysv commented Oct 31, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I was using CLI to construct txs & Ledger for signing.

Everything was working smoothly before I upgraded Ledger Firmware to 2.2.3 & Ledger cosmos app to v2.35.13.

After Ledger upgrade I wasn't able to sign any tx. App just crashes when requesting signature from ledger, even though adding of new address works smoothly.

I found similar issue inside celestia: celestiaorg/celestia-app#2650 and they resolved it by upgrading ledger-cosmos-go to v0.13.0. But This upgrade contains breaking change for interface so changes insid cosmos-sdk ./crypto package are also required.

I tried this solution myself. On top of v0.47.5 I added this commit ysv@f092463 where I upgraded ledger-cosmos-go to v0.13.1 and changed some interfaces to be compatible. After this I tested new binary with ledger app v2.35.13 and signing works fine.

Cosmos SDK Version

0.47.5

How to reproduce?

Before you try to reproduce make sure to: upgrade Firmware to 2.2.3 & Ledger cosmos app to v2.35.13

// add key with ledger
cored keys add ledger-coreum-1 --ledger --keyring-backend=test 

 // generate any tx to be signed
cored tx bank send $(cored keys show --address --chain-id=coreum-mainnet-1 ledger-coreum-1)  core17hszunv8mctyu5qh5ehxnl7p4pxzk8gdfnp9kl 10ucore --sequence=0 --account-number=0  --generate-only --gas=0  --node="https://full-node.mainnet-1.coreum.dev:26657" > to-sign.json

// throws an error
cored tx sign to-sign.json --from ledger-coreum-1 --output-document signed.json --offline --sequence=0 --account-number=0 

cored binary with broken version to reproduce the issue could be downloaded from here: https://github.com/CoreumFoundation/coreum/releases/tag/v2.0.2

@ysv ysv added the T:Bug label Oct 31, 2023
@ysv
Copy link
Contributor Author

ysv commented Oct 31, 2023

I can also see that similar changes are included in this commit 57bedb1 but not sure what is the state of this patch. Should it be included in v0.47 ?

If you are ok I can make a PR into v0.47.x with these changes ysv@f092463 to fix this issue

@tac0turtle
Copy link
Member

0.47.6 contains a fix, it bumps the ledger library to https://github.com/cosmos/ledger-cosmos-go/releases/tag/v0.12.3. We are waiting on auditors to get back to us in order to release the next release that would fix this. Sorry for the delay

@julienrbrt
Copy link
Member

In the meantime you can still bump manually the correct cosmos/ledger-cosmos-go version in your application.
You do not need to wait on the SDK. There is no breaking change in the v0.12.x line.

@ysv
Copy link
Contributor Author

ysv commented Nov 1, 2023

I see, okay checking it with ledger-cosmos-go v0.12.3
Will close the issue if it works properly

@ysv
Copy link
Contributor Author

ysv commented Nov 2, 2023

Works with ledger-cosmos-go v0.12.3
Thanks for help 👍🏼

@ysv ysv closed this as completed Nov 2, 2023
@tac0turtle
Copy link
Member

thank you for closing the issue, let us know if you have any other questions

mergify bot pushed a commit to Stride-Labs/stride that referenced this issue Mar 2, 2024
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

3 participants