diff --git a/Cargo.lock b/Cargo.lock index 015e3fcef..dfd4eea1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2363,8 +2363,7 @@ dependencies = [ [[package]] name = "halo2_gadgets" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126a150072b0c38c7b573fe3eaf0af944a7fed09e154071bf2436d3f016f7230" +source = "git+https://github.com/parazyd/halo2?branch=v3#481f00066dbfa5199195062b7d1f497db0281c16" dependencies = [ "arrayvec", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index e9bcedaf7..5a30ce237 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -327,3 +327,4 @@ required-features = ["zk"] [patch.crates-io] halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"} +halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"} diff --git a/proof/opcodes.zk b/proof/opcodes.zk index 49e576450..40ff1bfba 100644 --- a/proof/opcodes.zk +++ b/proof/opcodes.zk @@ -37,7 +37,8 @@ circuit "Opcodes" { constrain_equal_point(value_commit, value_commit2); one = witness_base(1); - c = poseidon_hash(one, blind); + two = witness_base(2); + c = poseidon_hash(one, two, blind); constrain_instance(c); d = poseidon_hash(one, blind, ec_get_x(value_commit), ec_get_y(value_commit)); diff --git a/src/sdk/Cargo.toml b/src/sdk/Cargo.toml index 4d51a1a24..f03a55aab 100644 --- a/src/sdk/Cargo.toml +++ b/src/sdk/Cargo.toml @@ -44,3 +44,4 @@ rand = "0.8.5" [patch.crates-io] halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"} +halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"} diff --git a/tests/zkvm_opcodes.rs b/tests/zkvm_opcodes.rs index a402f4d92..ada46f0c7 100644 --- a/tests/zkvm_opcodes.rs +++ b/tests/zkvm_opcodes.rs @@ -61,8 +61,8 @@ fn zkvm_opcodes() -> Result<()> { let c1 = pallas::Base::random(&mut OsRng); let c3 = pallas::Base::random(&mut OsRng); let c2 = { - let messages = [pallas::Base::one(), blind]; - poseidon::Hash::<_, P128Pow5T3, ConstantLength<2>, 3, 2>::init().hash(messages) + let messages = [pallas::Base::one(), pallas::Base::from(2), blind]; + poseidon::Hash::<_, P128Pow5T3, ConstantLength<3>, 3, 2>::init().hash(messages) }; tree.append(&MerkleNode::from(c0));