diff --git a/circuits/src/cross_table_lookup.rs b/circuits/src/cross_table_lookup.rs index 498aa03a2..39c61c4c6 100644 --- a/circuits/src/cross_table_lookup.rs +++ b/circuits/src/cross_table_lookup.rs @@ -585,7 +585,7 @@ pub mod ctl_utils { let looking_multiplicity = looking_locations.iter().map(|l| l.1).sum::(); let looked_multiplicity = looked_locations.iter().map(|l| l.1).sum::(); if looking_multiplicity != looked_multiplicity { - println!( + eprintln!( "Row {row:?} has multiplicity {looking_multiplicity} in the looking tables, but {looked_multiplicity} in the looked table.\n\ Looking locations: {looking_locations:?}.\n\ @@ -614,14 +614,22 @@ pub mod ctl_utils { // same number of times. for (row, looking_locations) in &looking_multiset.0 { let looked_locations = looked_multiset.get(row).unwrap_or(empty); - check_multiplicities(row, looking_locations, looked_locations)?; + check_multiplicities(row, looking_locations, looked_locations).map_err(|e| { + eprintln!("Looking multiset: {looking_multiset:?}"); + eprintln!("Looked multiset: {looked_multiset:?}"); + e + })?; } // Check that every row in the looked tables appears in the looking table the // same number of times. for (row, looked_locations) in &looked_multiset.0 { let looking_locations = looking_multiset.get(row).unwrap_or(empty); - check_multiplicities(row, looking_locations, looked_locations)?; + check_multiplicities(row, looking_locations, looked_locations).map_err(|e| { + eprintln!("Looking multiset: {looking_multiset:?}"); + eprintln!("Looked multiset: {looked_multiset:?}"); + e + })?; } Ok(())