Implement CDummyDKG and CDummyCommitment until we have the real DKG merged#2492
Merged
Conversation
…erged This is only used on testnet/devnet/regtest and will NEVER be used on mainnet. It is NOT SECURE AT ALL! See comment in quorums_dummydkg.h for more details.
4 was based on old chainparams where I used larger phases.
e466fc4 to
d02c4bc
Compare
nmarley
reviewed
Nov 25, 2018
nmarley
previously approved these changes
Nov 25, 2018
UdjinM6
previously approved these changes
Nov 25, 2018
ad8153b to
29773e6
Compare
Author
|
Tests are finally green, but I'll need re-ACKs due to the commits I added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the dummy DKG mentioned in #2477
This will only run on testnet/devnet/regtest and only if SPORK_17_QUORUM_DKG_ENABLED is enabled. The same spork will later be reused for the real DKG.
The dummy DKG uses deterministicaly generated secret polynomials, which is then used to derive the quorum public keys and secret key shares of individual "members". This is as insecure as something can be in regard to the quorum key and will NEVER be used on mainnet. Even on testnet, these keys won't be used for anything other then the validation of the commitment.
The dummy DKG is however good enough to test the simple PoSe functionality on testnet. Imagine it as some kind of voting on offline/slow MNs. Each MN will remember which other MNs didn't participate in previous rounds and then mark those as bad in the next round. If enough MNs (>=threshold) mark the same members as bad, they'll eventually get PoSe punished and if it happens multiple times they get PoSe banned. This type of voting is secure, even with the dummy DKG as no single member is able to create a valid commitment that punishes another member if not enough other MNs agree.