Skip to content

Commit

Permalink
test(chore): Add complex circuit 3200k constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarth committed Feb 19, 2024
1 parent e1a91f9 commit cd18595
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pragma circom 2.1.6;

template ComplexCircuit(NUM_VARIABLES, NUM_CONSTRAINTS) {
signal input a;
signal output c;

assert(NUM_VARIABLES <= NUM_CONSTRAINTS);

signal b[NUM_VARIABLES];

b[0] <== a*a;
var i;
for (i = 1; i < NUM_VARIABLES; i++) {
b[i] <== b[i-1]*b[i-1];
}
i = i-1;
for (var j = NUM_VARIABLES; j < NUM_CONSTRAINTS; j++) {
b[i] === b[i-1]*b[i-1];
}
c <== b[i];
}

component main = ComplexCircuit(3200000, 3200000);

0 comments on commit cd18595

Please sign in to comment.