Skip to content

Ledger key generation not working for evmd #607

@Cordtus

Description

@Cordtus
cmd + response
cordt@Cordts-MacBook-Pro:~/repos/cosmos-sdk (main)$ evmd keys add t1 --ledger
Error: failed to generate ledger key
Usage:
  evmd keys add <name> [flags]

Flags:
      --account uint32           Account number for HD derivation (less than equal 2147483647)
      --coin-type uint32         coin type number for HD derivation (default 60)
      --dry-run                  Perform action, but don't add key to local keystore
      --hd-path string           Manual HD Path derivation (overrides BIP44 config)
  -h, --help                     help for add
      --index uint32             Address index number for HD derivation (less than equal 2147483647)
  -i, --interactive              Interactively prompt user for BIP39 passphrase and mnemonic
      --key-type string          Key signing algorithm to generate keys for (default "eth_secp256k1")
      --ledger                   Store a local reference to a private key on a Ledger device
      --multisig strings         List of key names stored in keyring to construct a public legacy multisig key
      --multisig-threshold int   K out of N required signatures. For use in conjunction with --multisig (default 1)
      --no-backup                Don't print out seed phrase (if others are watching the terminal)
      --nosort                   Keys passed to --multisig are taken in the order they're supplied
      --pubkey string            Parse a public key in JSON format and saves key info to <name> file.
      --pubkey-base64 string     Parse a public key in base64 format and saves key info.
      --recover                  Provide seed phrase to recover existing key instead of creating
      --source string            Import mnemonic from a file (only usable when recover or interactive is passed)

Global Flags:
  -b, --broadcast-mode string    Transaction broadcasting mode (sync|async) (default "sync")
      --chain-id string          Specify Chain ID for sending Tx
      --fees string              Fees to pay along with transaction; eg: 10aatom
      --from string              Name or address of private key with which to sign
      --gas-adjustment float     adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored  (default 1)
      --gas-prices string        Gas prices to determine the transaction fee (e.g. 10aatom)
      --home string              The application home directory (default "/Users/cordt/.evmd")
      --keyring-backend string   Select keyring's backend (os|file|test) (default "os")
      --keyring-dir string       The client Keyring directory; if omitted, the default 'home' directory will be used
      --log_format string        The logging format (json|plain) (default "plain")
      --log_level string         The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>') (default "info")
      --log_no_color             Disable colored logs
      --node string              <host>:<port> to cometbft rpc interface for this chain (default "tcp://localhost:26657")
      --output string            Output format (text|json) (default "text")
      --trace                    print out full stack trace on errors

failed to generate ledger key
simd deps
cordt@Cordts-MacBook-Pro:~ $ simd version --long | grep ledger
- github.com/cosmos/ledger-cosmos-go@v0.16.0
- github.com/zondax/ledger-go@v1.0.1
build_tags: netgo,ledger
cordt@Cordts-MacBook-Pro:~ $ simd version --long | grep zondax
- github.com/zondax/golem@v0.27.0
- github.com/zondax/hid@v0.9.2
- github.com/zondax/ledger-go@v1.0.1
gaiad deps
cordt@Cordts-MacBook-Pro:~ $ gaiad version --long | grep ledger
- github.com/cosmos/ledger-cosmos-go@v0.14.0
- github.com/zondax/ledger-go@v0.14.3
build_tags: netgo,ledger
cordt@Cordts-MacBook-Pro:~ $ gaiad version --long | grep zondax
- github.com/zondax/hid@v0.9.2
- github.com/zondax/ledger-go@v0.14.3
evmd deps
cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep ledger
cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep zondax
- github.com/zondax/hid@v0.9.2

# added build tag

cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep ledger
- github.com/cosmos/ledger-cosmos-go@v0.14.0
- github.com/zondax/ledger-go@v0.14.3
build_tags: netgo,ledger
cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep zondax
- github.com/zondax/hid@v0.9.2
- github.com/zondax/ledger-go@v0.14.3

# bumped versions

cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep ledger
- github.com/cosmos/ledger-cosmos-go@v0.16.0
- github.com/zondax/ledger-go@v1.0.1
build_tags: netgo,ledger
cordt@Cordts-MacBook-Pro:~ $ evmd version --long | grep zondax
- github.com/zondax/golem@v0.27.0
- github.com/zondax/hid@v0.9.2
- github.com/zondax/ledger-go@v1.0.1

Key generation with ledger fails for evmd, works for gaiad and simd


Cosmos app open for all tests, tested with ethereum app also - same result.
No more verbose logs available.
All tests are with new build of main branch on arm64 mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions