diff --git a/Cargo.lock b/Cargo.lock index f4296e1d..03838edc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "acir" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6315da836487843323dc07343365167ca1c5d9005affa1e412a87b74a98ed6" +checksum = "9915f2895792d8d9e4f25d9e026bac35774513a97c564fa7604e80462ac19e04" dependencies = [ "acir_field", "bincode", @@ -18,9 +18,9 @@ dependencies = [ [[package]] name = "acir_field" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa14cddc3b16bf9e661d830f7209193b27c1b540f2d2d0249182b6436a963c6" +checksum = "3a43a2e9419db7a1b046e763154fa67e66039e8fe08b88c13f18f81f9220ebdf" dependencies = [ "ark-bn254", "ark-ff", @@ -32,9 +32,9 @@ dependencies = [ [[package]] name = "acvm" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48bed7a285c69be779c8e07e72e0b146326c4a23a0eaf03725fd089f1337d07c" +checksum = "38362933e2f7fcf6faf6c7c969f4c1ad2370953c35613801686259cdb8b5d194" dependencies = [ "acir", "acvm_blackbox_solver", @@ -44,7 +44,6 @@ dependencies = [ "indexmap", "num-bigint", "num-traits", - "rmp-serde", "thiserror", ] @@ -69,9 +68,9 @@ dependencies = [ [[package]] name = "acvm_blackbox_solver" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76b6a5c28ccefa5b6e4162995c7b6e250c5e3ae5109b7e19738ae17a35cb545c" +checksum = "aa2d887ed2c7203f08efb6661d8f30ecfd69b453fe2965393d7e99664afc7558" dependencies = [ "acir", "blake2", @@ -84,9 +83,9 @@ dependencies = [ [[package]] name = "acvm_stdlib" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b5871d78fbaab07689caeb46f7128da17267d6b1775a831339bca86ca22ff0" +checksum = "e7958693ac099e257b1791dc71f0296b0cc5e97764e55d67efc06f25191ecbaf" dependencies = [ "acir", ] @@ -396,9 +395,9 @@ dependencies = [ [[package]] name = "brillig" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36139e8a7c0bcc1a5d7638a2851d1315d3256777f3c4f713b4ffd0ccd2770e60" +checksum = "9d24f35009f581a810c74628ab6bf03eb717b0e55d2c27994694b11ae98ff950" dependencies = [ "acir_field", "serde", @@ -406,9 +405,9 @@ dependencies = [ [[package]] name = "brillig_vm" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8b61359c74d9c1fd5dbb847a0e4950aa7cb8c2de284ab820f9dcffb6db9fd7" +checksum = "1534e2b03604d08a586ef735fa704f692c468c7e0e6663210fd414bac5382040" dependencies = [ "acir", "acvm_blackbox_solver", @@ -454,12 +453,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - [[package]] name = "bytes" version = "1.4.0" @@ -1920,28 +1913,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rmp" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - [[package]] name = "rust-embed" version = "6.8.1" diff --git a/Cargo.toml b/Cargo.toml index 654e1b2b..833db950 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" crate-type = ["cdylib", "lib"] [dependencies] -acvm = { version = "0.20.0", features = ["bn254"] } +acvm = { version = "0.21.0", features = ["bn254"] } bincode = "1.3.3" bytesize = "1.2" reqwest = { version = "0.11.16", default-features = false, features = [ @@ -50,4 +50,4 @@ tokio = { version = "1.0", features = ["macros"] } [features] default = ["native"] native = ["dep:barretenberg-sys"] -wasm = ["dep:wasmer", "dep:rust-embed", "dep:getrandom"] +wasm = ["dep:wasmer", "dep:rust-embed", "dep:getrandom"] \ No newline at end of file diff --git a/src/acvm_interop/proof_system.rs b/src/acvm_interop/proof_system.rs index 56fbe48b..18d89df4 100644 --- a/src/acvm_interop/proof_system.rs +++ b/src/acvm_interop/proof_system.rs @@ -23,9 +23,6 @@ impl ProofSystemCompiler for Barretenberg { match opcode { Opcode::Arithmetic(_) => true, Opcode::Directive(_) => true, - Opcode::Block(_) => false, - Opcode::ROM(_) => true, - Opcode::RAM(_) => true, Opcode::Brillig(_) => true, Opcode::MemoryInit { .. } => true, Opcode::MemoryOp { .. } => true, diff --git a/src/barretenberg_structures.rs b/src/barretenberg_structures.rs index 5760b2b0..8fdadc8b 100644 --- a/src/barretenberg_structures.rs +++ b/src/barretenberg_structures.rs @@ -1,6 +1,6 @@ use std::collections::BTreeMap; -use acvm::acir::circuit::opcodes::{BlackBoxFuncCall, FunctionInput, MemoryBlock}; +use acvm::acir::circuit::opcodes::{BlackBoxFuncCall, FunctionInput}; use acvm::acir::circuit::{Circuit, Opcode}; use acvm::acir::native_types::Expression; use acvm::acir::BlackBoxFunc; @@ -741,32 +741,6 @@ impl BlockConstraint { buffer } - - fn from_memory_block(b: &MemoryBlock, is_ram_block: bool) -> BlockConstraint { - let mut init = Vec::new(); - let mut trace = Vec::new(); - let len = b.len as usize; - for op in b.trace.iter().take(len) { - assert_eq!(op.operation, Expression::one()); - init.push(serialize_arithmetic_gates(&op.value)); - } - for op in b.trace.iter().skip(len) { - let index = serialize_arithmetic_gates(&op.index); - let value = serialize_arithmetic_gates(&op.value); - let bb_op = MemOpBarretenberg { - is_store: op.operation.to_const().unwrap().to_u128() as i8, - index, - value, - }; - trace.push(bb_op); - } - let is_ram = i8::from(is_ram_block); - BlockConstraint { - init, - trace, - is_ram, - } - } } #[derive(Clone, Hash, Debug, Serialize, Deserialize)] @@ -832,7 +806,7 @@ impl TryFrom<&Circuit> for ConstraintSystem { let mut logic_constraints: Vec = Vec::new(); let mut sha256_constraints: Vec = Vec::new(); let mut blake2s_constraints: Vec = Vec::new(); - let mut block_constraints: Vec = Vec::new(); + let block_constraints: Vec = Vec::new(); let mut keccak_constraints: Vec = Vec::new(); let mut keccak_var_constraints: Vec = Vec::new(); let mut pedersen_constraints: Vec = Vec::new(); @@ -1339,15 +1313,6 @@ impl TryFrom<&Circuit> for ConstraintSystem { Opcode::Directive(_) | Opcode::Brillig(_) => { // Directives, Oracles and Brillig are only needed by the pwg } - Opcode::Block(_) => { - // Block is managed by ACVM - } - Opcode::RAM(block) => { - block_constraints.push(BlockConstraint::from_memory_block(block, true)) - } - Opcode::ROM(block) => { - block_constraints.push(BlockConstraint::from_memory_block(block, false)) - } Opcode::MemoryOp { block_id, op } => { let block = blocks .get_mut(&block_id.0)