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

Traits for witnesses and committed instances #157

Merged

Conversation

winderica
Copy link
Contributor

@winderica winderica commented Sep 8, 2024

Since #145 is a huge PR, I would like to separate it into several parts. This PR adds traits Witness{Var}Ext and CommittedInstance{Var}Ext, serving as abstractions for witnesses and committed instances in Nova, HyperNova and ProtoGalaxy.
Looking ahead, the methods in these traits are going to be used by the unified generic decider circuit in #145.

Also, the hash method in CommittedInstance{Var}Ext has a default implementation, so we can eliminate the duplicated code of hash for Nova's CommittedInstance, HyperNova's LCCCS, and ProtoGalaxy's CommittedInstance.
The signature of hash is also changed, where z_0 and z_i are now slices rather than owned vectors.
In this way, we can avoid cloning z_i in augmented circuits, as z_i might be very large.

@winderica winderica marked this pull request as ready for review September 8, 2024 00:25
@winderica winderica mentioned this pull request Sep 8, 2024
@winderica
Copy link
Contributor Author

Just rebased this PR onto main, and it should be ready for review now!

Copy link
Collaborator

@arnaucube arnaucube left a comment

Choose a reason for hiding this comment

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

Really cool! LGTM!

folding-schemes/src/folding/traits.rs Show resolved Hide resolved
folding-schemes/src/folding/traits.rs Show resolved Hide resolved
folding-schemes/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@CPerezz CPerezz left a comment

Choose a reason for hiding this comment

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

LGTM!

folding-schemes/src/folding/hypernova/circuits.rs Outdated Show resolved Hide resolved
@arnaucube arnaucube added this pull request to the merge queue Sep 19, 2024
Merged via the queue into privacy-scaling-explorations:main with commit dfd03ea Sep 19, 2024
8 checks passed
@arnaucube arnaucube added this to the Stabilize lib milestone milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants