Skip to content

Commit

Permalink
Merge pull request #1242 from topos-protocol/fix_multi_row_ctl
Browse files Browse the repository at this point in the history
Fix eval_table, multi-row filters
  • Loading branch information
hratoanina authored Sep 19, 2023
2 parents b60a3d4 + 4eb6a3b commit 8a19f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evm/src/cross_table_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl<F: Field> Column<F> {

// If we access the next row at the last row, for sanity, we consider the next row's values to be 0.
// If CTLs are correctly written, the filter should be 0 in that case anyway.
if !self.next_row_linear_combination.is_empty() && row < table.len() - 1 {
if !self.next_row_linear_combination.is_empty() && row < table[0].values.len() - 1 {
res += self
.next_row_linear_combination
.iter()
Expand Down Expand Up @@ -497,7 +497,7 @@ pub(crate) fn eval_cross_table_lookup_checks<F, FE, P, S, const D: usize, const
.collect::<Vec<_>>();
let combined = challenges.combine(evals.iter());
let local_filter = if let Some(column) = filter_column {
column.eval(vars.local_values)
column.eval_with_next(vars.local_values, vars.next_values)
} else {
P::ONES
};
Expand Down

0 comments on commit 8a19f43

Please sign in to comment.