celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 289 forks source link

Ensure that upgrade signalling messages can be signed by ledger #2876

Closed cmwaters closed 10 months ago

cmwaters commented 11 months ago

we might just want to leave a mental note to try out signing the tx on a ledger to make sure that we don't need to register the new Msg type with the legacy codec

_Originally posted by @evan-forbes in https://github.com/celestiaorg/celestia-app/pull/2832#discussion_r1409887078_

rootulp commented 10 months ago

I'm observing that this fails:

$ celestia-appd tx upgrade signal 1 --from celestia1xdc39xr027r78w4eeq6e7e35glgza9ka9rsds2 --ledger
Default sign-mode 'direct' not supported by Ledger, using sign-mode 'amino-json'.
auth_info:
  fee:
    amount: []
    gas_limit: "210000"
    granter: ""
    payer: ""
  signer_infos: []
  tip: null
body:
  extension_options: []
  memo: ""
  messages:
  - '@type': /celestia.upgrade.v1.MsgSignalVersion
    validator_address: celestiavaloper1xdc39xr027r78w4eeq6e7e35glgza9kaquj5xv
    version: "1"
  non_critical_extension_options: []
  timeout_height: "0"
signatures: []
confirm transaction before signing and broadcasting [y/N]: y
panic: expected *legacytx.LegacyMsg when using amino JSON

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx.StdSignBytes({0x140014261b8, 0x7}, 0x7, 0x0, 0x0, {{0x0, 0x0, 0x0}, 0x33450, {0x0, ...}, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/x/auth/migrations/legacytx/stdsign.go:60 +0x37c
github.com/cosmos/cosmos-sdk/x/auth/tx.signModeLegacyAminoJSONHandler.GetSignBytes({}, 0x6f1fd8?, {{0x14001560a20, 0x2f}, {0x140014261b8, 0x7}, 0x7, 0x0, {0x10356eac0, 0x140005dc948}}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/x/auth/tx/legacy_amino_json.go:68 +0x33c
github.com/cosmos/cosmos-sdk/x/auth/signing.SignModeHandlerMap.GetSignBytes({0x1, {0x1400127f250, 0x3, 0x4}, 0x140012e1920}, 0x353f718?, {{0x14001560a20, 0x2f}, {0x140014261b8, 0x7}, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/x/auth/signing/handler_map.go:59 +0xb0
github.com/cosmos/cosmos-sdk/client/tx.Sign({{0x10357c448, 0x140013819e0}, {0x103571da8, 0x140012fc6c0}, {0x103562d20, 0x1048c61e0}, 0x7, 0x0, 0x33450, 0x0, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/client/tx/tx.go:300 +0x44c
github.com/cosmos/cosmos-sdk/client/tx.BroadcastTx({{0x1400157ca08, 0x14, 0x18}, {0x1035815d0, 0x140013f31d0}, 0x0, {0x140014261b8, 0x7}, {0x103579128, 0x140012fea50}, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/client/tx/tx.go:109 +0x45c
github.com/cosmos/cosmos-sdk/client/tx.GenerateOrBroadcastTxWithFactory({{0x1400157ca08, 0x14, 0x18}, {0x1035815d0, 0x140013f31d0}, 0x0, {0x140014261b8, 0x7}, {0x103579128, 0x140012fea50}, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/client/tx/tx.go:59 +0x118
github.com/cosmos/cosmos-sdk/client/tx.GenerateOrBroadcastTxCLI({{0x1400157ca08, 0x14, 0x18}, {0x1035815d0, 0x140013f31d0}, 0x0, {0x140014261b8, 0x7}, {0x103579128, 0x140012fea50}, ...}, ...)
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/client/tx/tx.go:29 +0xb0
github.com/celestiaorg/celestia-app/x/upgrade/cli.CmdSignalVersion.func1(0x14001391400?, {0x1400137d500, 0x1, 0x4?})
    /Users/rootulp/git/rootulp/celestia/celestia-app/x/upgrade/cli/tx.go:55 +0x1b0
github.com/spf13/cobra.(*Command).execute(0x140013a2f00, {0x1400137d4c0, 0x4, 0x4})
    /Users/rootulp/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x66c
github.com/spf13/cobra.(*Command).ExecuteC(0x14001289200)
    /Users/rootulp/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/rootulp/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
    /Users/rootulp/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:961
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x102437824?, {0x10244e993, 0x8}, {0x140003513e0, 0x1c})
    /Users/rootulp/go/pkg/mod/github.com/celestiaorg/cosmos-sdk@v1.20.0-sdk-v0.46.16/server/cmd/execute.go:36 +0x158
main.main()
    /Users/rootulp/git/rootulp/celestia/celestia-app/cmd/celestia-appd/main.go:14 +0x3c