Skip to content

Commit

Permalink
Bring PallasLookup trait into scope to support updated halo2 crate
Browse files Browse the repository at this point in the history
This change updates the orchard crate to bring the PallasLookup trait
into scope, ensuring compatibility with the recent changes in the halo2
crate. By importing the PallasLookup trait, we maintain backward
compatibility and allow existing code to function without modification.
  • Loading branch information
dmidem committed May 17, 2024
1 parent d8e2bc6 commit 4c6198c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ blake2b_simd = "1"
ff = "0.13"
fpe = "0.6"
group = { version = "0.13", features = ["wnaf-memuse"] }
halo2_gadgets = "0.3"
halo2_proofs = { version = "0.3", default-features = false, features = ["batch", "floor-planner-v1-legacy-pdqsort"] }
halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "improve-backward-compatability-without-zsa-default-generic-arg" }
halo2_proofs = { git = "https://github.com/QED-it/halo2", branch = "improve-backward-compatability-without-zsa-default-generic-arg", default-features = false, features = ["batch", "floor-planner-v1-legacy-pdqsort"] }
hex = "0.4"
lazy_static = "1"
memuse = { version = "0.2.1", features = ["nonempty"] }
Expand All @@ -56,7 +56,7 @@ plotters = { version = "0.3.0", optional = true }
[dev-dependencies]
bridgetree = "0.4"
criterion = "0.4" # 0.5 depends on clap 4 which has MSRV 1.70
halo2_gadgets = { version = "0.3", features = ["test-dependencies"] }
halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "improve-backward-compatability-without-zsa-default-generic-arg", features = ["test-dependencies"] }
hex = "0.4"
proptest = "1.0.0"
zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] }
Expand Down
2 changes: 1 addition & 1 deletion src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use halo2_gadgets::{
MerklePath,
},
},
utilities::lookup_range_check::LookupRangeCheckConfig,
utilities::lookup_range_check::{LookupRangeCheck, LookupRangeCheckConfig},
};

mod commit_ivk;
Expand Down
10 changes: 8 additions & 2 deletions src/circuit/commit_ivk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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},
Expand Down
6 changes: 4 additions & 2 deletions src/circuit/note_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};

Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 4c6198c

Please sign in to comment.