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

(bb.js): Incorporate dummy backend to nargo that can interop with bb.js #1489

Closed
Tracked by #21
vezenovm opened this issue Jun 1, 2023 · 3 comments
Closed
Tracked by #21
Labels
enhancement New feature or request

Comments

@vezenovm
Copy link
Contributor

vezenovm commented Jun 1, 2023

Problem

With barretenberg's move to bb.js there is a divergence in how the new binary expects a circuit to be serialized and the barretenberg structures it expects (bb.js has recursion while acvm-backend-barretenberg) does not. We need a backend that has the structures bb.js expects and the respective serialization.

Happy Case

The previous way of building nargo with acvm-backend-barretenberg should remain the same. If some wishes to compile Noir into the format that bb.js expects they should build nargo using cargo install --path=crates/nargo_cli --no-default-features --features=bb_js. This will be an advanced user feature until bb.js is integrated into nargo. A user should then be able to do nargo compile <CIRCUIT_NAME> and nargo execute witness to interop with bb.js which expects a circuit json file and a witness file.

The tech debt from this dummy backend should be minimal and easy to reverse.

Alternatives Considered

We will eventually move to incorporating bb.js into nargo and then to a final solution once dynamic backends are fully ready. This is a temporary solution to get bb.js (which included the low-memory prover and recursion) integrated with Noir, and will be moved away from.

The current dummy backend also does not handle methods that require simulation such as pedersen. This will most likely only come once we have a clean way for nargo to interop with bb.js.

Additional Context

No response

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@vezenovm vezenovm added the enhancement New feature or request label Jun 1, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jun 1, 2023
@Savio-Sou Savio-Sou moved this from 📋 Backlog to 🏗 In progress in Noir Jun 2, 2023
@Savio-Sou
Copy link
Collaborator

Superseded by #1569?

@kevaundray
Copy link
Contributor

Superseded by #1569?

Yep

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Noir Jul 6, 2023
@vezenovm
Copy link
Contributor Author

vezenovm commented Jul 6, 2023

This PR #1876 when used with this serialization tool https://github.com/vezenovm/acir-to-bberg-circuit should get Noir master in line with bb.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants