Skip to content

Commit

Permalink
can now deserialize barretenberg
Browse files Browse the repository at this point in the history
  • Loading branch information
rw0x0 committed Sep 18, 2024
1 parent 7adb16a commit 2bd2e27
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions co-noir/ultrahonk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ license.workspace = true
rust-version.workspace = true

[dependencies]
acir.workspace = true
ark-ec.workspace = true
ark-ff.workspace = true
ark-serialize.workspace = true
Expand All @@ -18,8 +19,10 @@ byteorder.workspace = true
eyre.workspace = true
itertools.workspace = true
lazy_static = "1.5"
noirc-artifacts.workspace = true
num-bigint.workspace = true
num-traits.workspace = true
serde_json.workspace = true
tracing.workspace = true
thiserror.workspace = true
rand.workspace = true
Binary file removed co-noir/ultrahonk/example/poseidon/poseidon.gz
Binary file not shown.
1 change: 0 additions & 1 deletion co-noir/ultrahonk/example/poseidon/poseidon.json

This file was deleted.

13 changes: 11 additions & 2 deletions co-noir/ultrahonk/tests/poseidon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
use acir::{native_types::WitnessStack, FieldElement};
use noirc_artifacts::program::ProgramArtifact;

#[test]
fn poseidon_test() {
const BYTECODE_PATH: &str = "example/poseidon/poseidon.rs";
const WITNESS_PATH: &str = "example/poseidon/poseidon.json";
let program =
std::fs::read_to_string("../../test_vectors/noir/poseidon/kat/poseidon.json").unwrap();
let program_artifact = serde_json::from_str::<ProgramArtifact>(&program)
.expect("failed to parse program artifact");

let should_witness = std::fs::read("../../test_vectors/noir/poseidon/kat/poseidon.gz").unwrap();

let should_witness = WitnessStack::<FieldElement>::try_from(should_witness.as_slice()).unwrap();
}

0 comments on commit 2bd2e27

Please sign in to comment.