Skip to content

Commit

Permalink
fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Feb 22, 2024
1 parent 643b913 commit 693de6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion circuits/lib/query/comparators.circom
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template InWithDynamicArraySize (maxValueArraySize){
signal input valueArraySize;
signal output out;

assert(maxValueArraySize < 256);
assert(maxValueArraySize <= 256);

component eq[maxValueArraySize];
signal isEq[maxValueArraySize+1];
Expand Down
2 changes: 1 addition & 1 deletion circuits/lib/utils/arraySizeValidator.circom
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ template ArraySizeValidator (maxValueArraySize) {

signal opBits[5] <== Num2Bits(5)(operator); // values 0-15 are query operators, 16-31 - modifiers/computations

assert(maxValueArraySize < 256);
assert(maxValueArraySize <= 256);

// query operator mux
component mux = Mux4();
Expand Down
2 changes: 1 addition & 1 deletion testvectorgen/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func CalculateNullify(genesisID, claimSubjectProfileNonce, claimSchema, verifier
func GetValueArraySizeForOperator(operator int) int {
result := 0
oneArrLengthOps := []int{1, 2, 3, 6, 7, 8}
twoArrLengthOps := []int{9}
twoArrLengthOps := []int{9, 10}
maxArrLengthOps := []int{4, 5}

if contains(oneArrLengthOps, operator) {
Expand Down

0 comments on commit 693de6b

Please sign in to comment.