-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: allow key_format = { type = "cosmos-json" }
#407
feat: allow key_format = { type = "cosmos-json" }
#407
Conversation
This type, however, (linking to an older build) now impls https://docs.rs/cosmrs/0.1.0/cosmrs/crypto/struct.PublicKey.html |
535bfc8
to
fed995c
Compare
Thanks for this! As an aside, I went through an interesting adventure doing the tendermint-rs 0.22 upgrade myself. And got it working. And then discovered you had already done it! Oh, and this is the first-ever Rust code I've written. 😅 |
fed995c
to
523a0f2
Compare
523a0f2
to
d7ad3b6
Compare
I have tested this PR, but |
85cd547
to
f81606a
Compare
@michaelfig if you rebase on top of #412 it should fix the security audit failure |
f81606a
to
85e5ccf
Compare
@Tomas-Eminger can you paste the two keys in question regarding your issue? I will also check this locally. It would also be good to add an automated test. |
I still get Listing keys in YubiHSM #0013202806:
Which is the same key as before from the source code from @michaelfig and the validator created with this key was unable to sign any transaction. Did you also changed the signing logic, or just the output of |
This PR only affects how keys are displayed: https://github.com/iqlusioninc/tmkms/pull/407/files#diff-f137d1d1045d9ae7502f39fe026c2e497a3f86a5ce2f73b49b6981141a7823bfR44 Note that iqlusion we are running this prerelease in production without issue: #410 |
I have verified that this PR successfully round-trips a $ ./target/debug/tmkms softsign import ~/.agoric/config/priv_validator_key.json ~/.tmkms/secrets/agoric-consensus.key
2021-10-17T03:22:45.260943Z INFO tmkms::commands::softsign::import: Imported Ed25519 private key to /Users/michael/.tmkms/secrets/agoric-consensus.key
$ ./target/debug/tmkms start -c ~/.tmkms/tmkms.toml
2021-10-17T03:23:08.818459Z INFO tmkms::commands::start: tmkms 0.11.0-pre starting up...
2021-10-17T03:23:08.820535Z INFO tmkms::keyring: [keyring:softsign] added consensus Ed25519 key: \
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"DBUu7r7n0JSLwNi64q6HR7K1L9pqBBss9DaYHiaJgE4="}
[...]
$ agd tendermint show-validator
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"DBUu7r7n0JSLwNi64q6HR7K1L9pqBBss9DaYHiaJgE4="}
$ |
Fixes #352
NOTE: I haven't actually tested this with an actual KMS. Help would be appreciated.
I've verified importing a validator's private key with
softsign
and that the public key that is printed matches Cosmos'ssimd tendermint show-validator
output.This allows people to use:
and then
tmkms
starts like this:Outputting that key format allows it to be used in
simd tx staking create-validator --pubkey='{"@type":...}' ...
.