In select.circom, line 79 uses an assert statement to check whether field[j] is binary. However, in Circom, assert does not generate a constraint—it only checks the condition during the witness generation, which is insufficient for enforcing validity within the circuit being proven.
|
assert(fields[j] >= 0 && fields[j] <= 1); |
To properly constrain the signal to be binary, this line should be replaced with:
(field[j] - 1) * field[j] === 0
In select.circom, line 79 uses an
assertstatement to check whetherfield[j]is binary. However, in Circom,assertdoes not generate a constraint—it only checks the condition during the witness generation, which is insufficient for enforcing validity within the circuit being proven.zk-SQL/circuits/select.circom
Line 79 in 4c3626d
To properly constrain the signal to be binary, this line should be replaced with: