Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alxkzmn committed Jul 25, 2024
1 parent 09667c8 commit 89bc631
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/plonkish/backend/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,21 @@ pub struct ChiquitoHalo2<F: PrimeField + From<u64>> {
}

impl<F: PrimeField + Hash> Halo2Configurable<F> for ChiquitoHalo2<F> {
fn preprocessing(&self, cs: &mut ConstraintSystemBuilder<F>) -> PreprocessingCompact<F> {
fn preprocessing(
&self,
cs_builder: &mut ConstraintSystemBuilder<F>,
) -> PreprocessingCompact<F> {
let fixed_count = self.plonkish_ir.fixed_assignments.0.len();
let mut fixed = vec![vec![]; fixed_count];

for (column, values) in self.plonkish_ir.fixed_assignments.iter() {
let column = cs.convert_fixed_column(column);
let column = cs_builder.convert_fixed_column(column);

fixed[column.index].extend(values.iter().cloned());
}

let mut copies = vec![];
cs.collect_permutations(&mut copies, &self.plonkish_ir.exposed);
cs_builder.collect_permutations(&mut copies, &self.plonkish_ir.exposed);

PreprocessingCompact {
permutation: AssemblyMid { copies },
Expand Down Expand Up @@ -204,8 +207,6 @@ impl<F: PrimeField + From<u64> + Hash> ChiquitoHalo2<F> {
let halo2_column = meta.fixed_column(column);
fixed_columns.insert(column.uuid(), halo2_column);
}
// No need to map the index as it already exists for
// Halo2 columns
Halo2Advice => {
let halo2_column = meta.advice_from_halo2(column);
advice_columns.insert(column.uuid(), halo2_column);
Expand Down

0 comments on commit 89bc631

Please sign in to comment.