Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions kimchi/src/circuits/berkeley_columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,6 @@ impl<'a, F: FftField> ColumnEnvironment<'a, F, BerkeleyChallengeTerm, BerkeleyCh
}
}

fn column_domain(&self, col: &Self::Column) -> Domain {
match *col {
Self::Column::Index(GateType::Generic) => Domain::D4,
Self::Column::Index(GateType::CompleteAdd) => Domain::D4,
_ => Domain::D8,
}
}

fn get_constants(&self) -> &Constants<F> {
&self.constants
}
Expand Down
5 changes: 1 addition & 4 deletions kimchi/src/circuits/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ pub trait ColumnEnvironment<
/// Return the evaluation of the given column, over the domain.
fn get_column(&self, col: &Self::Column) -> Option<&'a Evaluations<F, D<F>>>;

/// Defines the domain over which the column is evaluated
fn column_domain(&self, col: &Self::Column) -> Domain;

fn get_domain(&self, d: Domain) -> D<F>;

/// Return the constants parameters that the expression might use.
Expand Down Expand Up @@ -2085,7 +2082,7 @@ impl<F: FftField, Column: Copy> Expr<F, Column> {
}
};
EvalResult::SubEvals {
domain: env.column_domain(col),
domain: d,
shift: row.shift(),
evals,
}
Expand Down
34 changes: 0 additions & 34 deletions msm/src/column_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,40 +123,6 @@ impl<
}
}

fn column_domain(&self, col: &Self::Column) -> Domain {
match *col {
Self::Column::Relation(_)
| Self::Column::DynamicSelector(_)
| Self::Column::FixedSelector(_) => {
let domain_size = match *col {
Self::Column::Relation(i) => self.witness[i].domain().size,
Self::Column::DynamicSelector(i) => self.witness[N_REL + i].domain().size,
Self::Column::FixedSelector(i) => self.fixed_selectors[i].domain().size,
_ => panic!("Impossible"),
};
if self.domain.d1.size == domain_size {
Domain::D1
} else if self.domain.d2.size == domain_size {
Domain::D2
} else if self.domain.d4.size == domain_size {
Domain::D4
} else if self.domain.d8.size == domain_size {
Domain::D8
} else {
panic!("Domain not supported. We do support the following multiple of the domain registered in the environment: 1, 2, 4, 8")
}
}
Self::Column::LookupAggregation
| Self::Column::LookupFixedTable(_)
| Self::Column::LookupMultiplicity(_)
| Self::Column::LookupPartialSum(_) => {
// When there is a lookup, we do suppose the domain is always D8
// and we have at leat 6 lookups per row.
Domain::D8
}
}
}

fn get_constants(&self) -> &Constants<F> {
&self.constants
}
Expand Down
4 changes: 0 additions & 4 deletions o1vm/src/pickles/column_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ impl<'a, F: FftField> TColumnEnvironment<'a, F, BerkeleyChallengeTerm, BerkeleyC
}
}

fn column_domain(&self, _col: &Self::Column) -> Domain {
Domain::D8
}

fn get_constants(&self) -> &Constants<F> {
&self.constants
}
Expand Down
5 changes: 1 addition & 4 deletions o1vm/src/pickles/lookup_columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,7 @@ impl<'a, F: FftField> ColumnEnvironment<'a, F, LookupChallengeTerm, LookupChalle
Domain::D8 => self.domain.d8,
}
}
// TODO verify this
fn column_domain(&self, _col: &Self::Column) -> Domain {
Domain::D8
}

// We do not have constants here
fn get_constants(&self) -> &Constants<F> {
panic!("no constants are supposed to be used in this protocol")
Expand Down
Loading