From 9b47bd0db40ea95e82e3e4ba69696b8779d6a060 Mon Sep 17 00:00:00 2001 From: therealyingtong Date: Fri, 25 Jun 2021 13:39:37 +0800 Subject: [PATCH] sinsemilla::tests: Use separate constants columns for chips. To be replaced by the public inputs API. --- src/circuit/gadget/sinsemilla.rs | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/circuit/gadget/sinsemilla.rs b/src/circuit/gadget/sinsemilla.rs index 2b4c6735..48f559c9 100644 --- a/src/circuit/gadget/sinsemilla.rs +++ b/src/circuit/gadget/sinsemilla.rs @@ -337,12 +337,32 @@ mod tests { meta.advice_column(), ]; - let constants = meta.fixed_column(); + // TODO: Replace with public inputs API + let constants_1 = [ + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + ]; + let constants_2 = [ + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + meta.fixed_column(), + ]; + let constants_3 = meta.fixed_column(); + let perm = meta.permutation( &advices .iter() .map(|advice| (*advice).into()) - .chain(Some(constants.into())) + .chain(Some(constants_3.into())) + .chain(constants_1.iter().map(|fixed| (*fixed).into())) + .chain(constants_2.iter().map(|fixed| (*fixed).into())) .collect::>(), ); @@ -359,14 +379,14 @@ mod tests { meta, advices[..5].try_into().unwrap(), lookup, - constants, + constants_1, perm.clone(), ); let config2 = SinsemillaChip::configure( meta, advices[5..].try_into().unwrap(), lookup, - constants, + constants_2, perm, ); (ecc_config, config1, config2)