AztecProtocol / aztec-packages

Apache License 2.0
180 stars 184 forks source link

feat: Unified bb.js interface that delegates to wasm or native via CLI #7228

Closed spalladino closed 2 months ago

spalladino commented 3 months ago

We want bb.js to expose a unified interface that delegates to either wasm or native, depending on the context (web vs node). The updated bb.js should also provide the CLI entrypoint for proving and verifying during Noir development, replacing native bb, and provide a simplifying interface similar to that of noir-js-backend-barretenberg.

Benefits:

This will involve first defining the shared interface, and then move code out of noir-js-backend-bb and bb-prover to implement it. The shared interface will be a coarse one to correspond to the one exposed by the native CLI. We can later make it more fine-grained when we replace the native CLI as a means to communicate from bb.js to native bb, but since the native bb CLI is stateless, we want to run operations in bulk as much as we can for now.

See this hackmd for initial discussions.

spalladino commented 2 months ago

Closing in favor of unified interface in bb