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

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

Open
arnaucube opened this issue Sep 4, 2024 · 1 comment · May be fixed by #169
Open

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

arnaucube opened this issue Sep 4, 2024 · 1 comment · May be fixed by #169
Assignees
Labels
bug Something isn't working wasm/browser

Comments

@arnaucube
Copy link
Collaborator

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 arnaucube added this to the Stabilize lib milestone milestone Sep 4, 2024
@arnaucube arnaucube added the bug Something isn't working label Oct 2, 2024
@arnaucube
Copy link
Collaborator Author

arnaucube commented Oct 2, 2024

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

@CPerezz CPerezz self-assigned this Oct 2, 2024
CPerezz added a commit that referenced this issue Oct 15, 2024
This commit introduces CircomFCircuitBrowser, a structure that facilitates folding of
Circom-generated circuits in the browser via WASM. It loads R1CS data,
handles witness inputs, and generates constraints for the folding process.

Resolves: #155
@CPerezz CPerezz linked a pull request Oct 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wasm/browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants