From 76b3eb304cca5529f18240a878138b7ec38d7d63 Mon Sep 17 00:00:00 2001 From: Daniel Lubarov Date: Tue, 3 Jan 2023 12:43:05 -0800 Subject: [PATCH] more --- evm/src/cross_table_lookup.rs | 37 +---------------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/evm/src/cross_table_lookup.rs b/evm/src/cross_table_lookup.rs index 2b52a941..1b184a50 100644 --- a/evm/src/cross_table_lookup.rs +++ b/evm/src/cross_table_lookup.rs @@ -633,7 +633,6 @@ pub(crate) mod testutils { let CrossTableLookup { looking_tables, looked_table, - default, } = ctl; // Maps `m` with `(table, i) in m[row]` iff the `i`-th row of `table` is equal to `row` and @@ -647,45 +646,11 @@ pub(crate) mod testutils { process_table(trace_poly_values, looked_table, &mut looked_multiset); let empty = &vec![]; - // Check that every row in the looking tables appears in the looked table the same number of times - // with some special logic for the default row. + // Check that every row in the looking tables appears in the looked table the same number of times. for (row, looking_locations) in &looking_multiset { let looked_locations = looked_multiset.get(row).unwrap_or(empty); - if let Some(default) = default { - if row == default { - continue; - } - } check_locations(looking_locations, looked_locations, ctl_index, row); } - let extra_default_count = default.as_ref().map(|d| { - let looking_default_locations = looking_multiset.get(d).unwrap_or(empty); - let looked_default_locations = looked_multiset.get(d).unwrap_or(empty); - looking_default_locations - .len() - .checked_sub(looked_default_locations.len()) - .unwrap_or_else(|| { - // If underflow, panic. There should be more default rows in the looking side. - check_locations( - looking_default_locations, - looked_default_locations, - ctl_index, - d, - ); - unreachable!() - }) - }); - // Check that the number of extra default rows is correct. - if let Some(count) = extra_default_count { - assert_eq!( - count, - looking_tables - .iter() - .map(|table| trace_poly_values[table.table as usize][0].len()) - .sum::() - - trace_poly_values[looked_table.table as usize][0].len() - ); - } // Check that every row in the looked tables appears in the looked table the same number of times. for (row, looked_locations) in &looked_multiset { let looking_locations = looking_multiset.get(row).unwrap_or(empty);