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

[fastx] Replace KeyPair With Signer & Load Keys From File #590

Merged
merged 4 commits into from
Mar 1, 2022

Conversation

patrickkuo
Copy link
Contributor

@patrickkuo patrickkuo commented Feb 28, 2022

  • removed key pair from wallet.conf
  • Added keystore.rs to store keys in wallet.key
  • Using KeystoreSigner instead of Box<Pin>

Not Implemented/ todos:

  • Keystore encryption - keystore should be encrypted and protected by password
  • Remove key pair from network.conf and use KeystoreSignerin Authorities

@patrickkuo patrickkuo force-pushed the pat/wallet_key_store branch from 9c1a473 to 274b91c Compare March 1, 2022 13:05
@patrickkuo patrickkuo marked this pull request as ready for review March 1, 2022 13:54
@patrickkuo patrickkuo force-pushed the pat/wallet_key_store branch from a848f80 to be46f49 Compare March 1, 2022 16:46
Copy link
Contributor

@lxfind lxfind left a comment

Choose a reason for hiding this comment

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

Not going to be in this PR, but I think we should make the key store module more contained (only the wallet should be using it, so we may want to eventually make the key store and everything related a submodule of the wallet).

@@ -87,6 +87,14 @@ impl From<ObjectID> for SuiAddress {
}
}

impl From<Vec<u8>> for SuiAddress {
Copy link
Contributor

Choose a reason for hiding this comment

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

Converting from Vec to SuiAddress may not always succeed. So we may only want a TryFrom instead of From

@patrickkuo
Copy link
Contributor Author

patrickkuo commented Mar 1, 2022

Not going to be in this PR, but I think we should make the key store module more contained (only the wallet should be using it, so we may want to eventually make the key store and everything related a submodule of the wallet).

The keystore can be used by the authorities in the future as well, the keystore trait can be extended to support HSM and other signing method, so it's not limited to the wallet

@@ -87,6 +87,14 @@ impl From<ObjectID> for SuiAddress {
}
}

impl From<Vec<u8>> for SuiAddress {
fn from(address: Vec<u8>) -> SuiAddress {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Should we check the size of address here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using TryFrom instead

@patrickkuo patrickkuo requested review from lxfind and 666lcz March 1, 2022 23:10
@patrickkuo
Copy link
Contributor Author

This PR needs a thumbs up if it looks ok..... thanks :)

@patrickkuo patrickkuo merged commit 0da6369 into main Mar 1, 2022
@patrickkuo patrickkuo deleted the pat/wallet_key_store branch March 1, 2022 23:49
mwtian pushed a commit that referenced this pull request Sep 12, 2022
* add endpoint to publish multiaddr of nw primary

* Fix broken test

* use cluster in configuration tests

* change addr to address

* pass name instead of address to grpc server
mwtian pushed a commit to mwtian/sui that referenced this pull request Sep 29, 2022
* add endpoint to publish multiaddr of nw primary

* Fix broken test

* use cluster in configuration tests

* change addr to address

* pass name instead of address to grpc server
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

Successfully merging this pull request may close these issues.

3 participants