privacy-scaling-explorations / sonobe

Experimental folding schemes library
https://privacy-scaling-explorations.github.io/sonobe-docs/
MIT License
204 stars 53 forks source link

Arrange circom's frontend witness_generator's wasm within wasm #155

Open arnaucube opened 2 months ago

arnaucube commented 2 months ago

The current approach to allow usage of the Sonobe's Circom frontend in the browser, takes the Circom's generated 'witness_generator' wasm and it 'simulates' it within wasm (compiled from rust). This 'wasm inception' of 1 level seems to be a bit costly, which results into folding steps being considerably slow (~10s per step, using Circom frontend in the browser).

The Circom witness generation outputs a wasm file that can be directly executed in the browser to generate the witness fast (without interpreting it inside another wasm), ideally we would not be simulating wasm inside another wasm but directly using the wasm from circom called from js, and passing the result of this computation to the wasm compilation of sonobe, which should be faster than the current approach.

Notice that this only affects the Sonobe's Circom frontend used in the browser.

arnaucube commented 1 month ago

@CPerezz you were working on fixing this one, right?