From 56c9985c6b9d086e316e41c217387f5f20b35cb1 Mon Sep 17 00:00:00 2001 From: Mikhail Volkhov Date: Fri, 8 Dec 2023 12:43:16 +0000 Subject: [PATCH] Remove erroneous assertion on colliding runtime and fixed table IDs --- kimchi/src/circuits/lookup/index.rs | 30 ++--------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/kimchi/src/circuits/lookup/index.rs b/kimchi/src/circuits/lookup/index.rs index 41a9709737..2b631ec8a6 100644 --- a/kimchi/src/circuits/lookup/index.rs +++ b/kimchi/src/circuits/lookup/index.rs @@ -266,12 +266,8 @@ impl LookupConstraintSystem { let runtime_tables_ids: Vec = runtime_tables.iter().map(|rt| rt.id).collect(); check_id_duplicates(runtime_tables_ids.iter(), "runtime table duplicates")?; - check_id_duplicates( - runtime_tables_ids - .iter() - .chain(fixed_lookup_tables_ids.iter()), - "duplicates between runtime and fixed tables", - )?; + // Runtime table IDs may collide with lookup + // table IDs, so we intentionally do not perform another potential check. // save the offset of the end of the table let mut runtime_table_offset = 0; @@ -545,27 +541,5 @@ mod tests { ), "LookupConstraintSystem::create(...) must fail, collision in runtime ids" ); - - let cs = ConstraintSystem::::create(gates.clone()) - .lookup(vec![LookupTable::create( - collision_id, - vec![vec![From::from(0); 16]], - ) - .unwrap()]) - .runtime(Some(vec![RuntimeTableCfg { - id: collision_id, - first_column: vec![From::from(1); 16], - }])) - .build(); - - assert!( - matches!( - cs, - Err(SetupError::LookupCreation( - LookupError::LookupTableIdCollision { .. } - )) - ), - "LookupConstraintSystem::create(...) must fail, collision between runtime and lookup ids" - ); } }