From 05321a2817b0b42b917bd2c6e1f99d9e76e52039 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 8 Mar 2023 11:11:51 +0000 Subject: [PATCH] revert: revert change to circuit serialization format This reverts commit 03a2088769e6a74b39fbed6734e9d3d76a0552c0. --- Cargo.lock | 4 ---- Cargo.toml | 1 - crates/nargo/Cargo.toml | 2 +- crates/noirc_driver/Cargo.toml | 1 - crates/noirc_driver/src/program.rs | 4 ++-- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 631ba7540b9..3bebcb08c8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1722,9 +1722,6 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] [[package]] name = "hmac" @@ -2201,7 +2198,6 @@ dependencies = [ "acvm 0.5.0", "clap 4.1.4", "fm", - "hex", "noirc_abi", "noirc_errors", "noirc_evaluator", diff --git a/Cargo.toml b/Cargo.toml index 8f3d7e85493..35a3ccc6fe0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,6 @@ codespan = "0.9.5" codespan-reporting = "0.9.5" chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312" } dirs = "4" -hex = { version = "0.4.2", features = ["serde"] } serde = { version = "1.0.136", features = ["derive"] } smol_str = "0.1.17" thiserror = "1.0.21" diff --git a/crates/nargo/Cargo.toml b/crates/nargo/Cargo.toml index 6b69bffc628..cbfe3b67a5a 100644 --- a/crates/nargo/Cargo.toml +++ b/crates/nargo/Cargo.toml @@ -23,11 +23,11 @@ noirc_abi.workspace = true fm.workspace = true acvm.workspace = true cfg-if.workspace = true -hex.workspace = true toml.workspace = true serde.workspace = true thiserror.workspace = true const_format = "0.2.30" +hex = "0.4.2" serde_json = "1.0" termcolor = "1.1.2" tempdir = "0.3.7" diff --git a/crates/noirc_driver/Cargo.toml b/crates/noirc_driver/Cargo.toml index 91e391697bb..3f75dc7da8e 100644 --- a/crates/noirc_driver/Cargo.toml +++ b/crates/noirc_driver/Cargo.toml @@ -15,4 +15,3 @@ noirc_abi.workspace = true acvm.workspace = true fm.workspace = true serde.workspace = true -hex.workspace = true diff --git a/crates/noirc_driver/src/program.rs b/crates/noirc_driver/src/program.rs index 72ccb393766..06b11d860dc 100644 --- a/crates/noirc_driver/src/program.rs +++ b/crates/noirc_driver/src/program.rs @@ -16,14 +16,14 @@ where let mut circuit_bytes: Vec = Vec::new(); circuit.write(&mut circuit_bytes).unwrap(); - hex::serialize(circuit_bytes, s) + circuit_bytes.serialize(s) } fn deserialize_circuit<'de, D>(deserializer: D) -> Result where D: Deserializer<'de>, { - let circuit_bytes: Vec = hex::deserialize(deserializer)?; + let circuit_bytes = Vec::::deserialize(deserializer)?; let circuit = Circuit::read(&*circuit_bytes).unwrap(); Ok(circuit) }