Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Review, and followup on ledger integration #176

Merged
merged 17 commits into from Feb 20, 2019
Merged

Conversation

liamsi
Copy link
Contributor

@liamsi liamsi commented Feb 20, 2019

Adrian Brink and others added 15 commits February 14, 2019 21:39
This PR adds the ledger integration as a backend to the KMS. There is
still more work required to ensure that the Ledger application knows how
to correctly decode/encode Tendermint votes.
Refactoring and adjusting to new ledger-tm library
Upgrading crates + cargo fmt fixes
Disabling ledgertm tests until a ledgermock is available
in tmkms.toml.example to clarify why no other options are provided
This reverts commit 562109d

Code does not compile, is not properly formatted and this is a different
concern.
 - ledger sub-commands do not do anything
@liamsi liamsi requested a review from tarcieri February 20, 2019 13:27
 - ledger sub-commands do not do anything
 - fix ledgertm::init (config -> ledgertm_configs)
 - fmt
@jleni
Copy link
Contributor

jleni commented Feb 20, 2019

@liamsi Looks good to me. We can add additional features after this PR.
I tested locally and it has the minimum features that we need at this stage.

@liamsi
Copy link
Contributor Author

liamsi commented Feb 20, 2019

Thanks for testing this locally and thanks for the review!

}
let provider = Box::new(Ed25519LedgerTmAppSigner::connect()?);
let pk = provider.public_key()?;
let signer = Signer::new(LEDGER_TM_PROVIDER_LABEL, LEDGER_TM_ID.to_string(), provider);
Copy link
Contributor Author

@liamsi liamsi Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jleni Will there be an equivalent to a key_id we can put into the config? e.g. for yubihsm we can have sth like keys = [{ id = "gaia-9000", key = 1 }]. I guess this makes sense here, too?
I'll add a TODO here and merge for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validator app needs to rely on Ledger's crypto API for Ed25519 so in practice there is a Bip32 derivation path. At the moment, this is not exposed in the API but it would be actually possible to have different keys to allow for something like that. Actually, it could be even possible to have both secp256k1 and ed25519 in the same device.

Should we open an issue for this new feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please that would be awesome! Thanks :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created issues for this:
#177
cosmos/ledger-cosmos#108

@liamsi liamsi merged commit 74aba90 into master Feb 20, 2019
@liamsi liamsi deleted the ledger-integration_follow_up branch February 20, 2019 15:31
@tarcieri tarcieri mentioned this pull request Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants