diff --git a/Cargo.toml b/Cargo.toml index 00e47725..5690a069 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ plotters = { version = "0.3.0", optional = true } [dependencies.halo2] git = "https://github.com/zcash/halo2.git" -rev = "32cdcfa66fbc4ca3103115518d374f4cfe6c3b7a" +rev = "d8e4f24df44da94ab5cacbc531517e2b63fe45ee" [dependencies.reddsa] git = "https://github.com/str4d/redjubjub.git" diff --git a/src/circuit/gadget/poseidon/pow5t3.rs b/src/circuit/gadget/poseidon/pow5t3.rs index ad7290aa..3000b6be 100644 --- a/src/circuit/gadget/poseidon/pow5t3.rs +++ b/src/circuit/gadget/poseidon/pow5t3.rs @@ -109,7 +109,7 @@ impl Pow5T3Chip { let rc_1 = meta.query_fixed(rc_a[1], Rotation::cur()); let rc_2 = meta.query_fixed(rc_a[2], Rotation::cur()); - let s_full = meta.query_selector(s_full, Rotation::cur()); + let s_full = meta.query_selector(s_full); let full_round = |next_idx: usize| { s_full.clone() @@ -138,7 +138,7 @@ impl Pow5T3Chip { let rc_b1 = meta.query_fixed(rc_b[1], Rotation::cur()); let rc_b2 = meta.query_fixed(rc_b[2], Rotation::cur()); - let s_partial = meta.query_selector(s_partial, Rotation::cur()); + let s_partial = meta.query_selector(s_partial); let partial_round_linear = |idx: usize, rc_b: Expression| { s_partial.clone() @@ -177,7 +177,7 @@ impl Pow5T3Chip { let output_state_1 = meta.query_advice(state[1], Rotation::next()); let output_state_2 = meta.query_advice(state[2], Rotation::next()); - let s_pad_and_add = meta.query_selector(s_pad_and_add, Rotation::cur()); + let s_pad_and_add = meta.query_selector(s_pad_and_add); let pad_and_add = |initial_state, input, output_state| { // We pad the input by storing the required padding in fixed columns and diff --git a/src/circuit/gadget/utilities/cond_swap.rs b/src/circuit/gadget/utilities/cond_swap.rs index 1015b54f..8c3e2f90 100644 --- a/src/circuit/gadget/utilities/cond_swap.rs +++ b/src/circuit/gadget/utilities/cond_swap.rs @@ -155,7 +155,7 @@ impl CondSwapChip { // TODO: optimise shape of gate for Merkle path validation meta.create_gate("a' = b ⋅ swap + a ⋅ (1-swap)", |meta| { - let q_swap = meta.query_selector(q_swap, Rotation::cur()); + let q_swap = meta.query_selector(q_swap); let a = meta.query_advice(config.a, Rotation::cur()); let b = meta.query_advice(config.b, Rotation::cur()); @@ -180,8 +180,7 @@ impl CondSwapChip { let bool_check = swap.clone() * (one - swap); array::IntoIter::new([a_check, b_check, bool_check]) - .map(|poly| q_swap.clone() * poly) - .collect() + .map(move |poly| q_swap.clone() * poly) }); config diff --git a/src/circuit/gadget/utilities/enable_flag.rs b/src/circuit/gadget/utilities/enable_flag.rs index a024f634..a4e932fe 100644 --- a/src/circuit/gadget/utilities/enable_flag.rs +++ b/src/circuit/gadget/utilities/enable_flag.rs @@ -108,7 +108,7 @@ impl EnableFlagChip { }; meta.create_gate("Enable flag", |meta| { - let q_enable = meta.query_selector(config.q_enable, Rotation::cur()); + let q_enable = meta.query_selector(config.q_enable); let value = meta.query_advice(config.value, Rotation::cur()); let enable_flag = meta.query_advice(config.enable_flag, Rotation::cur()); @@ -218,9 +218,11 @@ mod tests { let prover = MockProver::::run(1, &circuit, vec![]).unwrap(); assert_eq!( prover.verify(), - Err(vec![VerifyFailure::Gate { + Err(vec![VerifyFailure::Constraint { gate_index: 0, gate_name: "Enable flag", + constraint_index: 0, + constraint_name: "", row: 1, }]) );