diff --git a/beacon-light-client/circom/circuits/utils/numerical.circom b/beacon-light-client/circom/circuits/utils/numerical.circom index 20466df54..76e8f8b65 100644 --- a/beacon-light-client/circom/circuits/utils/numerical.circom +++ b/beacon-light-client/circom/circuits/utils/numerical.circom @@ -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; } diff --git a/beacon-light-client/circom/test/is_equal_arrays/circuit.circom b/beacon-light-client/circom/test/is_equal_arrays/circuit.circom new file mode 100644 index 000000000..8d517930f --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/circuit.circom @@ -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"] diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case01/input.json b/beacon-light-client/circom/test/is_equal_arrays/data/case01/input.json new file mode 100644 index 000000000..3f047d2c5 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case01/input.json @@ -0,0 +1 @@ +{"in": [["1","2","2"],["1","2","2"]]} diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case01/output.json b/beacon-light-client/circom/test/is_equal_arrays/data/case01/output.json new file mode 100644 index 000000000..f4209a168 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case01/output.json @@ -0,0 +1 @@ +{"out": "1"} diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case02/input.json b/beacon-light-client/circom/test/is_equal_arrays/data/case02/input.json new file mode 100644 index 000000000..23271aee5 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case02/input.json @@ -0,0 +1 @@ +{"in": [["100","2","2"],["1","2","101"]]} diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case02/output.json b/beacon-light-client/circom/test/is_equal_arrays/data/case02/output.json new file mode 100644 index 000000000..8b71f4187 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case02/output.json @@ -0,0 +1 @@ +{"out": "0"} diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case03/input.json b/beacon-light-client/circom/test/is_equal_arrays/data/case03/input.json new file mode 100644 index 000000000..9a6d16302 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case03/input.json @@ -0,0 +1 @@ +{"in": [["10","8","7"],["7","8","10"]]} diff --git a/beacon-light-client/circom/test/is_equal_arrays/data/case03/output.json b/beacon-light-client/circom/test/is_equal_arrays/data/case03/output.json new file mode 100644 index 000000000..8b71f4187 --- /dev/null +++ b/beacon-light-client/circom/test/is_equal_arrays/data/case03/output.json @@ -0,0 +1 @@ +{"out": "0"} diff --git a/beacon-light-client/circom/test/less_than_eq_bits_check/circuit.circom b/beacon-light-client/circom/test/less_than_eq_bits_check/circuit.circom index badfa9e8d..105811b31 100644 --- a/beacon-light-client/circom/test/less_than_eq_bits_check/circuit.circom +++ b/beacon-light-client/circom/test/less_than_eq_bits_check/circuit.circom @@ -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.)