Closed ETatuzova closed 6 months ago
This feature should be enabled in scope of https://github.com/NilFoundation/zkLLVM/issues/433
After merge https://github.com/NilFoundation/zkLLVM/pull/514, for the different inputs generates same circuit. But current implementation doesn't support dynamic size loops
Will not be done We can't support dynamic loops because number of copy constraints depend on input.
int f(int a) {
int res = 0;
for (int i = 0; i < a; i++) {
res++;
}
return res;
}
In this example will be generate one gate (component ADD for increase iterator and res
) indepent on input (a
), on each loop iteration added selector rows.
But copy_constraints generated on the each call of component.
What the problem is?
Now constraint system depends on public input. One cause of it is that for loops with different number of iterations produce different constraints and different fixed columns.