Skip to content

Commit

Permalink
feat(circom): Add tests to IsEqaulArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-nikolov96 committed Jun 27, 2023
1 parent dfb10fe commit ad28bff
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion beacon-light-client/circom/circuits/utils/numerical.circom
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template DivisionVerification() {
signal input quotient;
signal input remainder;

//TODO: Needs additional constraint
//TODO: Needs additional corebase nstraint
dividend === divisor * quotient + remainder;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.5;

include "../../circuits/utils/arrays.circom";

component main = IsEqualArrays(3); // N must be equal to length in both arrays in input["in"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"in": [["1","2","2"],["1","2","2"]]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"out": "1"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"in": [["100","2","2"],["1","2","101"]]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"out": "0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"in": [["10","8","7"],["7","8","10"]]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"out": "0"}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@ pragma circom 2.1.5;

include "../../circuits/utils/arrays.circom";

<<<<<<< HEAD
<<<<<<< HEAD
component main = LessThanOrEqualBitsCheck(32);
=======
component main = Selector(8) // N must be equal to input["in"] length
>>>>>>> 7f6ce53 (feat(circom) Add tests for Selector circuit.)
=======
component main = LessThanOrEqualBitsCheck(32)
>>>>>>> 5452718 (fix(circom): Fix wrong main call for selector and less_than_eq_bits_check.)

0 comments on commit ad28bff

Please sign in to comment.