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

Make AllocatedR1CSInstance and AllocatedRelaxedR1CSInstance generic in the size of IO #322

Merged
merged 7 commits into from
Feb 14, 2024

Conversation

mpenciak
Copy link
Contributor

This PR resolves #321.

The solution adds a const generic parameter to the two structs, and a new constant that is used in both the Nova and SuperNova augmented circuits where the instances are known to have IO of length 2.

@mpenciak mpenciak changed the title Make AllocatedR1CSInstance and AllocatedRelaxedR1CSInstance generic in the size Make AllocatedR1CSInstance and AllocatedRelaxedR1CSInstance generic in the size of IO Feb 14, 2024
Copy link
Member

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a low level PoV, the code is sometimes a bit complex, but can be simplified, see inline comments.

From a high-level PoV, this gives use generic code in gadgets, that can be used in a scheme-specific manner outside that module, which I think fits the bill: awesome!

src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/gadgets/r1cs.rs Show resolved Hide resolved
src/gadgets/r1cs.rs Show resolved Hide resolved
src/gadgets/r1cs.rs Show resolved Hide resolved
src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/gadgets/r1cs.rs Outdated Show resolved Hide resolved
src/constants.rs Outdated Show resolved Hide resolved
@mpenciak
Copy link
Contributor Author

I think I cleaned up some of the nasty stuff I was doing with iterators, it should be a bit better now!

Copy link
Member

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mpenciak mpenciak added this pull request to the merge queue Feb 14, 2024
Merged via the queue into dev with commit 5bdc0ee Feb 14, 2024
9 checks passed
@mpenciak mpenciak deleted the allocated_r1cs_io branch February 14, 2024 18:51
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

Successfully merging this pull request may close these issues.

Make AllocatedR1CSInstance and AllocatedRelaxedR1CSInstance generic in size of IO
2 participants