diff --git a/Cargo.lock b/Cargo.lock index 2fa663338..e09110f36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -976,14 +976,13 @@ dependencies = [ [[package]] name = "halo2_gadgets" version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73a5e510d58a07d8ed238a5a8a436fe6c2c79e1bb2611f62688bc65007b4e6e7" +source = "git+https://github.com/zcash/halo2?rev=2308caf68c48c02468b66cfc452dad54e355e32f#2308caf68c48c02468b66cfc452dad54e355e32f" dependencies = [ "arrayvec", "bitvec", "ff", "group", - "halo2_poseidon", + "halo2_poseidon 0.1.0 (git+https://github.com/zcash/halo2?rev=2308caf68c48c02468b66cfc452dad54e355e32f)", "halo2_proofs", "lazy_static", "pasta_curves", @@ -1012,16 +1011,27 @@ dependencies = [ "pasta_curves", ] +[[package]] +name = "halo2_poseidon" +version = "0.1.0" +source = "git+https://github.com/zcash/halo2?rev=2308caf68c48c02468b66cfc452dad54e355e32f#2308caf68c48c02468b66cfc452dad54e355e32f" +dependencies = [ + "bitvec", + "ff", + "group", + "pasta_curves", +] + [[package]] name = "halo2_proofs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b867a8d9bbb85fca76fff60652b5cd19b853a1c4d0665cb89bee68b18d2caf0" +version = "0.3.1" +source = "git+https://github.com/zcash/halo2?rev=2308caf68c48c02468b66cfc452dad54e355e32f#2308caf68c48c02468b66cfc452dad54e355e32f" dependencies = [ "blake2b_simd", "ff", "group", "halo2_legacy_pdqsort", + "indexmap", "maybe-rayon", "pasta_curves", "plotters", @@ -1449,7 +1459,7 @@ dependencies = [ "getset", "group", "halo2_gadgets", - "halo2_poseidon", + "halo2_poseidon 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "halo2_proofs", "hex", "image", @@ -1463,6 +1473,7 @@ dependencies = [ "pprof", "proptest", "rand", + "rand_core", "reddsa", "serde", "shardtree", @@ -2570,9 +2581,9 @@ dependencies = [ [[package]] name = "zcash_note_encryption" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b4580cd6cee12e44421dac43169be8d23791650816bdb34e6ddfa70ac89c1c5" +checksum = "77efec759c3798b6e4d829fcc762070d9b229b0f13338c40bf993b7b609c2272" dependencies = [ "chacha20", "chacha20poly1305", @@ -2592,9 +2603,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] diff --git a/Cargo.toml b/Cargo.toml index 2076de42e..07b1a66e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,9 @@ hex = { version = "0.4", default-features = false, features = ["alloc"] } lazy_static = "1" memuse = { version = "0.2.2", default-features = false } pasta_curves = "0.5" -proptest = { version = "1.0.0", optional = true } +proptest = { version = ">=1.0.0, <1.7.0", optional = true } rand = { version = "0.8", default-features = false } +rand_core = { version = "0.6", default-features = false } reddsa = { version = "0.5", default-features = false } nonempty = { version = "0.11", default-features = false } poseidon = { package = "halo2_poseidon", version = "0.1" } @@ -68,7 +69,7 @@ plotters = { version = "0.3.0", optional = true } criterion = "0.4" # 0.5 depends on clap 4 which has MSRV 1.70 halo2_gadgets = { version = "0.3", features = ["test-dependencies"] } hex = "0.4" -proptest = "1.0.0" +proptest = ">=1.0.0, <1.7.0" zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] } incrementalmerkletree = { version = "0.8.1", features = ["test-dependencies"] } shardtree = "0.6" @@ -106,3 +107,7 @@ debug = true [profile.bench] debug = true + +[patch.crates-io] +halo2_gadgets = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" } +halo2_proofs = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" } diff --git a/src/circuit.rs b/src/circuit.rs index bdfead6f6..2003a84d5 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -55,7 +55,7 @@ use halo2_gadgets::{ MerklePath, }, }, - utilities::lookup_range_check::LookupRangeCheckConfig, + utilities::lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig}, }; mod commit_ivk; @@ -327,6 +327,7 @@ impl plonk::Circuit for Circuit { lagrange_coeffs[0], lookup, range_check, + false, ); let merkle_config_1 = MerkleChip::configure(meta, sinsemilla_config_1.clone()); @@ -345,6 +346,7 @@ impl plonk::Circuit for Circuit { lagrange_coeffs[1], lookup, range_check, + false, ); let merkle_config_2 = MerkleChip::configure(meta, sinsemilla_config_2.clone()); diff --git a/src/circuit/commit_ivk.rs b/src/circuit/commit_ivk.rs index 33692a4a8..351cb4681 100644 --- a/src/circuit/commit_ivk.rs +++ b/src/circuit/commit_ivk.rs @@ -228,7 +228,10 @@ impl CommitIvkChip { } pub(in crate::circuit) mod gadgets { - use halo2_gadgets::utilities::{lookup_range_check::LookupRangeCheckConfig, RangeConstrained}; + use halo2_gadgets::utilities::{ + lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig}, + RangeConstrained, + }; use halo2_proofs::circuit::Chip; use super::*; @@ -678,7 +681,10 @@ mod tests { chip::{SinsemillaChip, SinsemillaConfig}, primitives::CommitDomain, }, - utilities::{lookup_range_check::LookupRangeCheckConfig, UtilitiesInstructions}, + utilities::{ + lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig}, + UtilitiesInstructions, + }, }; use halo2_proofs::{ circuit::{AssignedCell, Layouter, SimpleFloorPlanner, Value}, @@ -762,6 +768,7 @@ mod tests { lagrange_coeffs[0], lookup, range_check, + false, ); let commit_ivk_config = CommitIvkChip::configure(meta, advices); diff --git a/src/circuit/note_commit.rs b/src/circuit/note_commit.rs index 9daa685f2..bba540f5e 100644 --- a/src/circuit/note_commit.rs +++ b/src/circuit/note_commit.rs @@ -22,7 +22,9 @@ use halo2_gadgets::{ CommitDomain, Message, MessagePiece, }, utilities::{ - bool_check, lookup_range_check::LookupRangeCheckConfig, FieldValue, RangeConstrained, + bool_check, + lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig}, + FieldValue, RangeConstrained, }, }; @@ -2034,7 +2036,7 @@ mod tests { }, sinsemilla::chip::SinsemillaChip, sinsemilla::primitives::CommitDomain, - utilities::lookup_range_check::LookupRangeCheckConfig, + utilities::lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig}, }; use ff::{Field, PrimeField, PrimeFieldBits}; @@ -2119,6 +2121,7 @@ mod tests { lagrange_coeffs[0], lookup, range_check, + false, ); let note_commit_config = NoteCommitChip::configure(meta, advices, sinsemilla_config);