-
Notifications
You must be signed in to change notification settings - Fork 66
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
Adapt Frontend/Circom for FCircuit Trait #71
Adapt Frontend/Circom for FCircuit Trait #71
Conversation
…t incompatibility error of Pairing and Pallas
I've been refining the Circom integration and encountered an issue:
However, I face an issue with the R1CS in ark-circom being defined over a |
Oh right! I was unaware that circom-compat (old ark-circom) repo uses the Hopefully we can get into a state of the fork where it makes sense to open a PR into the original arkworks/circom-compat repo so other people in the community can benefit from it too, so if you find something that does not work in the fork and you find how to fix it feel free to update it. |
@arnaucube |
@arnaucube In my current implementation of |
In principle it is generating the constraints under the hood. cs.finalize();
let cs = cs.into_inner().unwrap();
dbg!(crate::ccs::r1cs::extract_r1cs(&cs)); right after src/frontend/mod.rs#L164 , it will print the expected A,B,C matrices for the Regarding the approach to extract the circom constraints, yes it makes sense! |
Thanks. Augmented circuit wraps F circuit constraints with ark-circom, like forming two layers. I have confirmed that Thus, I am having trouble with the ark-circom handling process when there are two constraint layers. I apologize for the inconvenience, but could you please help me how to handle this error? @arnaucube |
Hi ^^ The issue seems to be that the inputs are allocated twice, one in the arkworks I've made some temporary changes in a fork from your branch that make the You will see that there are hardcoded values, this is to keep the commit minimal and simple but that works. A next step should be to iterate those changes and make them dependent on the inputs instead of having the hardcoded values in the function. |
Hello. I worked on the generalization to get rid of the hardcoded values in the |
…t incompatibility error of Pairing and Pallas
Hi ^^ One of the changes has been adding an option to the circom-compat fork to allow to specify that the inputs have been already allocated, which is what was causing the circuit satisfiability fail (allocating more than once the inputs). One think that is pending to do is to separate the witness extraction from If you're up to, I think that you could continue from this fork of your fork, and add commits on top, finishing the changes, and then we should be ready for merging to the main repo :) |
Thank you so much for helping me a lot! Then I continue to work. |
some updates & rebase to last `main` changes
Could you please move on to the review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Regarding the 'typos' errors, yes, don't worry about it, it looks like the last release of typos added lot of 'false positives'
eg. crate-ci/typos#963, crate-ci/typos#967, crate-ci/typos#970.
It seems that now is fixed: crate-ci/typos#975
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid work, thanks for this! Added a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks a lot for this contribution @yugocabrio !! 😊
Just left a small nit
I've applied your feedback. Thank you very much for your assistance!!! @arnaucube and @dmpierre |
Work in progress, I have to write test codes and clean up all. I'll provide an update in detail once finished. #55