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

How to use externally generated R1CS? #22

Closed
Tails opened this issue Aug 16, 2020 · 3 comments
Closed

How to use externally generated R1CS? #22

Tails opened this issue Aug 16, 2020 · 3 comments

Comments

@Tails
Copy link

Tails commented Aug 16, 2020

I'm looking to use Spartan as a backend.
The README states the following:

libspartan supports NP statements expressed as rank-1 constraint satisfiability (R1CS) instances, a popular language for which there exists efficient transformations and compiler toolchains from high-level programs of interest.

But how do you use this library with R1CS constraints as generated by such toolchains?

@Tails
Copy link
Author

Tails commented Aug 16, 2020

I see, one would have to parse the external format, create the A-B-C scalars and instantiate the R1CSInstance::new object with them. And from there on one could follow the instructions in the README. Correct?

@srinathsetty
Copy link
Contributor

Yes, that is exactly right.

R1CSInstance type is not public but as mentioned in README, we are working on adding public APIs to specify an R1CS statement:

Development is ongoing (PRs are welcome!). For example, the library does not yet offer APIs to specify an NP statement, but we will in the future offer standardized APIs and also integrate with a compiler that produces R1CS instances from high level programs.

@srinathsetty
Copy link
Contributor

Closing this issue for now. Please see the third example in README where we demonstrate new APIs for specifying an R1CS instance.

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

2 participants