Skip to content

Commit

Permalink
Merge pull request #24 from dusk-network/update_poseidon
Browse files Browse the repository at this point in the history
Update poseidon dep & bump crate
  • Loading branch information
jules authored Oct 5, 2020
2 parents d5895a9 + 8d7b134 commit c6ec9e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "phoenix-core"
version = "0.2.0"
version = "0.3.0"
authors = ["zer0 <[email protected]>", "Victor Lopez <[email protected]"]
edition = "2018"

[dependencies]
rand = "^0.7"
kelvin = "0.19"
poseidon252 = { git = "https://github.com/dusk-network/Poseidon252", tag = "v0.8.1" }
poseidon252 = { git = "https://github.com/dusk-network/Poseidon252", tag = "v0.10.0" }
dusk-pki = { git = "https://github.com/dusk-network/dusk-pki", tag = "v0.2.0" }
thiserror = "1.0"
dusk-plonk = { version = "0.2.11", features = ["trace-print"] }
dusk-plonk = { version = "0.3.1", features = ["trace-print"] }

[dev-dependencies]
assert_matches = "1.3"
Expand Down
18 changes: 4 additions & 14 deletions tests/note_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,33 +243,23 @@ fn note_tree_storage() -> Result<()> {

let mut prover = Prover::new(b"NoteTest");
let hash = prover.mut_cs().add_input(note.hash());
let root = merkle_opening_gadget(
prover.mut_cs(),
branch.clone(),
hash,
branch.root,
);
let root = merkle_opening_gadget(prover.mut_cs(), branch.clone(), hash);
prover.mut_cs().constrain_to_constant(
root,
BlsScalar::zero(),
-branch.root,
-branch.root(),
);

prover.preprocess(&ck)?;
let proof = prover.prove(&ck)?;

let mut verifier = Verifier::new(b"NoteTest");
let hash = verifier.mut_cs().add_input(note.hash());
let root = merkle_opening_gadget(
verifier.mut_cs(),
branch.clone(),
hash,
branch.root,
);
let root = merkle_opening_gadget(verifier.mut_cs(), branch.clone(), hash);
verifier.mut_cs().constrain_to_constant(
root,
BlsScalar::zero(),
-branch.root,
-branch.root(),
);

verifier.preprocess(&ck)?;
Expand Down

0 comments on commit c6ec9e4

Please sign in to comment.