Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.0.1" # Last version required rust 1.66
ff = "0.13"
fpe = "0.6"
group = { version = "0.13", features = ["wnaf-memuse"] }
halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "zsa1" }
halo2_proofs = { git = "https://github.com/QED-it/halo2", branch = "zsa1", default-features = false, features = ["batch", "floor-planner-v1-legacy-pdqsort"] }
halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "multiplexer" }
halo2_proofs = { git = "https://github.com/QED-it/halo2", branch = "multiplexer", 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 @@ -54,7 +54,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 = { git = "https://github.com/QED-it/halo2", branch = "zsa1", features = ["test-dependencies"] }
halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "multiplexer", features = ["test-dependencies"] }
hex = "0.4"
proptest = "1.0.0"
zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] }
Expand Down
7 changes: 5 additions & 2 deletions src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use self::{
use crate::{
builder::SpendInfo,
bundle::Flags,
circuit::gadget::mux_chip::{MuxChip, MuxConfig},
constants::{
OrchardCommitDomains, OrchardFixedBases, OrchardFixedBasesFull, OrchardHashDomains,
MERKLE_DEPTH_ORCHARD,
Expand Down Expand Up @@ -59,7 +58,11 @@ use halo2_gadgets::{
MerklePath,
},
},
utilities::{bool_check, lookup_range_check::LookupRangeCheckConfig},
utilities::{
bool_check,
lookup_range_check::LookupRangeCheckConfig,
mux::{MuxChip, MuxConfig},
},
};

mod commit_ivk;
Expand Down
9 changes: 4 additions & 5 deletions src/circuit/gadget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use pasta_curves::arithmetic::CurveExt;
use pasta_curves::pallas;

use super::{commit_ivk::CommitIvkChip, note_commit::NoteCommitChip};
use crate::circuit::gadget::mux_chip::{MuxChip, MuxInstructions};
use crate::constants::{NullifierK, OrchardCommitDomains, OrchardFixedBases, OrchardHashDomains};
use crate::note::AssetBase;
use halo2_gadgets::{
Expand All @@ -16,14 +15,14 @@ use halo2_gadgets::{
Hash as PoseidonHash, PoseidonSpongeInstructions, Pow5Chip as PoseidonChip,
},
sinsemilla::{chip::SinsemillaChip, merkle::chip::MerkleChip},
utilities::mux::{MuxChip, MuxInstructions},
};
use halo2_proofs::{
circuit::{AssignedCell, Chip, Layouter, Value},
plonk::{self, Advice, Assigned, Column},
};

pub(in crate::circuit) mod add_chip;
pub(in crate::circuit) mod mux_chip;

impl super::Config {
pub(super) fn add_chip(&self) -> add_chip::AddChip {
Expand Down Expand Up @@ -74,8 +73,8 @@ impl super::Config {
NoteCommitChip::construct(self.old_note_commit_config.clone())
}

pub(super) fn mux_chip(&self) -> mux_chip::MuxChip {
mux_chip::MuxChip::construct(self.mux_config.clone())
pub(super) fn mux_chip(&self) -> MuxChip {
MuxChip::construct(self.mux_config.clone())
}
}

Expand Down Expand Up @@ -224,7 +223,7 @@ pub(in crate::circuit) fn derive_nullifier<
// Select the desired nullifier according to split_flag
Ok(Point::from_inner(
ecc_chip,
mux_chip.mux(
mux_chip.mux_on_points(
layouter.namespace(|| "mux on nf"),
&split_flag,
nf.inner(),
Expand Down
Loading