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

Question about Circom frontend for Hypernova #103

Closed
yugocabrio opened this issue May 23, 2024 · 4 comments
Closed

Question about Circom frontend for Hypernova #103

yugocabrio opened this issue May 23, 2024 · 4 comments

Comments

@yugocabrio
Copy link
Contributor

yugocabrio commented May 23, 2024

Hello,
I understand that Hypernova's Augmented Circuit has to be represented as CCS. So my question is does generate_step_constraints in the FCircuit also have to be represented as CCS to conduct HyperNova's folding?
I wrote the code that converts circom-compat's R1CS to Sonobe's R1CS at this PR, but I changed to use cricom-compat's generate_constraints function in the generate_step_constraints of Sonobe. However, I feel that I should have adopted the first approach when I consider HyperNova and see the circom-compat update because it is easy to convert from R1CS to CCS.
What do you think about this and how would the approach to circom for Hypernova be best?

@arnaucube
Copy link
Collaborator

The R1CS to CCS is pretty direct (eg. sonobe/folding-schemes/src/ccs/mod.rs#L73), so the approach that we're currently using is that the HyperNova's AugmentedFCircuit is defined with normal arkworks code which generates the R1CS, and we 'compute' the CCS from that R1CS ('compute' with quotes because it is not computing much, is just re-labeling some parameters to convert it to CCS to work with it later in HyperNova), which then is folded following HyperNova NIMFS scheme.

@yugocabrio
Copy link
Contributor Author

Does this mean that the constraint check of R1CS of Fcircuit (step circuit) is also converted to CCS together with the Augmented circuit when it is converted to CCS?

@arnaucube
Copy link
Collaborator

Yes, the FCircuit is a kind of abstraction that allows to generate the constraints that are part of the AugmentedFCircuit, so at the end the constraints that we generate are the R1CS of the AugmentedFCircuit (which contains the constraints of the FCircuit among other constraints for the other checks). Then the AugmentedFCircuit's R1CS is converted to CCS, which contains the FCircuit constraints converted to CCS too.

@yugocabrio
Copy link
Contributor Author

I understand. Thank you kindly for letting me know.

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