diff --git a/Cargo.lock b/Cargo.lock index 53db4497..3f39cafa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ version = 3 [[package]] name = "acir" version = "0.11.0" -source = "git+https://github.com/noir-lang/acvm?rev=84b5d18d29a111a42bfc1c3d122129c8f062c3db#84b5d18d29a111a42bfc1c3d122129c8f062c3db" +source = "git+https://github.com/noir-lang/acvm?rev=d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e#d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e" dependencies = [ "acir_field", "flate2", @@ -16,7 +16,7 @@ dependencies = [ [[package]] name = "acir_field" version = "0.11.0" -source = "git+https://github.com/noir-lang/acvm?rev=84b5d18d29a111a42bfc1c3d122129c8f062c3db#84b5d18d29a111a42bfc1c3d122129c8f062c3db" +source = "git+https://github.com/noir-lang/acvm?rev=d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e#d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e" dependencies = [ "ark-bn254", "ark-ff", @@ -29,7 +29,7 @@ dependencies = [ [[package]] name = "acvm" version = "0.11.0" -source = "git+https://github.com/noir-lang/acvm?rev=84b5d18d29a111a42bfc1c3d122129c8f062c3db#84b5d18d29a111a42bfc1c3d122129c8f062c3db" +source = "git+https://github.com/noir-lang/acvm?rev=d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e#d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e" dependencies = [ "acir", "acvm_stdlib", @@ -68,7 +68,7 @@ dependencies = [ [[package]] name = "acvm_stdlib" version = "0.11.0" -source = "git+https://github.com/noir-lang/acvm?rev=84b5d18d29a111a42bfc1c3d122129c8f062c3db#84b5d18d29a111a42bfc1c3d122129c8f062c3db" +source = "git+https://github.com/noir-lang/acvm?rev=d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e#d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e" dependencies = [ "acir", ] diff --git a/Cargo.toml b/Cargo.toml index ae069106..bef5fd3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" [dependencies] #acvm = { version = "0.11.0", features = ["bn254"] } -acvm = { git = "https://github.com/noir-lang/acvm", rev = "84b5d18d29a111a42bfc1c3d122129c8f062c3db", features=["bn254"] } +acvm = { git = "https://github.com/noir-lang/acvm", rev = "d0bb049f2f120d632ea0e55d0d53a2dc8f5cf27e", features=["bn254"] } thiserror = "1.0.21" diff --git a/src/acvm_interop/pwg.rs b/src/acvm_interop/pwg.rs index aad4867c..5906022c 100644 --- a/src/acvm_interop/pwg.rs +++ b/src/acvm_interop/pwg.rs @@ -1,6 +1,6 @@ use acvm::acir::circuit::opcodes::FunctionInput; +use acvm::acir::native_types::Witness; use acvm::acir::BlackBoxFunc; -use acvm::acir::{circuit::opcodes::BlackBoxFuncCall, native_types::Witness}; use acvm::pwg::{hash, logic, range, signature, witness_to_value, OpcodeResolution}; use acvm::FieldElement; use acvm::{OpcodeResolutionError, PartialWitnessGenerator}; @@ -32,14 +32,7 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - logic::and( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::AND, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + logic::and(initial_witness, inputs, outputs) } fn xor( @@ -48,30 +41,15 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - logic::xor( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::XOR, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + logic::xor(initial_witness, inputs, outputs) } fn range( &self, initial_witness: &mut BTreeMap, inputs: &[FunctionInput], - outputs: &[Witness], ) -> Result { - range::solve_range_opcode( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::RANGE, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + range::solve_range_opcode(initial_witness, inputs) } fn sha256( @@ -80,14 +58,7 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - hash::sha256( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::SHA256, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + hash::sha256(initial_witness, inputs, outputs) } fn blake2s( @@ -96,14 +67,7 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - hash::blake2s256( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::Blake2s, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + hash::blake2s256(initial_witness, inputs, outputs) } fn compute_merkle_root( @@ -244,14 +208,7 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - hash::hash_to_field_128_security( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::HashToField128Security, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + hash::hash_to_field_128_security(initial_witness, inputs, outputs) } fn ecdsa_secp256k1( @@ -260,14 +217,7 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - signature::ecdsa::secp256k1_prehashed( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::EcdsaSecp256k1, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + signature::ecdsa::secp256k1_prehashed(initial_witness, inputs, outputs) } fn fixed_base_scalar_mul( @@ -296,13 +246,6 @@ impl PartialWitnessGenerator for Barretenberg { inputs: &[FunctionInput], outputs: &[Witness], ) -> Result { - hash::keccak256( - initial_witness, - &BlackBoxFuncCall { - name: BlackBoxFunc::Keccak256, - inputs: inputs.to_vec(), - outputs: outputs.to_vec(), - }, - ) + hash::keccak256(initial_witness, inputs, outputs) } }