feat: Incorporate dummy backend for bb.js [DO NOT MERGE]#1491
Closed
feat: Incorporate dummy backend for bb.js [DO NOT MERGE]#1491
Conversation
…d updated pedersen/tree tests
This was referenced Jun 6, 2023
kevaundray
reviewed
Jun 6, 2023
| where | ||
| S: Serializer, | ||
| { | ||
| println!("CUR WIT IDX: {:?}", circuit.current_witness_index); |
kevaundray
reviewed
Jun 6, 2023
| let cs: ConstraintSystem = | ||
| ConstraintSystem::try_from(circuit).expect("should have no malformed bb funcs"); | ||
| let circuit_bytes = cs.to_bytes(); | ||
| println!("{:?}", circuit_bytes.capacity()); |
kevaundray
reviewed
Jun 6, 2023
| where | ||
| D: Deserializer<'de>, | ||
| { | ||
| // panic!("Not supported"); |
kevaundray
reviewed
Jun 6, 2023
| termcolor = "1.1.2" | ||
| color-eyre = "0.6.2" | ||
| tokio = "1.0" | ||
| tokio = { version = "1.0.0", features = ["rt"] } |
Contributor
There was a problem hiding this comment.
why is the rt feature needed?
kevaundray
reviewed
Jun 6, 2023
| @@ -1,19 +1,23 @@ | |||
| use std::path::{Path, PathBuf}; | |||
|
|
|||
| // use noirc_abi::WitnessMap; | |||
kevaundray
reviewed
Jun 6, 2023
| noirc_evaluator = { path = "crates/noirc_evaluator" } | ||
| noirc_frontend = { path = "crates/noirc_frontend" } | ||
| noir_wasm = { path = "crates/wasm" } | ||
| base64 = "0.13" |
Contributor
There was a problem hiding this comment.
can you put a comment saying that this is only needed for the bb_js hack
Contributor
|
Can you merge master into this, so the diff is cleaner? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Problem*
Resolves #1489
Summary*
The relevant ACVM rev that is updated to in this PR:
noir-lang/acvm#291
The updated acvm-backend-barretenberg:
noir-lang/acvm-backend-barretenberg#207
This PR sets out to enable compilation of ACIR circuits and witness generation in a format the
bb.jsexpects. nargo built with thebb_jsfeature flag should only use thecompileandexecutecommands as the rest are unimplemented. Untilbb.jsis fully integrated to nargo and/or fully dynamic backends are ready the other commands will not be usable withbb.js. This is an experimental feature and should only be used by advanced users comfortable with downloading from source and escaping from the normalnargoworkflow.Example
Before:
You could call
cargo install --path=crates/nargo_clito use nargo with the nativeacvm-backend-barretenberg. Addtional flags of--no-default-features --features=plonk_bn254_wasmwould enable compilation with a wasm target.Users can then use nargo commands to not only compile, but prove and verify their circuits such as with
nargo prove p --verify.After:
The previous commands work the same as before. However, adding the flags
--no-default-features --features=bb_jswill let a user compile a Noir circuit and generate a witness to file in the format thatbb.jsexpects. However, proving and verifying will be done withbb.js. Binaries are being released forbb.js. Once someone hasbb.jsinstalled globally they can use it according to its CLI.To prove and verify w/
bb.jsthe following command can be run over a compiled circuit and witness:bb.js prove_and_verify -j ./target/c.json -w ./target/witness.trDocumentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmton default settings.