libiop
libiop copied to clipboard
"unknown file: Failure" when using Aurora
I have a simple r1cs that works well with Ligero but fails with Aurora. I tried the Aurora snark example (generate_r1cs_example, using alt_bn128 curve) with the same number of inputs and this example is also failing with the same error: unknown file: Failure Unknown C++ exception thrown in the test body.
My inputs to generate_r1cs_example are: number of constraints = 3 number of inputs = 3 number of variables = 5 With the same parameters, Ligero is working fine. When I use 4 as the number of constraints, then it is working for Aurora.
With Aurora, the number of constraints and the number of variables must be a power of 2. The number of inputs must be 1 less than a power of 2. (i.e. 2^2 - 1)
I'll improve the error message for this. It is fine to just pad the number of constraints, variables and inputs though.
Are there also some constraints on the variable numbers for the Fractal scheme? I have an example which now works fine with Ligero and Aurora but not with Fractal: number of constraints = 6111 (padded to 8192) number of inputs = 12 (padded to 15) number of variables = 5975 I have a crash when creating the parameters (fractal_snark_parameters), whether I 'pad' or not.
I'm surprised Ligero/Aurora work with a non-power of 2 number of variables. I think that has to be a power of 2 as well.
Fractal also needs the number of non-zero indices in a matrix to be a power of 2, but I believe that we pad this. I'll double check the code for this case.
I think the ideal solution here would be to pad all of these things internally, so you don't have to think about these when using the library. This is what the Marlin implementation does
Fractal also needs the number of non-zero indices in a matrix to be a power of 2, but I believe that we pad this. I'll double check the code for this case.
What did you mean by indices? I already know num_constraints has to be a power of two. Do we also need each matrix has 2^x non-zero coefficients for some integer x?
What did you mean by indices? I already know num_constraints has to be a power of two. Do we also need each matrix has 2^x non-zero coefficients for some integer x?
Sorry for the late response, yes you previously did need this. I've now added a commit to master that removes the need for this padding. I'm working on a commit to pad the number of constraints/variables, so users of the library no longer have to think about that either