diff --git a/src/circuit.rs b/src/circuit.rs index 2fa22192..c8c9401a 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -241,8 +241,10 @@ impl plonk::Circuit for Circuit { let poseidon_config = PoseidonChip::configure( meta, poseidon::OrchardNullifier, - advices[5..8].try_into().unwrap(), - advices[8], + // We place the state columns after the partial_sbox column so that the + // pad-and-add region can be layed out more efficiently. + advices[6..9].try_into().unwrap(), + advices[5], rc_a, rc_b, ); diff --git a/src/circuit/gadget/ecc/chip/mul/overflow.rs b/src/circuit/gadget/ecc/chip/mul/overflow.rs index d4336624..4b17d6bc 100644 --- a/src/circuit/gadget/ecc/chip/mul/overflow.rs +++ b/src/circuit/gadget/ecc/chip/mul/overflow.rs @@ -29,10 +29,12 @@ impl From<&EccConfig> for Config { Self { q_mul_overflow: ecc_config.q_mul_overflow, lookup_config: ecc_config.lookup_config.clone(), + // Use advice columns that don't conflict with the either the incomplete + // additions in fixed-base scalar mul, or the lookup range checks. advices: [ - ecc_config.advices[0], - ecc_config.advices[1], - ecc_config.advices[2], + ecc_config.advices[6], + ecc_config.advices[7], + ecc_config.advices[8], ], } } diff --git a/src/circuit/gadget/poseidon/pow5t3.rs b/src/circuit/gadget/poseidon/pow5t3.rs index 5b29358e..de12e04c 100644 --- a/src/circuit/gadget/poseidon/pow5t3.rs +++ b/src/circuit/gadget/poseidon/pow5t3.rs @@ -280,19 +280,12 @@ impl> PoseidonDuplexInstructions