Skip to content

Commit 04605db

Browse files
committed
chore: extra 5 min decryptiondelay
1 parent c8bf188 commit 04605db

File tree

1 file changed

+3
-2
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/Shutter

1 file changed

+3
-2
lines changed

web/src/pages/Cases/CaseDetails/Voting/Shutter/Commit.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ const Commit: React.FC<ICommit> = ({ arbitrable, voteIDs, setIsOpen, refetch, di
8686
setSalt(JSON.stringify({ salt, choice: choice.toString(), justification }));
8787

8888
const encodedMessage = `${choice.toString()}${SEPARATOR}${salt}${SEPARATOR}${justification}`;
89-
// a minimum of 60 seconds of decryptionDelay is enforced to give the threshold crypto nodes time to coordinate
90-
const decryptionDelay = Math.max(countdownToVotingPeriod, 60);
89+
/* an extra 300 seconds (5 minutes) of decryptionDelay is enforced after Commit period is over
90+
to avoid premature decryption and voting attacks if no one passes the Commit period quickly */
91+
const decryptionDelay = countdownToVotingPeriod + 300;
9192
const { encryptedCommitment, identity } = await encrypt(encodedMessage, decryptionDelay);
9293

9394
const commitHash = hashVote(choice, BigInt(salt), justification);

0 commit comments

Comments
 (0)