Use patched halo2_gadgets project-wide.

This commit is contained in:
parazyd
2023-05-10 16:17:29 +02:00
parent b7b13a33e0
commit 411d25aa85
5 changed files with 7 additions and 5 deletions

3
Cargo.lock generated
View File

@@ -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",

View File

@@ -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"}

View File

@@ -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));

View File

@@ -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"}

View File

@@ -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));