mirror of https://github.com/zcash/halo2.git
sinsemilla::tests: Use separate constants columns for chips.
To be replaced by the public inputs API.
This commit is contained in:
parent
2ec30943b3
commit
9b47bd0db4
|
@ -337,12 +337,32 @@ mod tests {
|
||||||
meta.advice_column(),
|
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(
|
let perm = meta.permutation(
|
||||||
&advices
|
&advices
|
||||||
.iter()
|
.iter()
|
||||||
.map(|advice| (*advice).into())
|
.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::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -359,14 +379,14 @@ mod tests {
|
||||||
meta,
|
meta,
|
||||||
advices[..5].try_into().unwrap(),
|
advices[..5].try_into().unwrap(),
|
||||||
lookup,
|
lookup,
|
||||||
constants,
|
constants_1,
|
||||||
perm.clone(),
|
perm.clone(),
|
||||||
);
|
);
|
||||||
let config2 = SinsemillaChip::configure(
|
let config2 = SinsemillaChip::configure(
|
||||||
meta,
|
meta,
|
||||||
advices[5..].try_into().unwrap(),
|
advices[5..].try_into().unwrap(),
|
||||||
lookup,
|
lookup,
|
||||||
constants,
|
constants_2,
|
||||||
perm,
|
perm,
|
||||||
);
|
);
|
||||||
(ecc_config, config1, config2)
|
(ecc_config, config1, config2)
|
||||||
|
|
Loading…
Reference in New Issue