Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraint statistics does not appear to be correct #262

Open
yzhang90 opened this issue May 3, 2024 · 1 comment
Open

Constraint statistics does not appear to be correct #262

yzhang90 opened this issue May 3, 2024 · 1 comment

Comments

@yzhang90
Copy link

yzhang90 commented May 3, 2024

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.

@Arvolear
Copy link
Contributor

Arvolear commented Nov 5, 2024

You are experiencing this behavior due to circom v2.1.9 having the O2 constraints simplification flag enabled by default. Basically, this flag removes all linear constraints that operate with private signals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants