`ebcli keys add validator` panics with `crypto/hmac: hash generation function does not produce unique values` w/ go 1.17.2
brandonblock opened this issue · 2 comments
brandonblock commented
go 1.17.2 on MacOS 11.5.2, might have time later to try it on my linux machine and see if the same error occurs. Just running through the tutorial to get the bridge chain running and encounter this error from a core lib:
➜ peggy git:(master) ebcli keys add validator
panic: crypto/hmac: hash generation function does not produce unique values
goroutine 1 [running]:
crypto/hmac.New(0xc000024fd8, {0xc0003341a0, 0x4, 0x8})
/usr/local/Cellar/go/1.17.2/libexec/src/crypto/hmac/hmac.go:143 +0x292
github.com/dvsekhvalnov/jose2go/kdf.DerivePBKDF2({0xc0003341a0, 0x3, 0xd9fffff}, {0xc000e12750, 0x1f, 0x30}, 0x1, 0x80, {0x4da2378, 0xc0001d0c00})
/Users/brandonblock/go/pkg/mod/github.com/dvsekhvalnov/jose2go@v0.0.0-20180829124132-7f401d37b68a/kdf/pbkdf2.go:15 +0xb9
github.com/dvsekhvalnov/jose2go.(*Pbse2HmacAesKW).WrapNewKey(0xc000190d80, 0xc00048bf80, {0x493d0a0, 0xc000217ae0}, 0x26)
/Users/brandonblock/go/pkg/mod/github.com/dvsekhvalnov/jose2go@v0.0.0-20180829124132-7f401d37b68a/pbse2_hmac_aeskw.go:50 +0x339
github.com/dvsekhvalnov/jose2go.encrypt({0xc000328480, 0x114, 0x120}, 0x3, {0x493d0a0, 0xc000217ae0})
/Users/brandonblock/go/pkg/mod/github.com/dvsekhvalnov/jose2go@v0.0.0-20180829124132-7f401d37b68a/jose.go:305 +0x1af
github.com/dvsekhvalnov/jose2go.EncryptBytes({0xc000328480, 0x114, 0x120}, {0x4a9deb1, 0x12}, {0x4a93928, 0x7}, {0x493d0a0, 0xc000217ae0}, {0xc000025490, ...})
/Users/brandonblock/go/pkg/mod/github.com/dvsekhvalnov/jose2go@v0.0.0-20180829124132-7f401d37b68a/jose.go:222 +0x3a5
github.com/dvsekhvalnov/jose2go.Encrypt(...)
/Users/brandonblock/go/pkg/mod/github.com/dvsekhvalnov/jose2go@v0.0.0-20180829124132-7f401d37b68a/jose.go:187
github.com/99designs/keyring.(*fileKeyring).Set(0xc00001d680, {{0xc00019dfe0, 0xe}, {0xc0001462d0, 0x6a, 0xe9}, {0x0, 0x0}, {0x0, 0x0}, ...})
/Users/brandonblock/go/pkg/mod/github.com/99designs/keyring@v1.1.3/file.go:143 +0x215
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.writeInfo({{{0x4c8aac0, 0x4c8aab8, {0xc000217820, 0x1, 0x1}, {0xc000217830, 0x1, 0x1}}}, {0x4da24b8, 0xc00001d680}}, ...)
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/crypto/keys/keyring.go:473 +0x195
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.writeLocalKey({{{0x4c8aac0, 0x4c8aab8, {0xc000217820, 0x1, 0x1}, {0xc000217830, 0x1, 0x1}}}, {0x4da24b8, 0xc00001d680}}, ...)
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/crypto/keys/keyring.go:464 +0x1a5
github.com/cosmos/cosmos-sdk/crypto/keys.baseKeybase.CreateAccount({{0x4c8aac0, 0x4c8aab8, {0xc000217820, 0x1, 0x1}, {0xc000217830, 0x1, 0x1}}}, {0x4d8dd00, 0xc0007003c0}, ...)
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/crypto/keys/keybase_base.go:171 +0x13a
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.CreateAccount(...)
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/crypto/keys/keyring.go:106
github.com/cosmos/cosmos-sdk/client/keys.RunAddCmd(0xc000025c58, {0xc000216e20, 0xc000113e60, 0xc000315360}, {0x4db7d68, 0xc000700370}, 0xc00001ac60)
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/client/keys/add.go:273 +0x7bf
github.com/cosmos/cosmos-sdk/client/keys.runAddCmd(0xc00030f600, {0xc000216e20, 0x1, 0x1})
/Users/brandonblock/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.39.1/client/keys/add.go:99 +0x1e8
github.com/spf13/cobra.(*Command).execute(0xc00030f600, {0xc000216e00, 0x1, 0x1})
/Users/brandonblock/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002082c0)
/Users/brandonblock/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x3ad
github.com/spf13/cobra.(*Command).Execute(...)
/Users/brandonblock/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/tendermint/tendermint/libs/cli.Executor.Execute({0xc0002082c0, 0x4c8cde0})
/Users/brandonblock/go/pkg/mod/github.com/tendermint/tendermint@v0.33.8/libs/cli/setup.go:89 +0x36
main.main()
/Users/brandonblock/go/src/github.com/cosmos/peggy/cmd/ebcli/main.go:71 +0x49b
brandonblock commented
Just for kicks, I updated the jose2go version and still get the same results. Looks like this is an issue with the keyring dep from the cosmos sdk.
brandonblock commented
Okeydoke, tried it out on Linux w/ go1.17.2/1.16.8 and get the same error so that's a bummer.