-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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]: Legacy amino-json ledger signing fails for ibc MsgTransfer
(protos outside of sdk)
#17975
Comments
I am trying to reproduce this but simd is failing with
The device is freshly reset ledger nano s. |
Can you share the precise simd command you are trying to run which is failing? This way I try to hack around using a ledger while still maintaining the same environment. |
^^ This PR fixes the issue from my machine. Can you check on your end @damiannolan? I was not able to set up a ledger, but was able to reproduce with the following command (which now produces an account sequence error):
|
Hey @kocubinski thanks a lot for looking into this! I replied on the PR. The fix is working with amino-json signing but seeing a new error with textual. |
this is a ledger issue we tagged zondax on it |
@kocubinski I found this thread because I'm having the same issue trying to communicate with a Ledger
Were you able to get past this issue? |
I think this one fits best: #18423 (comment) |
Is there an existing issue for this?
What happened?
A bug happened!
Ledger tx signing using
sign-mode=amino-json
is failing for (seemingly) protos defined outside of the SDK. For example, and most notably ibcMsgTransfer
.Attempting to sign using a connected ledger with flags
--ledger --sign-mode amino-json
fails with:The
NotFound
error is being propagated all the way from protoregistry.In the SDK, it surfaces here: https://github.com/cosmos/cosmos-sdk/blob/x/tx/v0.10.0/x/tx/decode/unknown.go#L113-L117
As the
SignModeHandler
created here(https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.1/client/tx/aux_builder.go#L208) cannot find the proto descriptors for ibc messages.I've tried editing the
HybridResolver
toprotoregistry.GlobalFiles
which yields the same result - which is expected consideringHybridResolver
godoc says its a merged registry of gogo and global.The base of the problem is with proto generated code and how file/msg descriptors are populated within the global proto type registry. The resolver for file/msg descriptors is failing within the signing context and cannot use the protoreflect API to generate signing bytes to provide to the ledger.
I should also note I tried signing using
sign-mode=textual
and got:Cosmos SDK Version
v0.50.0-rc.1
Trace of the signing code is:
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.1/client/tx/tx.go#L321
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.1/x/auth/signing/adapter.go#L60
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.1/x/tx/signing/handler_map.go#L53-L59
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-rc.1/x/tx/signing/aminojson/aminojson.go#L61
How to reproduce?
Full steps to reproduce using a local test environment can be found here: https://github.com/damiannolan/simd-scripts
The text was updated successfully, but these errors were encountered: