Skip to content

Commit

Permalink
sinsemilla::tests: Use separate constants columns for chips.
Browse files Browse the repository at this point in the history
To be replaced by the public inputs API.
  • Loading branch information
therealyingtong committed Jun 25, 2021
1 parent 2ec3094 commit 9b47bd0
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/circuit/gadget/sinsemilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>(),
);

Expand All @@ -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)
Expand Down

0 comments on commit 9b47bd0

Please sign in to comment.