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

Clean up DKG simulation in bootstrap #4259

Merged
merged 3 commits into from
May 3, 2023

Conversation

tarakby
Copy link
Contributor

@tarakby tarakby commented Apr 22, 2023

The key generation required by the Flow random beacon is basically a BLS threshold signature key generation. While such generation can be done in a multi-party way (in a distributed manner), it can simply be done by a single-party playing the role of a secret sharing dealer.
The distributed version is suitable for multi-party trustless protocols in production mode. The simple method is enough for a single-party mode with a trusted setup, such is the case of bootstrap and tests.

Tests and network bootstraps are centralized processes happening on a single machine. The distributed version can only happen by simulating a network of multiple nodes and their communication (too complex for the these use cases). Such simulation is implemented in the crypto package tests, to test the DKG itself, but doesn't need to be used in other cases.

This PR deletes the option to use the simulated distributed version from bootstraps and tests:

  • update the name of the generation function to RandomBeaconKeyGen since there is nothing distributed to justify the D of DKG.
  • remove the key generation flag option from the bootstrap commands. The simple key generation is the only algorithm used.

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2023

Codecov Report

Merging #4259 (b16c645) into master (ad864f3) will increase coverage by 0.21%.
The diff coverage is 62.26%.

@@            Coverage Diff             @@
##           master    #4259      +/-   ##
==========================================
+ Coverage   53.52%   53.74%   +0.21%     
==========================================
  Files         837      863      +26     
  Lines       78436    80043    +1607     
==========================================
+ Hits        41985    43020    +1035     
- Misses      33100    33635     +535     
- Partials     3351     3388      +37     
Flag Coverage Δ
unittests 53.74% <62.26%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/bootstrap/cmd/constraints.go 71.42% <ø> (+8.16%) ⬆️
cmd/execution_builder.go 0.00% <0.00%> (ø)
cmd/execution_config.go 0.00% <ø> (ø)
cmd/scaffold.go 14.59% <0.00%> (-0.14%) ⬇️
...ck-executed-height/cmd/rollback_executed_height.go 15.69% <ø> (-0.69%) ⬇️
cmd/util/ledger/reporters/account_reporter.go 0.00% <0.00%> (ø)
cmd/utils.go 14.58% <ø> (+1.85%) ⬆️
cmd/verification_builder.go 0.00% <0.00%> (ø)
consensus/hotstuff/pacemaker/timeout/config.go 75.36% <ø> (+4.34%) ⬆️
consensus/hotstuff/pacemaker/timeout/controller.go 48.61% <ø> (ø)
... and 112 more

... and 62 files with indirect coverage changes

@tarakby tarakby marked this pull request as ready for review April 24, 2023 16:49
@tarakby tarakby requested a review from zhangchiqing as a code owner April 24, 2023 16:49
@tarakby tarakby requested review from Kay-Zee and jordanschalm April 24, 2023 16:49
@tarakby
Copy link
Contributor Author

tarakby commented May 3, 2023

bors merge

@bors bors bot merged commit 7ace39d into master May 3, 2023
@bors bors bot deleted the tarak/randomness-part-7-remove-DKG-simulation branch May 3, 2023 01:06
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