From 0f817dfd9476d37688f26897941803e917ad0537 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 25 Apr 2023 23:38:44 +0100 Subject: [PATCH 1/9] chore: replace `aztec_backend` with `acvm-backend-barretenberg` --- Cargo.lock | 40 ++++++++----------- crates/nargo_cli/Cargo.toml | 7 ++-- crates/nargo_cli/src/backends.rs | 14 ++----- crates/nargo_cli/src/cli/check_cmd.rs | 2 +- .../nargo_cli/src/cli/codegen_verifier_cmd.rs | 2 +- crates/nargo_cli/src/cli/compile_cmd.rs | 2 +- crates/nargo_cli/src/cli/execute_cmd.rs | 2 +- crates/nargo_cli/src/cli/gates_cmd.rs | 2 +- crates/nargo_cli/src/cli/print_acir_cmd.rs | 2 +- crates/nargo_cli/src/cli/prove_cmd.rs | 2 +- crates/nargo_cli/src/cli/test_cmd.rs | 4 +- crates/nargo_cli/src/cli/verify_cmd.rs | 2 +- 12 files changed, 33 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85b5c12aa46..506f9296028 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,6 +46,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "acvm-backend-barretenberg" +version = "0.1.0" +source = "git+https://github.com/noir-lang/aztec_backend?rev=ba1d0d61b94de91b15044d97608907c21bfb5299#ba1d0d61b94de91b15044d97608907c21bfb5299" +dependencies = [ + "barretenberg-sys", + "blake2", + "common", + "getrandom", + "pkg-config", + "rust-embed", + "wasmer", +] + [[package]] name = "acvm_stdlib" version = "0.9.0" @@ -305,27 +319,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "barretenberg_static_lib" -version = "0.1.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=e3d4504f15e1295e637c4da80b1d08c87c267c45#e3d4504f15e1295e637c4da80b1d08c87c267c45" -dependencies = [ - "barretenberg-sys", - "common", -] - -[[package]] -name = "barretenberg_wasm" -version = "0.1.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=e3d4504f15e1295e637c4da80b1d08c87c267c45#e3d4504f15e1295e637c4da80b1d08c87c267c45" -dependencies = [ - "common", - "getrandom", - "pkg-config", - "rust-embed", - "wasmer", -] - [[package]] name = "base64" version = "0.21.0" @@ -621,7 +614,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=e3d4504f15e1295e637c4da80b1d08c87c267c45#e3d4504f15e1295e637c4da80b1d08c87c267c45" +source = "git+https://github.com/noir-lang/aztec_backend?rev=ba1d0d61b94de91b15044d97608907c21bfb5299#ba1d0d61b94de91b15044d97608907c21bfb5299" dependencies = [ "acvm", "blake2", @@ -1901,10 +1894,9 @@ name = "nargo_cli" version = "0.4.1" dependencies = [ "acvm", + "acvm-backend-barretenberg", "assert_cmd", "assert_fs", - "barretenberg_static_lib", - "barretenberg_wasm", "build-data", "cfg-if 1.0.0", "clap", diff --git a/crates/nargo_cli/Cargo.toml b/crates/nargo_cli/Cargo.toml index 40ab4b92459..cd423acaa31 100644 --- a/crates/nargo_cli/Cargo.toml +++ b/crates/nargo_cli/Cargo.toml @@ -37,8 +37,7 @@ termcolor = "1.1.2" color-eyre = "0.6.2" # Backends -aztec_backend = { optional = true, package = "barretenberg_static_lib", git = "https://github.com/noir-lang/aztec_backend", rev = "e3d4504f15e1295e637c4da80b1d08c87c267c45" } -aztec_wasm_backend = { optional = true, package = "barretenberg_wasm", git = "https://github.com/noir-lang/aztec_backend", rev = "e3d4504f15e1295e637c4da80b1d08c87c267c45" } +acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "ba1d0d61b94de91b15044d97608907c21bfb5299", default-features=false } [dev-dependencies] tempdir = "0.3.7" @@ -49,6 +48,6 @@ predicates = "2.1.5" [features] default = ["plonk_bn254"] # The plonk backend can only use bn254, so we do not specify the field -plonk_bn254 = ["aztec_backend"] -plonk_bn254_wasm = ["aztec_wasm_backend"] +plonk_bn254 = ["acvm-backend-barretenberg/native"] +plonk_bn254_wasm = ["acvm-backend-barretenberg/wasm"] diff --git a/crates/nargo_cli/src/backends.rs b/crates/nargo_cli/src/backends.rs index e1113279f80..bbec5c99006 100644 --- a/crates/nargo_cli/src/backends.rs +++ b/crates/nargo_cli/src/backends.rs @@ -1,14 +1,8 @@ -cfg_if::cfg_if! { - if #[cfg(feature = "plonk_bn254")] { - pub(crate) use aztec_backend::Plonk as ConcreteBackend; - } else if #[cfg(feature = "plonk_bn254_wasm")] { - pub(crate) use aztec_wasm_backend::Plonk as ConcreteBackend; - } else { - compile_error!("please specify a backend to compile with"); - } -} +pub(crate) use acvm_backend_barretenberg::Barretenberg as ConcreteBackend; + +#[cfg(not(any(feature = "plonk_bn254", feature = "plonk_bn254_wasm")))] +compile_error!("please specify a backend to compile with"); -// As we have 3 feature flags we must test all 3 potential pairings to ensure they're mutually exclusive. #[cfg(all(feature = "plonk_bn254", feature = "plonk_bn254_wasm"))] compile_error!( "feature \"plonk_bn254\" and feature \"plonk_bn254_wasm\" cannot be enabled at the same time" diff --git a/crates/nargo_cli/src/cli/check_cmd.rs b/crates/nargo_cli/src/cli/check_cmd.rs index 557093444a1..3049c830def 100644 --- a/crates/nargo_cli/src/cli/check_cmd.rs +++ b/crates/nargo_cli/src/cli/check_cmd.rs @@ -24,7 +24,7 @@ pub(crate) fn run(args: CheckCommand, config: NargoConfig) -> Result<(), CliErro } fn check_from_path>(p: P, compile_options: &CompileOptions) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let mut driver = Resolver::resolve_root_manifest(p.as_ref(), backend.np_language())?; diff --git a/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs b/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs index 319a5722708..f23502a15b5 100644 --- a/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs +++ b/crates/nargo_cli/src/cli/codegen_verifier_cmd.rs @@ -19,7 +19,7 @@ pub(crate) struct CodegenVerifierCommand { } pub(crate) fn run(args: CodegenVerifierCommand, config: NargoConfig) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); // TODO(#1201): Should this be a utility function? let circuit_build_path = args diff --git a/crates/nargo_cli/src/cli/compile_cmd.rs b/crates/nargo_cli/src/cli/compile_cmd.rs index 50c21486385..78b52003166 100644 --- a/crates/nargo_cli/src/cli/compile_cmd.rs +++ b/crates/nargo_cli/src/cli/compile_cmd.rs @@ -30,7 +30,7 @@ pub(crate) struct CompileCommand { pub(crate) fn run(args: CompileCommand, config: NargoConfig) -> Result<(), CliError> { let circuit_dir = config.program_dir.join(TARGET_DIR); - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); // If contracts is set we're compiling every function in a 'contract' rather than just 'main'. if args.contracts { diff --git a/crates/nargo_cli/src/cli/execute_cmd.rs b/crates/nargo_cli/src/cli/execute_cmd.rs index 9d1429bbda7..adeefc860a5 100644 --- a/crates/nargo_cli/src/cli/execute_cmd.rs +++ b/crates/nargo_cli/src/cli/execute_cmd.rs @@ -46,7 +46,7 @@ fn execute_with_path( program_dir: &Path, compile_options: &CompileOptions, ) -> Result<(Option, WitnessMap), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let compiled_program = compile_circuit(&backend, program_dir, compile_options)?; diff --git a/crates/nargo_cli/src/cli/gates_cmd.rs b/crates/nargo_cli/src/cli/gates_cmd.rs index a5093b4d775..9fe9f5c7a53 100644 --- a/crates/nargo_cli/src/cli/gates_cmd.rs +++ b/crates/nargo_cli/src/cli/gates_cmd.rs @@ -23,7 +23,7 @@ fn count_gates_with_path>( program_dir: P, compile_options: &CompileOptions, ) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let compiled_program = compile_circuit(&backend, program_dir.as_ref(), compile_options)?; let num_opcodes = compiled_program.circuit.opcodes.len(); diff --git a/crates/nargo_cli/src/cli/print_acir_cmd.rs b/crates/nargo_cli/src/cli/print_acir_cmd.rs index 589cc490f40..38b841121bc 100644 --- a/crates/nargo_cli/src/cli/print_acir_cmd.rs +++ b/crates/nargo_cli/src/cli/print_acir_cmd.rs @@ -22,7 +22,7 @@ fn print_acir_with_path>( program_dir: P, compile_options: &CompileOptions, ) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let compiled_program = compile_circuit(&backend, program_dir.as_ref(), compile_options)?; println!("{}", compiled_program.circuit); diff --git a/crates/nargo_cli/src/cli/prove_cmd.rs b/crates/nargo_cli/src/cli/prove_cmd.rs index fd60f004e2b..cecdee23fee 100644 --- a/crates/nargo_cli/src/cli/prove_cmd.rs +++ b/crates/nargo_cli/src/cli/prove_cmd.rs @@ -65,7 +65,7 @@ pub(crate) fn prove_with_path>( check_proof: bool, compile_options: &CompileOptions, ) -> Result, CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let preprocessed_program = match circuit_build_path { Some(circuit_build_path) => read_program_from_file(circuit_build_path)?, diff --git a/crates/nargo_cli/src/cli/test_cmd.rs b/crates/nargo_cli/src/cli/test_cmd.rs index d168e6c39ca..65f8265a862 100644 --- a/crates/nargo_cli/src/cli/test_cmd.rs +++ b/crates/nargo_cli/src/cli/test_cmd.rs @@ -32,7 +32,7 @@ fn run_tests( test_name: &str, compile_options: &CompileOptions, ) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let mut driver = Resolver::resolve_root_manifest(program_dir, backend.np_language())?; @@ -79,7 +79,7 @@ fn run_test( driver: &Driver, config: &CompileOptions, ) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let program = driver .compile_no_check(config, main) diff --git a/crates/nargo_cli/src/cli/verify_cmd.rs b/crates/nargo_cli/src/cli/verify_cmd.rs index cf2e4859091..07b7e351ee9 100644 --- a/crates/nargo_cli/src/cli/verify_cmd.rs +++ b/crates/nargo_cli/src/cli/verify_cmd.rs @@ -43,7 +43,7 @@ fn verify_with_path>( circuit_build_path: Option

, compile_options: CompileOptions, ) -> Result<(), CliError> { - let backend = crate::backends::ConcreteBackend; + let backend = crate::backends::ConcreteBackend::default(); let preprocessed_program = match circuit_build_path { Some(circuit_build_path) => read_program_from_file(circuit_build_path)?, From be16e462d6f6ec7bb5d0ef86bf93f5683d778ea2 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 27 Apr 2023 16:50:36 +0100 Subject: [PATCH 2/9] feat: update to ACVM 0.10.0 --- Cargo.lock | 108 ++---------------- Cargo.toml | 3 +- crates/nargo/src/ops/execute.rs | 7 +- crates/nargo_cli/Cargo.toml | 2 +- crates/noirc_evaluator/src/lib.rs | 2 +- .../src/ssa/acir_gen/constraints.rs | 20 ++-- .../src/ssa/acir_gen/internal_var.rs | 2 +- .../src/ssa/acir_gen/operations/binary.rs | 4 +- .../src/ssa/acir_gen/operations/bitwise.rs | 4 +- .../src/ssa/acir_gen/operations/cmp.rs | 4 +- .../src/ssa/acir_gen/operations/intrinsics.rs | 2 +- .../src/ssa/acir_gen/operations/not.rs | 2 +- .../src/ssa/acir_gen/operations/sort.rs | 5 +- crates/noirc_evaluator/src/ssa/builtin.rs | 10 +- 14 files changed, 46 insertions(+), 129 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 506f9296028..b96fc7e0e80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,8 +5,7 @@ version = 3 [[package]] name = "acir" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "018148d69bf14422b1c1d62909a241af2a7f51fec064feb2b01de88fb02b11b8" +source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" dependencies = [ "acir_field", "flate2", @@ -17,8 +16,7 @@ dependencies = [ [[package]] name = "acir_field" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d40dac25cf6be6335dd86286caeac859afd0dc74a4a75c64eed041b0f00a278" +source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" dependencies = [ "ark-bn254", "ark-ff", @@ -31,8 +29,7 @@ dependencies = [ [[package]] name = "acvm" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17b7bc8f2b2215075b8e080ba3a0b8b7d759f04bc44b27e5bb8d845f4c77f20" +source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" dependencies = [ "acir", "acvm_stdlib", @@ -48,23 +45,27 @@ dependencies = [ [[package]] name = "acvm-backend-barretenberg" -version = "0.1.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=ba1d0d61b94de91b15044d97608907c21bfb5299#ba1d0d61b94de91b15044d97608907c21bfb5299" +version = "0.0.0" +source = "git+https://github.com/noir-lang/aztec_backend?rev=880210c5dcb55d29437a68c11913406704a0eb71#880210c5dcb55d29437a68c11913406704a0eb71" dependencies = [ + "acvm", "barretenberg-sys", "blake2", - "common", + "dirs 3.0.2", + "futures-util", "getrandom", + "indicatif", "pkg-config", + "reqwest", "rust-embed", + "tokio", "wasmer", ] [[package]] name = "acvm_stdlib" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ce2d19a9d1e7ff1bf415ed909b43031e33ef6df21be70e470bb1817b3e6989" +source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" dependencies = [ "acir", ] @@ -611,21 +612,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "common" -version = "0.1.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=ba1d0d61b94de91b15044d97608907c21bfb5299#ba1d0d61b94de91b15044d97608907c21bfb5299" -dependencies = [ - "acvm", - "blake2", - "dirs 3.0.2", - "futures-util", - "indicatif", - "reqwest", - "sled", - "tokio", -] - [[package]] name = "console" version = "0.15.5" @@ -1195,16 +1181,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -1278,15 +1254,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generational-arena" version = "0.2.8" @@ -1754,16 +1721,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.17" @@ -2116,31 +2073,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - [[package]] name = "paste" version = "1.0.12" @@ -2933,22 +2865,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot", -] - [[package]] name = "smallvec" version = "1.10.0" diff --git a/Cargo.toml b/Cargo.toml index 26eec846ef9..d74e2b2475c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,8 @@ edition = "2021" rust-version = "1.66" [workspace.dependencies] -acvm = "0.9.0" +#acvm = "0.9.0" +acvm = { git = "https://github.com/noir-lang/acvm", rev = "15d3c5a9be2dd92f266fcb7e672da17cada9fec5", features = ["bn254"] } arena = { path = "crates/arena" } fm = { path = "crates/fm" } iter-extended = { path = "crates/iter-extended" } diff --git a/crates/nargo/src/ops/execute.rs b/crates/nargo/src/ops/execute.rs index eb82df60d41..e4c8a5afbb5 100644 --- a/crates/nargo/src/ops/execute.rs +++ b/crates/nargo/src/ops/execute.rs @@ -1,5 +1,5 @@ -use acvm::PartialWitnessGenerator; use acvm::{acir::circuit::Circuit, pwg::block::Blocks}; +use acvm::{PartialWitnessGenerator, PartialWitnessGeneratorStatus}; use noirc_abi::WitnessMap; use crate::NargoError; @@ -10,9 +10,8 @@ pub fn execute_circuit( mut initial_witness: WitnessMap, ) -> Result { let mut blocks = Blocks::default(); - let (unresolved_opcodes, oracles) = - backend.solve(&mut initial_witness, &mut blocks, circuit.opcodes)?; - if !unresolved_opcodes.is_empty() || !oracles.is_empty() { + let solver_status = backend.solve(&mut initial_witness, &mut blocks, circuit.opcodes)?; + if matches!(solver_status, PartialWitnessGeneratorStatus::RequiresOracleData { .. }) { todo!("Add oracle support to nargo execute") } diff --git a/crates/nargo_cli/Cargo.toml b/crates/nargo_cli/Cargo.toml index cd423acaa31..c4691c4ab21 100644 --- a/crates/nargo_cli/Cargo.toml +++ b/crates/nargo_cli/Cargo.toml @@ -37,7 +37,7 @@ termcolor = "1.1.2" color-eyre = "0.6.2" # Backends -acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "ba1d0d61b94de91b15044d97608907c21bfb5299", default-features=false } +acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "880210c5dcb55d29437a68c11913406704a0eb71", default-features=false } [dev-dependencies] tempdir = "0.3.7" diff --git a/crates/noirc_evaluator/src/lib.rs b/crates/noirc_evaluator/src/lib.rs index 8b3cbb009a9..a94bc45dbf6 100644 --- a/crates/noirc_evaluator/src/lib.rs +++ b/crates/noirc_evaluator/src/lib.rs @@ -158,7 +158,7 @@ impl Evaluator { let inter_var_witness = self.add_witness_to_cs(); // Link that witness to the arithmetic gate - let constraint = &arithmetic_gate - &inter_var_witness; + let constraint = &arithmetic_gate - inter_var_witness; self.opcodes.push(AcirOpcode::Arithmetic(constraint)); inter_var_witness } diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/constraints.rs b/crates/noirc_evaluator/src/ssa/acir_gen/constraints.rs index 8257e0c9f9a..11371dc54a6 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/constraints.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/constraints.rs @@ -31,7 +31,7 @@ pub(crate) fn mul_with_witness( let a_arith; let a_arith = if !a.mul_terms.is_empty() && !b.is_const() { let a_witness = evaluator.create_intermediate_variable(a.clone()); - a_arith = Expression::from(&a_witness); + a_arith = Expression::from(a_witness); &a_arith } else { a @@ -42,7 +42,7 @@ pub(crate) fn mul_with_witness( a_arith } else { let b_witness = evaluator.create_intermediate_variable(b.clone()); - b_arith = Expression::from(&b_witness); + b_arith = Expression::from(b_witness); &b_arith } } else { @@ -54,9 +54,9 @@ pub(crate) fn mul_with_witness( //a*b pub(crate) fn mul(a: &Expression, b: &Expression) -> Expression { if a.is_const() { - return b * &a.q_c; + return b * a.q_c; } else if b.is_const() { - return a * &b.q_c; + return a * b.q_c; } else if !(a.is_linear() && b.is_linear()) { unreachable!("Can only multiply linear terms"); } @@ -125,9 +125,9 @@ pub(crate) fn subtract(a: &Expression, k: FieldElement, b: &Expression) -> Expre // TODO in either case, we can put this in ACIR, if its useful pub(crate) fn add(a: &Expression, k: FieldElement, b: &Expression) -> Expression { if a.is_const() { - return (b * &k) + &a.q_c; + return (b * k) + a.q_c; } else if b.is_const() { - return a.clone() + &(k * b.q_c); + return a.clone() + (k * b.q_c); } let mut output = Expression::from_field(a.q_c + k * b.q_c); @@ -497,7 +497,7 @@ pub(crate) fn evaluate_truncate( if let Some(a_c) = lhs.to_const() { let mut a_big = BigUint::from_bytes_be(&a_c.to_be_bytes()); a_big %= exp_big; - return Expression::from(&FieldElement::from_be_bytes_reduce(&a_big.to_bytes_be())); + return Expression::from(FieldElement::from_be_bytes_reduce(&a_big.to_bytes_be())); } let exp = FieldElement::from_be_bytes_reduce(&exp_big.to_bytes_be()); @@ -524,7 +524,7 @@ pub(crate) fn evaluate_truncate( let my_constraint = add(&res, -FieldElement::one(), lhs); evaluator.push_opcode(AcirOpcode::Arithmetic(my_constraint)); - Expression::from(&b_witness) + Expression::from(b_witness) } pub(crate) fn evaluate_udiv( @@ -552,8 +552,8 @@ pub(crate) fn evaluate_udiv( //range check q<=a try_range_constraint(q_witness, bit_size, evaluator); // a-b*q-r = 0 - let mut d = mul_with_witness(evaluator, rhs, &Expression::from(&q_witness)); - d = add(&d, FieldElement::one(), &Expression::from(&r_witness)); + let mut d = mul_with_witness(evaluator, rhs, &Expression::from(q_witness)); + d = add(&d, FieldElement::one(), &Expression::from(r_witness)); d = mul_with_witness(evaluator, &d, predicate); let div_euclidean = subtract(&pa, FieldElement::one(), &d); diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/internal_var.rs b/crates/noirc_evaluator/src/ssa/acir_gen/internal_var.rs index 8e6e16776a9..27d6b0ec25b 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/internal_var.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/internal_var.rs @@ -98,7 +98,7 @@ impl InternalVar { /// Expression, this method is infallible. pub(crate) fn from_witness(witness: Witness) -> InternalVar { InternalVar { - expression: Expression::from(&witness), + expression: Expression::from(witness), cached_witness: Some(witness), id: None, } diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/binary.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/binary.rs index bf1f59391f9..87280eb1fde 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/binary.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/binary.rs @@ -146,12 +146,12 @@ pub(crate) fn evaluate( if r_value.is_zero() { panic!("Panic - division by zero"); } else { - (l_c.expression() * &r_value.inverse()).into() + (l_c.expression() * r_value.inverse()).into() } } else { //TODO avoid creating witnesses here. let x_witness = acir_gen.var_cache.get_or_compute_witness(r_c, evaluator).expect("unexpected constant expression"); - let inverse = Expression::from(&constraints::evaluate_inverse( + let inverse = Expression::from(constraints::evaluate_inverse( x_witness, &predicate, evaluator, )); InternalVar::from(constraints::mul_with_witness( diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/bitwise.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/bitwise.rs index 947cf93edd9..f8ca271835e 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/bitwise.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/bitwise.rs @@ -155,9 +155,9 @@ pub(super) fn evaluate_bitwise( constraints::subtract( &Expression::from_field(max), FieldElement::one(), - &Expression::from(&result), + &Expression::from(result), ) } else { - Expression::from(&result) + Expression::from(result) } } diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/cmp.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/cmp.rs index 4abd34f6e01..0f8091e2f6f 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/cmp.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/cmp.rs @@ -69,7 +69,7 @@ pub(super) fn evaluate_neq( .get_or_compute_witness(x, evaluator) .expect("unexpected constant expression"); - return Expression::from(&constraints::evaluate_zero_equality(x_witness, evaluator)); + return Expression::from(constraints::evaluate_zero_equality(x_witness, evaluator)); } // Arriving here means that `lhs` and `rhs` are not Arrays @@ -95,7 +95,7 @@ pub(super) fn evaluate_neq( .var_cache .get_or_compute_witness(x, evaluator) .expect("unexpected constant expression"); - Expression::from(&constraints::evaluate_zero_equality(x_witness, evaluator)) + Expression::from(constraints::evaluate_zero_equality(x_witness, evaluator)) } } diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/intrinsics.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/intrinsics.rs index 7d6f7e2c32c..ea7d3d9c6c0 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/intrinsics.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/intrinsics.rs @@ -107,7 +107,7 @@ pub(crate) fn evaluate( } outputs = prepare_outputs(&mut acir_gen.memory, instruction_id, array.len, ctx, evaluator); - let out_expr: Vec = outputs.iter().map(|w| w.into()).collect(); + let out_expr: Vec = outputs.iter().map(|w| (*w).into()).collect(); for i in 0..(out_expr.len() - 1) { bound_constraint_with_offset( &out_expr[i], diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/not.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/not.rs index ff8bb26f788..76ad7c93a88 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/not.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/not.rs @@ -19,7 +19,7 @@ pub(crate) fn evaluate( let l_c = var_cache.get_or_compute_internal_var_unwrap(*value, evaluator, ctx); Some( constraints::subtract( - &Expression::from(&FieldElement::from(a)), + &Expression::from(FieldElement::from(a)), FieldElement::one(), l_c.expression(), ) diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs index 04524959fbe..ffcbf1ea7c0 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/sort.rs @@ -119,6 +119,7 @@ mod test { acir::{circuit::opcodes::BlackBoxFuncCall, native_types::Witness}, pwg::block::Blocks, FieldElement, OpcodeResolution, OpcodeResolutionError, PartialWitnessGenerator, + PartialWitnessGeneratorStatus, }; use crate::{ @@ -180,10 +181,10 @@ mod test { // compute the network output by solving the constraints let backend = MockBackend {}; let mut blocks = Blocks::default(); - let (unresolved_opcodes, oracles) = backend + let solver_status = backend .solve(&mut solved_witness, &mut blocks, eval.opcodes.clone()) .expect("Could not solve permutation constraints"); - assert!(unresolved_opcodes.is_empty() && oracles.is_empty(), "Incomplete solution"); + assert_eq!(solver_status, PartialWitnessGeneratorStatus::Solved, "Incomplete solution"); let mut b_val = Vec::new(); for i in 0..output.len() { b_val.push(solved_witness[&b_wit[i]]); diff --git a/crates/noirc_evaluator/src/ssa/builtin.rs b/crates/noirc_evaluator/src/ssa/builtin.rs index 8248322c488..81b4abe934e 100644 --- a/crates/noirc_evaluator/src/ssa/builtin.rs +++ b/crates/noirc_evaluator/src/ssa/builtin.rs @@ -77,10 +77,10 @@ impl Opcode { | BlackBoxFunc::Pedersen | BlackBoxFunc::FixedBaseScalarMul => BigUint::zero(), // Verify returns zero or one - BlackBoxFunc::SchnorrVerify - | BlackBoxFunc::EcdsaSecp256k1 - | BlackBoxFunc::MerkleMembership => BigUint::one(), - BlackBoxFunc::HashToField128Security => ObjectType::native_field().max_size(), + BlackBoxFunc::SchnorrVerify | BlackBoxFunc::EcdsaSecp256k1 => BigUint::one(), + BlackBoxFunc::ComputeMerkleRoot | BlackBoxFunc::HashToField128Security => { + ObjectType::native_field().max_size() + } BlackBoxFunc::AES => { todo!("ICE: AES is unimplemented") } @@ -113,7 +113,7 @@ impl Opcode { } BlackBoxFunc::HashToField128Security => (1, ObjectType::native_field()), // See issue #775 on changing this to return a boolean - BlackBoxFunc::MerkleMembership + BlackBoxFunc::ComputeMerkleRoot | BlackBoxFunc::SchnorrVerify | BlackBoxFunc::EcdsaSecp256k1 => (1, ObjectType::native_field()), BlackBoxFunc::Pedersen => (2, ObjectType::native_field()), From 24b680fb0bddfc93cb962ab730ea357a737b0189 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 27 Apr 2023 20:10:51 +0100 Subject: [PATCH 3/9] chore: move `ComputeMerkleRoot` to same match arm as `HashToField128Security` --- crates/noirc_evaluator/src/ssa/builtin.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/noirc_evaluator/src/ssa/builtin.rs b/crates/noirc_evaluator/src/ssa/builtin.rs index 81b4abe934e..8e402343bb5 100644 --- a/crates/noirc_evaluator/src/ssa/builtin.rs +++ b/crates/noirc_evaluator/src/ssa/builtin.rs @@ -111,11 +111,13 @@ impl Opcode { BlackBoxFunc::SHA256 | BlackBoxFunc::Blake2s => { (32, ObjectType::unsigned_integer(8)) } - BlackBoxFunc::HashToField128Security => (1, ObjectType::native_field()), + BlackBoxFunc::ComputeMerkleRoot | BlackBoxFunc::HashToField128Security => { + (1, ObjectType::native_field()) + } // See issue #775 on changing this to return a boolean - BlackBoxFunc::ComputeMerkleRoot - | BlackBoxFunc::SchnorrVerify - | BlackBoxFunc::EcdsaSecp256k1 => (1, ObjectType::native_field()), + BlackBoxFunc::SchnorrVerify | BlackBoxFunc::EcdsaSecp256k1 => { + (1, ObjectType::native_field()) + } BlackBoxFunc::Pedersen => (2, ObjectType::native_field()), BlackBoxFunc::FixedBaseScalarMul => (2, ObjectType::native_field()), BlackBoxFunc::RANGE | BlackBoxFunc::AND | BlackBoxFunc::XOR => { From d79b7f3a737940a9528753a05e1ed4d530397064 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 27 Apr 2023 20:11:56 +0100 Subject: [PATCH 4/9] chore: bump backend commit --- Cargo.lock | 2 +- crates/nargo_cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b96fc7e0e80..514ee4ab2bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,7 +46,7 @@ dependencies = [ [[package]] name = "acvm-backend-barretenberg" version = "0.0.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=880210c5dcb55d29437a68c11913406704a0eb71#880210c5dcb55d29437a68c11913406704a0eb71" +source = "git+https://github.com/noir-lang/aztec_backend?rev=e7c4a2cc68c9d14b083290a3715e97ab05d163e7#e7c4a2cc68c9d14b083290a3715e97ab05d163e7" dependencies = [ "acvm", "barretenberg-sys", diff --git a/crates/nargo_cli/Cargo.toml b/crates/nargo_cli/Cargo.toml index c4691c4ab21..994bf7fb297 100644 --- a/crates/nargo_cli/Cargo.toml +++ b/crates/nargo_cli/Cargo.toml @@ -37,7 +37,7 @@ termcolor = "1.1.2" color-eyre = "0.6.2" # Backends -acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "880210c5dcb55d29437a68c11913406704a0eb71", default-features=false } +acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "e7c4a2cc68c9d14b083290a3715e97ab05d163e7", default-features=false } [dev-dependencies] tempdir = "0.3.7" From c64992ad8bfe34a716f4355274e6958d5fae37b9 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 27 Apr 2023 20:12:06 +0100 Subject: [PATCH 5/9] feat: update stdlib to use new merkle black box function --- noir_stdlib/src/merkle.nr | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/noir_stdlib/src/merkle.nr b/noir_stdlib/src/merkle.nr index 9f7c5d5b130..a47ce86c94b 100644 --- a/noir_stdlib/src/merkle.nr +++ b/noir_stdlib/src/merkle.nr @@ -5,16 +5,15 @@ // and the hashpath proves this // Currently we assume that it is a binary tree, so depth k implies a width of 2^k // XXX: In the future we can add an arity parameter -#[foreign(merkle_membership)] -fn check_membership(_root : Field, _leaf : Field, _index : Field, _hash_path: [Field]) -> Field {} - - -#[alternative(merkle_membership)] -fn check_membership_in_noir(root : Field, leaf : Field, index : Field, hash_path: [Field]) -> Field { - (compute_root_from_leaf(leaf, index, hash_path) == root) as Field +fn check_membership(_root : Field, _leaf : Field, _index : Field, _hash_path: [Field]) -> Field { + (compute_merkle_root(_leaf, _index, _hash_path) == _root) as Field } +#[foreign(compute_merkle_root)] +fn compute_merkle_root(_leaf : Field, _index : Field, _hash_path: [Field]) -> Field {} + // Returns the root of the tree from the provided leaf and its hashpath, using pedersen hash +#[alternative(compute_merkle_root)] fn compute_root_from_leaf(leaf : Field, index : Field, hash_path: [Field]) -> Field { let n = hash_path.len(); let index_bits = index.to_le_bits(n as u32); From 5703482285bf734b75f4d294d6a994083c09603e Mon Sep 17 00:00:00 2001 From: Tom French Date: Fri, 28 Apr 2023 12:55:50 +0100 Subject: [PATCH 6/9] fix: bump commit of barretenberg to match acvm-backend-barretenberg --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 7c01326f86d..6a6aff10f73 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1682345890, - "narHash": "sha256-ZsInK9Iy81MaCugouU3ifa5Vw2GKlJK9MxCU/LF8bIw=", + "lastModified": 1682626614, + "narHash": "sha256-TC535frlYLUTDZ2iHAtUtKpMJWngL1MFxzEXhOfeCo8=", "owner": "AztecProtocol", "repo": "barretenberg", - "rev": "87aeb375d7b434e0faf47abb79f97753ab760987", + "rev": "7b5598890c1fa4ee485a4a0015fcb23b5389392e", "type": "github" }, "original": { From 0171a46d289e4ed7e07c75f2994f7f8bd23e493c Mon Sep 17 00:00:00 2001 From: Tom French Date: Fri, 28 Apr 2023 13:00:14 +0100 Subject: [PATCH 7/9] feat: update `merkle_insert` to use new `compute_merkle_root` function --- crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr b/crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr index 9d612977fa8..3ab4efb64c0 100644 --- a/crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr +++ b/crates/nargo_cli/tests/test_data/merkle_insert/src/main.nr @@ -12,8 +12,8 @@ fn main( let old_leaf_exists = std::merkle::check_membership(old_root, old_leaf, index, old_hash_path); constrain old_leaf_exists == 1; constrain old_root == std::merkle::compute_root_from_leaf(old_leaf, index, old_hash_path); - let new_leaf_exists = std::merkle::check_membership(new_root, leaf, index, old_hash_path); - constrain new_leaf_exists == 1; + let calculated_root = std::merkle::compute_merkle_root(leaf, index, old_hash_path); + constrain new_root == calculated_root; let h = std::hash::mimc_bn254(mimc_input); // Regression test for PR #891 From 75b9dc91be30c2f0356df1243a123782cfa39fa7 Mon Sep 17 00:00:00 2001 From: Tom French Date: Fri, 28 Apr 2023 16:05:17 +0100 Subject: [PATCH 8/9] chore: update to use ACVM 0.10.3 --- Cargo.lock | 22 +++++++++++++--------- Cargo.toml | 3 +-- crates/nargo_cli/Cargo.toml | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 514ee4ab2bd..f4f7554ba22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,8 +4,9 @@ version = 3 [[package]] name = "acir" -version = "0.9.0" -source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510b65efd4d20bf266185ce0a5dc7d29bcdd196a6a1835c20908fd88040de76c" dependencies = [ "acir_field", "flate2", @@ -15,8 +16,9 @@ dependencies = [ [[package]] name = "acir_field" -version = "0.9.0" -source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f032e710c67fd146caedc8fe1dea6e95f01ab59453e42d59b604a51fef3dfe" dependencies = [ "ark-bn254", "ark-ff", @@ -28,8 +30,9 @@ dependencies = [ [[package]] name = "acvm" -version = "0.9.0" -source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2611266039740ffd1978f23258bd6ce3166c22cf15b8227685c2f3bb20ae2ee0" dependencies = [ "acir", "acvm_stdlib", @@ -46,7 +49,7 @@ dependencies = [ [[package]] name = "acvm-backend-barretenberg" version = "0.0.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=e7c4a2cc68c9d14b083290a3715e97ab05d163e7#e7c4a2cc68c9d14b083290a3715e97ab05d163e7" +source = "git+https://github.com/noir-lang/aztec_backend?rev=b8eab9b8348e3a761d434aab7724616ddc3c3b45#b8eab9b8348e3a761d434aab7724616ddc3c3b45" dependencies = [ "acvm", "barretenberg-sys", @@ -64,8 +67,9 @@ dependencies = [ [[package]] name = "acvm_stdlib" -version = "0.9.0" -source = "git+https://github.com/noir-lang/acvm?rev=15d3c5a9be2dd92f266fcb7e672da17cada9fec5#15d3c5a9be2dd92f266fcb7e672da17cada9fec5" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ec51160c66eba75dc15a028a2391675386fd395b3897478d89a386c64a48dd" dependencies = [ "acir", ] diff --git a/Cargo.toml b/Cargo.toml index d74e2b2475c..38e08080a6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,8 +24,7 @@ edition = "2021" rust-version = "1.66" [workspace.dependencies] -#acvm = "0.9.0" -acvm = { git = "https://github.com/noir-lang/acvm", rev = "15d3c5a9be2dd92f266fcb7e672da17cada9fec5", features = ["bn254"] } +acvm = "0.10.3" arena = { path = "crates/arena" } fm = { path = "crates/fm" } iter-extended = { path = "crates/iter-extended" } diff --git a/crates/nargo_cli/Cargo.toml b/crates/nargo_cli/Cargo.toml index 994bf7fb297..3c6ff11702f 100644 --- a/crates/nargo_cli/Cargo.toml +++ b/crates/nargo_cli/Cargo.toml @@ -37,7 +37,7 @@ termcolor = "1.1.2" color-eyre = "0.6.2" # Backends -acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "e7c4a2cc68c9d14b083290a3715e97ab05d163e7", default-features=false } +acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "b8eab9b8348e3a761d434aab7724616ddc3c3b45", default-features=false } [dev-dependencies] tempdir = "0.3.7" From 56f3ca4024ef9ea31327f0854db5950355c6b418 Mon Sep 17 00:00:00 2001 From: Tom French Date: Fri, 28 Apr 2023 18:13:06 +0100 Subject: [PATCH 9/9] chore: bump backend commit --- Cargo.lock | 2 +- crates/nargo_cli/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4f7554ba22..bc49880ad73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,7 +49,7 @@ dependencies = [ [[package]] name = "acvm-backend-barretenberg" version = "0.0.0" -source = "git+https://github.com/noir-lang/aztec_backend?rev=b8eab9b8348e3a761d434aab7724616ddc3c3b45#b8eab9b8348e3a761d434aab7724616ddc3c3b45" +source = "git+https://github.com/noir-lang/aztec_backend?rev=c9fb9e806f1400a2ff7594a0669bec56025220bb#c9fb9e806f1400a2ff7594a0669bec56025220bb" dependencies = [ "acvm", "barretenberg-sys", diff --git a/crates/nargo_cli/Cargo.toml b/crates/nargo_cli/Cargo.toml index 3c6ff11702f..2568f2a86f5 100644 --- a/crates/nargo_cli/Cargo.toml +++ b/crates/nargo_cli/Cargo.toml @@ -37,7 +37,7 @@ termcolor = "1.1.2" color-eyre = "0.6.2" # Backends -acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "b8eab9b8348e3a761d434aab7724616ddc3c3b45", default-features=false } +acvm-backend-barretenberg = { git = "https://github.com/noir-lang/aztec_backend", rev = "c9fb9e806f1400a2ff7594a0669bec56025220bb", default-features=false } [dev-dependencies] tempdir = "0.3.7"