-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[ETCM-411] Add optional param to generate more keys at once #812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but what do you think about moving this functionality to CLI?
one one side it makes sense, on the other side i know that Shay is using it in that format so it would be probably easier for him to use it that way without any learning curve and changes in tooling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so maybe create a task to do that in the future. We could handle both methods at the same time. The cli will be more readable for the users
* priv-key-hex (32 bytes) | ||
* pub-key-hex (64 bytes) | ||
* | ||
* Run: | ||
* ./eckeygen > mantis-datadir/node.key | ||
* ./eckeygen [n] > mantis-datadir/node.key | ||
* | ||
* to generate the private key for the node. Note that only the private key will be read upon Mantis boot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) "[...] Note that only the first private key will be read upon Mantis boot"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually it is more general as even if we generate one pair, only the private key is read at boot time and then whole key pair is regenerated based on this key keyPairFromPrvKey(Hex.decode(privHex))
abb12b3
to
e513202
Compare
@@ -27,6 +29,22 @@ object CliCommands { | |||
} | |||
} | |||
|
|||
private val GenerateKeyPairs: Command[String] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case to CliCommandsSpec
and update README
e513202
to
daa32c8
Compare
daa32c8
to
074ae4c
Compare
Description
Add possibility to generate n keys (ported from other project)