Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert change to circuit serialization format #962

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}