Skip to content

Conversation

@KonradStaniec
Copy link
Contributor

Description

Add possibility to generate n keys (ported from other project)

Copy link
Contributor

@mmrozek mmrozek left a 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?

@KonradStaniec
Copy link
Contributor Author

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

Copy link
Contributor

@mmrozek mmrozek left a 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

* ./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,
Copy link
Contributor

@mirkoAlic mirkoAlic Nov 25, 2020

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"

Copy link
Contributor Author

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))

@KonradStaniec KonradStaniec force-pushed the etcm-411/improve-key-gen branch from abb12b3 to e513202 Compare November 25, 2020 11:59
}
}

private val GenerateKeyPairs: Command[String] =
Copy link
Contributor

@mmrozek mmrozek Nov 25, 2020

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

@KonradStaniec KonradStaniec force-pushed the etcm-411/improve-key-gen branch from e513202 to daa32c8 Compare November 25, 2020 12:38
@KonradStaniec KonradStaniec force-pushed the etcm-411/improve-key-gen branch from daa32c8 to 074ae4c Compare November 25, 2020 12:40
@KonradStaniec KonradStaniec merged commit 0bcd288 into develop Nov 25, 2020
@KonradStaniec KonradStaniec deleted the etcm-411/improve-key-gen branch November 25, 2020 14:16
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.

4 participants