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

invalid key: expected only one key in keyring #687

Closed
gaia opened this issue Dec 23, 2022 · 5 comments
Closed

invalid key: expected only one key in keyring #687

gaia opened this issue Dec 23, 2022 · 5 comments

Comments

@gaia
Copy link

gaia commented Dec 23, 2022

On 0.12.2, keys successfully imported using

tmkms yubihsm keys import -i 4 -l "label" -t json secrets/priv_validator_key.json

do not work at signing time, giving this error:

"invalid key: expected only one key in keyring"

All previously imported keys work/sign fine. In keys list, the ones that are hex strings are the newly imported ones (0004 & 0009), which do not work:

image

@tony-iqlusion
Copy link
Member

Is it possible you have multiple consensus keys configured for the same chain?

@gaia
Copy link
Author

gaia commented Oct 13, 2023

cleaned up all asymmetric-keys then tried:

$ tmkms yubihsm keys import -i 3 -l "quicksilver" -t json secrets/priv_validator_key.json
    Imported key 0x0003
$ tmkms yubihsm keys list
Listing keys in YubiHSM #xxxxxxxxxxx:
- 0x0003: [cons] FB74E2913DEC8BCAE60551C558948E8D64F382C998DDD3B316E4AFE33DE91B5E
   label: "quicksilver"

@tony-iqlusion
Copy link
Member

Cool, yeah it's not a great error message but otherwise it seems like that was the problem?

@gaia
Copy link
Author

gaia commented Oct 13, 2023

tmkms::commands::start: tmkms 0.12.2 starting up...
tmkms::keyring: [keyring:yubihsm] added consensus Ed25519 key: quickvalconspub1
tmkms::connection::tcp: KMS node ID: 9...
tmkms::session: [quicksilver-1@tcp://a.b.c.d:26658] connected to validator successfully
2023-10-13T22:04:41.639895Z  WARN tmkms::session: [quicksilver-1@tcp://a.b.c.d:26658]: unverified validator peer ID! (1...)
tmkms::session: [quicksilver-1@tcp://a.b.c.d:26658] signed PreCommit:<nil> at h/r/s 4135053/0/2 (104 ms)
tmkms::session: [quicksilver-1@tcp://a.b.c.d:26658] signed PreVote:102122D292 at h/r/s 4135054/0/1 (126 ms)
tmkms::session: [quicksilver-1@tcp://a.b.c.d:26658] signed PreCommit:102122D292 at h/r/s 4135054/0/2 (126 ms)

and

quicksilverd tendermint show-validator | jq .key == cat priv_validator_key.json | jq .pub_key.value

from where the only assymetric key present in the YubiHSM was imported.

on the node side,

{"level":"error","module":"consensus","err":"error adding vote","height":4135063,"msg_type":"*consensus.VoteMessage","peer":"","round":0,"time":"2023-10-13T15:05:40-07:00","message":"failed to process message"}
{"level":"error","module":"consensus","err":"error adding vote","height":4135063,"msg_type":"*consensus.VoteMessage","peer":"","round":0,"time":"2023-10-13T15:05:40-07:00","message":"failed to process message"}
{"level":"error","module":"consensus","err":"error adding vote","height":4135064,"msg_type":"*consensus.VoteMessage","peer":"","round":0,"time":"2023-10-13T15:05:46-07:00","message":"failed to process message"}
{"level":"error","module":"consensus","err":"error adding vote","height":4135064,"msg_type":"*consensus.VoteMessage","peer":"","round":0,"time":"2023-10-13T15:05:46-07:00","message":"failed to process message"}

pls ignore that the top snippet is on block 4135054 and the bottom on 4135053+. the errors were consistent.

@tony-iqlusion
Copy link
Member

Okay, well that seems unrelated to this issue which I noticed duplicates #500.

If you're still having trouble, can you open a new issue? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants