Skip to content

Commit

Permalink
Invalidate stored public key if ritual fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cygnusv committed Aug 21, 2023
1 parent 88c2931 commit cd4c65a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/contracts/coordination/Coordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ contract Coordinator is AccessControlDefaultAdminRules {
ritual.publicKey = dkgPublicKey;
} else if (
!BLS12381.eqG1Point(ritual.publicKey, dkgPublicKey) ||
keccak256(ritual.aggregatedTranscript) != aggregatedTranscriptDigest
keccak256(ritual.aggregatedTranscript) != aggregatedTranscriptDigest
) {
ritual.aggregationMismatch = true;
delete ritual.publicKey;
emit EndRitual({
ritualId: ritualId,
successful: false
Expand Down

0 comments on commit cd4c65a

Please sign in to comment.