Skip to content
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

"unknown file: Failure" when using Aurora #4

Open
guipublic opened this issue Oct 18, 2019 · 5 comments
Open

"unknown file: Failure" when using Aurora #4

guipublic opened this issue Oct 18, 2019 · 5 comments

Comments

@guipublic
Copy link
Contributor

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.

@ValarDragon
Copy link
Member

ValarDragon commented Oct 18, 2019

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.

@guipublic
Copy link
Contributor Author

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.

@ValarDragon
Copy link
Member

ValarDragon commented Oct 28, 2019

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

@vherbert
Copy link

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?

@ValarDragon
Copy link
Member

ValarDragon commented Aug 28, 2020

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

ValarDragon added a commit that referenced this issue May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants