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

feat: continue_recursive_circuit api #34

Merged
merged 4 commits into from
Aug 21, 2023
Merged

feat: continue_recursive_circuit api #34

merged 4 commits into from
Aug 21, 2023

Conversation

enricobottazzi
Copy link
Contributor

The featured API allows adding a further IVC step to a RecursiveSnark. It is useful for any application in which all the steps are not known in advance.

A few points:

  • It would be good if there was a way to access zn_primary from the RecursiveSnark instead of passing it as input to the add_step function
  • It's still unclear to me what circuit_secondary and z0_secondary actually are. Is it safe to instantiate them to 0/default within the add_step function or is there a case in which the user may want to set a different value?

src/lib.rs Outdated
@@ -309,3 +309,106 @@ where

Ok(recursive_snark)
}

#[cfg(not(target_family = "wasm"))]
pub fn add_step<G1, G2>(
Copy link
Owner

Choose a reason for hiding this comment

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

The current create_recursive_circuit API allows for multiple steps in one call. That’s partly because the cost of witness generation can be reduced by batching. Thoughts on making this API similar?

Maybe rename to continue_recursive_circuit and supporting list of private inputs. It may also be possible to refactor the existing code a bit then and prevent code dupe, but I can do that clean up later as well seperately. :)

@enricobottazzi enricobottazzi changed the title feat: add_step api feat: continue_recursive_circuit api Aug 18, 2023
Copy link
Owner

@nalinbhardwaj nalinbhardwaj left a comment

Choose a reason for hiding this comment

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

looks great, thanks

@nalinbhardwaj nalinbhardwaj merged commit 00085ec into nalinbhardwaj:main Aug 21, 2023
3 checks passed
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.

2 participants