From cd4c65ae3ba386926d0cf5a6353dab2c2d42b65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=BA=C3=B1ez?= Date: Mon, 7 Aug 2023 12:18:45 +0200 Subject: [PATCH] Invalidate stored public key if ritual fails Closes #78 --- contracts/contracts/coordination/Coordinator.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/contracts/coordination/Coordinator.sol b/contracts/contracts/coordination/Coordinator.sol index 991f4664..7a888c3f 100644 --- a/contracts/contracts/coordination/Coordinator.sol +++ b/contracts/contracts/coordination/Coordinator.sol @@ -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