-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up error handling in compute_secrets (#95)
* remove NotEnoughShares DkgError and instead specify for/from in MissingPrivateShares DkgError; add TryFromInt DkgError and remove unwrap call in compute_secret; clean up tests * remove unwrap in v1 compute_secret * add TryFromInt to AggregatorError; remove moar unwraps from v1 and v2 * remove unused AggregatorError::BadPolyCommitmentLen since we're making API breaking changes anyway * do full missing_private_shares check in signer state machine so we don't have to worry about getting anything other than bad private shares from compute secrets * use get rather than indexing into hashmaps to be extra safe, even though we checked above that the keys should be present * use fold to sum private shares since we don't impl Sum for Scalar * use Sum from p256k1 7.2; impl PartialEq for PartyState and SignerState
- Loading branch information
Showing
6 changed files
with
118 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.