-
Notifications
You must be signed in to change notification settings - Fork 269
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
Polynomial is not Divisible #269
Comments
I am taking a look to this. Can you tell me exactly which steps do I need to make to get the error. |
Sure! I copied the above code snipped into Now, following steps should reproduce the above error:
The error can also be reproduced using flonk instead of plonk or the cpp generation instead of wasm. |
Hey, @MarkCampbell90, the error you are facing is due to the fact that the circuit has 0 constraints. When |
Hey @Arvolear, If it is an optimization problem why does it only occur with I find it weird that the optimizer has an effect on whether the proof generation fails or succeeds. Shouldn't a proper witness always pass the proof generation with |
Also, the bug seems to occur even with quadratic constraints present.
compiles with |
Here a minimal example:
|
I've managed to reduce the example to the following: pragma circom 2.1.9;
template main_template() {
signal input a;
signal input b;
signal output out;
out <== a * (b * 0 + 1);
}
component main = main_template(); The thing is when the compiler is called without any optimization flags or either |
This expression might not, but the |
I think I understand now better what you meant with your explanation. I played around with some equivalent expressions (see below), but the error still makes no sense to me. out <== a; // OK
out <== a * 1; // OK
out <== a * (1 + 0); // OK
out <== a * (1 + 0 * 1); // OK
out <== a * (1 + 0 * b); // ERROR
out <== a + a * (0 * b); // OK
out <== a + (0 * b); // OK
// if b = 1
out <== a * (b + 0 * b); // OK Are there any news on why this occurs just for this specific expression and why it does not happen for |
Thanks for bringing this up. I am in the middle of plonk keys generation research, trying to figure this out. However, please don't expect anything certain on that matter soon. This does seem like a bug, yet for now I haven't been able to identify the error. p.s. I am not a core circom dev, so tackling this is quite a challenge 😁 |
Hello,
I compiled following circom program using
circom v2.1.9
and the flags--O0
,--r1cs
,--sym
,--wasm
,--c
,--json
But when I try to generate and verify a proof using the generate witness generation and
snarkjs
withPLONK
orFFLONK
as proof system I get following error:While playing around with it, I found out that the error disappears when:
--O1
or--O2
flag,(tmp0 * tmp1 * e + tmp0 * f)
,e
to a non zero value.The inputs seem not to affect the behavior as I can change them freely without affecting the error.
The inputs I used are:
I found this behavior very strange, especially how the error is not triggered by applying any of the listed changes.
Is this something on the circom or the snarkjs side ?
The text was updated successfully, but these errors were encountered: