iden3 / circom

zkSnark circuit compiler
GNU General Public License v3.0
1.25k stars 232 forks source link

Constraint statistics does not appear to be correct #262

Open yzhang90 opened 2 months ago

yzhang90 commented 2 months ago

I compiled the following program with circom 2.1.9

pragma circom 2.1.9;

template Multiplier2() {
    signal input a;
    signal input b;
    signal d;
    d <== a * 3;
    d === 2 * b;
 }

 component main = Multiplier2();

Here is the result

$ circom multi.circom --r1cs --wasm
template instances: 1
non-linear constraints: 0
linear constraints: 0
public inputs: 0
private inputs: 2 (none belong to witness)
public outputs: 0
wires: 1
labels: 4

I expect there should be 2 linear constraints.