diff --git a/src/assignment_map.rs b/src/assignment_map.rs index 1695813..6269ac5 100644 --- a/src/assignment_map.rs +++ b/src/assignment_map.rs @@ -21,9 +21,7 @@ pub struct AssignmentMap(BTreeMap)>>); impl AssignmentMap { pub fn new(stream: impl ParallelIterator>) -> Self { - let mut sorted_by_offset: Vec<_> = stream - .map(|a| (a.offset, a.column, a.value)) - .collect(); + let mut sorted_by_offset: Vec<_> = stream.map(|a| (a.offset, a.column, a.value)).collect(); sorted_by_offset.sort_by(|x, y| x.0.cmp(&y.0)); let grouped_by_offset = sorted_by_offset.iter().group_by(|(offset, _, _)| offset); let y: BTreeMap<_, _> = grouped_by_offset diff --git a/src/gadgets/byte_bit.rs b/src/gadgets/byte_bit.rs index 14840a7..e0affc5 100644 --- a/src/gadgets/byte_bit.rs +++ b/src/gadgets/byte_bit.rs @@ -1,10 +1,6 @@ use super::super::constraint_builder::{ConstraintBuilder, FixedColumn, Query}; use crate::assignment_map::{Assignment, Column}; -use halo2_proofs::{ - arithmetic::FieldExt, - circuit::{Region, Value}, - plonk::ConstraintSystem, -}; +use halo2_proofs::{arithmetic::FieldExt, circuit::Region, plonk::ConstraintSystem}; use rayon::prelude::*; // TODO: fix name to configggggggg diff --git a/src/gadgets/byte_representation.rs b/src/gadgets/byte_representation.rs index 737c3d0..0cf90df 100644 --- a/src/gadgets/byte_representation.rs +++ b/src/gadgets/byte_representation.rs @@ -111,11 +111,18 @@ impl ByteRepresentationConfig { .collect(); for assignment in assignments.into_iter() { match assignment.column { - Column::Selector(s) => region.assign_fixed(|| "fixed", s.0, assignment.offset, || assignment.value), - Column::Advice(s) => region.assign_advice(|| "advice", s.0, assignment.offset, || assignment.value), - Column::SecondPhaseAdvice(s) => { - region.assign_advice(|| "second phase advice", s.0, assignment.offset, || assignment.value) + Column::Selector(s) => { + region.assign_fixed(|| "fixed", s.0, assignment.offset, || assignment.value) } + Column::Advice(s) => { + region.assign_advice(|| "advice", s.0, assignment.offset, || assignment.value) + } + Column::SecondPhaseAdvice(s) => region.assign_advice( + || "second phase advice", + s.0, + assignment.offset, + || assignment.value, + ), _ => unreachable!(), } .unwrap(); diff --git a/src/gadgets/is_zero.rs b/src/gadgets/is_zero.rs index c7389e8..2f65351 100644 --- a/src/gadgets/is_zero.rs +++ b/src/gadgets/is_zero.rs @@ -1,10 +1,6 @@ -use crate::assignment_map::{Assignment, Column}; +use crate::assignment_map::Assignment; use crate::constraint_builder::{AdviceColumn, BinaryQuery, ConstraintBuilder, Query}; -use halo2_proofs::{ - arithmetic::FieldExt, - circuit::{Region, Value}, - plonk::ConstraintSystem, -}; +use halo2_proofs::{arithmetic::FieldExt, circuit::Region, plonk::ConstraintSystem}; use std::fmt::Debug; #[derive(Clone, Copy)] diff --git a/src/gadgets/key_bit.rs b/src/gadgets/key_bit.rs index f86c4b1..8b0287b 100644 --- a/src/gadgets/key_bit.rs +++ b/src/gadgets/key_bit.rs @@ -7,10 +7,7 @@ use crate::{ constraint_builder::{AdviceColumn, ConstraintBuilder, Query, SelectorColumn}, }; use halo2_proofs::{ - arithmetic::FieldExt, - circuit::{Region, Value}, - halo2curves::bn256::Fr, - plonk::ConstraintSystem, + arithmetic::FieldExt, circuit::Region, halo2curves::bn256::Fr, plonk::ConstraintSystem, }; use rayon::prelude::*; diff --git a/src/mpt.rs b/src/mpt.rs index a98f1cd..66f2229 100644 --- a/src/mpt.rs +++ b/src/mpt.rs @@ -1,5 +1,5 @@ use crate::{ - assignment_map::{AssignmentMap, Column, Assignment}, + assignment_map::{Assignment, AssignmentMap}, constraint_builder::{ConstraintBuilder, SelectorColumn}, gadgets::{ byte_bit::ByteBitGadget, @@ -18,7 +18,7 @@ use crate::{ }; use halo2_proofs::{ arithmetic::FieldExt, - circuit::{Layouter, Value}, + circuit::Layouter, halo2curves::bn256::Fr, plonk::{Challenge, ConstraintSystem, Error, Expression, VirtualCells}, };