-
Notifications
You must be signed in to change notification settings - Fork 1
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
add dkg round2 function #53
Conversation
defines round2 to take a round1 SecretPackage and a vector of round1 PublicPackages and run round2 of DKG. finds the PublicPackage corresponding to self_identity and uses it to verify the checksums contained in all of the other PublicPackages. iterates over round1 PublicPackages to construct map from identifier to frost package required for frost part2 inputs and to collect group_secret_key_shards moves 'Error' enum from round1 to separate error module to allow reuse across dkg rounds, adds ChecksumError to enum
|
||
for public_package in round1_public_packages { | ||
if public_package.checksum() != self_public_package.checksum() { | ||
return Err(Error::ChecksumError(ChecksumError)); |
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.
Can we provide a more error message? I don't remember how we do it for TKD (if the error message is generated on ironfish-frost, ironfish-rust, ironfish-rust-nodejs, or typescript), but ideally we should use the same pattern.
This doesn't need to be done in this PR though.
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.
I'll update this in a separate PR since it will affect signing_commitment too
removes Ord and PartialOrd implementations for PublicPackage that only compare identities
defines round2 to take a round1 SecretPackage and a vector of round1 PublicPackages and run round2 of DKG.
finds the PublicPackage corresponding to self_identity and uses it to verify the checksums contained in all of the other PublicPackages.
iterates over round1 PublicPackages to construct map from identifier to frost package required for frost part2 inputs and to collect group_secret_key_shards
moves 'Error' enum from round1 to separate error module to allow reuse across dkg rounds, adds ChecksumError to enum