fix: Circom Adapter (Groth16 over BLS12-381) #991
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Groth16 Circom Adapter
Description
["1", ..outputs, ...inputs, ...other_signals]["1", ...inputs, ..outputs, ...other_signals]We also change the way public signals are calculated, before it only cared about public inputs but now it counts for public inputs and public outputs as well.
circom_to_lambdanow returns the public signals as well, to not let the user shoot themselves in the foot while computing it as it is different than expected with the addition of constant term at the start. (e.g. if public signals area, byou will actually get1, a, b.We add a
CircomR1CStype which helps with several things:Valuewith manyas_TYPE().unwrap() as TYPEs around the placeFrElementwithin the object itselfBufReaderwithserde_json::from_readerinstead offrom_strfor performanceRemoved some redundant
clones and tidied up some parts of the code.READMEs and tutorial docs are updated and refurbished.
Changed the folder structure to be more inline with Cargo recommendations, mainly that
testsfolder has the integration tests and one test file per test scenario. Guide docs are updated accordingly.Type of change
Checklist