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

Insert Genesis Keyshares should also generate the keyshares #1658

Closed
kylezs opened this issue May 12, 2022 · 4 comments · Fixed by #1692
Closed

Insert Genesis Keyshares should also generate the keyshares #1658

kylezs opened this issue May 12, 2022 · 4 comments · Fixed by #1692
Assignees
Labels
CFE CI effort-3 Will need to plan this before implementing p2-somedaysoon

Comments

@kylezs
Copy link
Contributor

kylezs commented May 12, 2022

Description

Currently we generate keyshares, manually copy them to the CI and then run the insert-genesis-keyshares binary on each node that creates the database and inserts that node's keyshare.

Instead we can have a binary that:

  1. Reads in node_names and node_ids from a CSV file:
  2. Generates the keyshares for those node
  3. Inserts the keyshares into a database for each node

Then the CI can just copy the database onto the nodes required.

Alternatives Considered

Use something similar to the flow we have currently, but with the CI using a binary to generate the keyshares. And using a separate binary to insert the keyshares.

Additional context

We encountered a case of the keyshares not being updated on CI again :(

Relevant people

@tomjohnburton @j4m1ef0rd @AlastairHolmes @msgmaxim

@kylezs kylezs self-assigned this May 12, 2022
@kylezs kylezs added CFE effort-3 Will need to plan this before implementing p3-nicetohave CI labels May 12, 2022
@morelazers
Copy link

We encountered a case of the keyshares not being updated on CI again :(

FWIW I think the problem was that we didn't notice that they needed to be regenerated, not that they were simply not updated.

But yes agree that we should make this more foolproof, it cost me a couple of skin cells.

@msgmaxim
Copy link
Contributor

As I mentioned to Kyle in DM, I think the genesis code doesn't need to depend on the unit test the way it does now. The actual protocol is complicated because we need to use commitments/challanges and things like that (not to mention building and collecting the messages) since we don't trust the parties. Conceptually generating keyshares should be a quite straightforward process that we can do with 50 lines of code or so (taking advantage of the existing building blocks/functions in keygen of course to ensure compatibility). We can bypass the cermeony code just like we do with solo keygen/signing and the end result will be indistinguishable from running a keygen ceremony.

@nakul-cf nakul-cf changed the title Insert Genesis Keyshares should also generate the keyshares [SC-3439] Insert Genesis Keyshares should also generate the keyshares May 13, 2022
@kylezs
Copy link
Contributor Author

kylezs commented May 13, 2022

As discussed in DMs, Max will write the key generation code path for genesis, that will allow us to generate keys on a trusted part. Then I can ensure @tomjohnburton is happy with the interface / binary outputs so it's easy for the CI to use.

@kylezs
Copy link
Contributor Author

kylezs commented May 17, 2022

#1667 completes the first part.

@kylezs kylezs linked a pull request May 19, 2022 that will close this issue
@morelazers morelazers changed the title [SC-3439] Insert Genesis Keyshares should also generate the keyshares Insert Genesis Keyshares should also generate the keyshares May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CFE CI effort-3 Will need to plan this before implementing p2-somedaysoon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants