privacy-scaling-explorations / sonobe

Experimental folding schemes library
https://privacy-scaling-explorations.github.io/sonobe-docs/
MIT License
205 stars 54 forks source link

Protogalaxy based IVC #123

Closed winderica closed 2 months ago

winderica commented 4 months ago

Depends on #120.

This is an implementation of the IVC scheme based on Protogalaxy, which is compiled from Protogalaxy "the folding scheme" by leveraging CycleFold.

Specifically, this PR implements:

  1. The augmented circuit AugmentedFCircuit built upon AugmentationGadget::prepare_and_fold_{primary, cyclefold}.
  2. The ProtoGalaxy struct that satisfies the FoldingScheme trait.
  3. The integration with CycleFold, in both the augmented circuit and the prove_step method, for off-loading EC operations to the secondary curve.
  4. The RelaxedR1CS trait converted from the original RelaxedR1CS struct, which can now check satisfiability of witness-instance pairs for both Nova and ProtoGalaxy.

Note that there are still two features missing in ProtoGalaxy-based IVC, but I will try to implement them in the incoming PRs.

  1. Enable multi-instances folding in IVC.P
  2. Support hiding commitments

This PR wouldn't be possible without the current Nova-based IVC. Thanks a lot for the amazing work from all of you 😇!

CPerezz commented 3 months ago

@winderica is this indeed ready for review? If so, i'll go for it!

winderica commented 3 months ago

@CPerezz Yes it is! Let's go ahead 😄

winderica commented 2 months ago

Hey, sorry for being inactive for a while, and thanks for the detailed comments @CPerezz! Unfortunately I have had a lot to handle recently, but I will be back in about a week to address the comments!

CPerezz commented 2 months ago

@winderica take all the time you need. I can try to keep rebasing your branch such taht you don't have a ton of work in the future.