Add ark-circom-witnesscalc integration (work-in-progress) #574
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.
This is a small patch to import the two prove & verify functions from my ark-circom-witnesscalc, as a quick demo.
The reason behind this patch is:
To fix this I:
This is a work in progress, and I would like feedback on how best to integrate this properly with MoPro, as it stands I can produce a single .wasm file containing the proving key, the witness generation runs quickly, and with rayon it can use all CPU cores while proving.
Unfortunately I ran into a small bug with circom-witnesscalc, where if the optimizer is enabled (anything aside form
-O0) the wires/signals get confused, I will need to fix this. I also noticed that I had to disable the additional 'optimizer' stage in wasm-pack, as that resulted in nearly an order of magnitude increase in proving time, e.g. 47s vs 10s for a 100k constraint circuit on a single thread.