arnaucube
arnaucube/circom-compatPublic Self-hosted repository
circom-compat/test-vectors/complex-circuit/complex-circuit-10000-10000.circom
test-vectors/complex-circuit/complex-circuit-10000-10000.circomRaw
 1template ManyConstraints(NUM_VARIABLES, NUM_CONSTRAINTS) {
 2    signal private input a;
 3    signal output c;
 4
 5    assert(NUM_VARIABLES <= NUM_CONSTRAINTS)
 6
 7    signal b[NUM_VARIABLES];
 8
 9    b[0] <== a*a;
10    var i;
11    for (i = 1; i < NUM_VARIABLES; i++) {
12        b[i] <== b[i-1]*b[i-1];
13    }
14    i = i-1;
15    for (var j = NUM_VARIABLES; j < NUM_CONSTRAINTS; j++) {
16        b[i] === b[i-1]*b[i-1];
17    }
18    c <== b[i];
19}
20
21component main = ManyConstraints(10000, 10000);