Skip to content

Commit

Permalink
chore: revert change to circuit serialization format (#962)
Browse files Browse the repository at this point in the history
revert: revert change to circuit serialization format

This reverts commit 03a2088.
  • Loading branch information
TomAFrench authored Mar 8, 2023
1 parent 356858b commit f750bc0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/nargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion crates/noirc_driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ noirc_abi.workspace = true
acvm.workspace = true
fm.workspace = true
serde.workspace = true
hex.workspace = true
4 changes: 2 additions & 2 deletions crates/noirc_driver/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ where
let mut circuit_bytes: Vec<u8> = 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<Circuit, D::Error>
where
D: Deserializer<'de>,
{
let circuit_bytes: Vec<u8> = hex::deserialize(deserializer)?;
let circuit_bytes = Vec::<u8>::deserialize(deserializer)?;
let circuit = Circuit::read(&*circuit_bytes).unwrap();
Ok(circuit)
}

0 comments on commit f750bc0

Please sign in to comment.