Skip to content

Commit 2aa6331

Browse files
committed
fix: nZeroCompressedSecrets direct check
1 parent c075a44 commit 2aa6331

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎nightfall-deployer/contracts/ChallengesUtil.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ library ChallengesUtil {
8282
transaction.commitments[1] != ZERO ||
8383
transaction.nullifiers[0] != ZERO ||
8484
transaction.nullifiers[1] != ZERO ||
85-
transaction.compressedSecrets.length != nZeroCompressedSecrets ||
85+
nZeroCompressedSecrets != 8 ||
8686
nZeroProof == 4 || // We assume that 3 out of the 4 proof elements can be a valid ZERO. Deals with exception cases
8787
transaction.historicRootBlockNumberL2[0] != 0 ||
8888
transaction.historicRootBlockNumberL2[1] != 0,
@@ -168,7 +168,7 @@ library ChallengesUtil {
168168
transaction.commitments[1] != ZERO ||
169169
transaction.nullifiers[0] == ZERO ||
170170
transaction.nullifiers[1] != ZERO ||
171-
transaction.compressedSecrets.length != nZeroCompressedSecrets ||
171+
nZeroCompressedSecrets != 8 ||
172172
nZeroProof == 4 || // We assume that 3 out of the 4 proof elements can be a valid ZERO. Deals with exception cases
173173
transaction.historicRootBlockNumberL2[1] != 0, // A withdraw has a similar constraint as a single transfer
174174
'This withdraw transaction type is valid'

0 commit comments

Comments
 (0)