From 0cf28bc4fc6c6bff0ae719e9526c7e4a73e16822 Mon Sep 17 00:00:00 2001 From: Ray Gao Date: Tue, 4 Jun 2024 23:35:04 -0400 Subject: [PATCH] Debug tests --- aggregator/src/tests.rs | 2 +- aggregator/src/tests/literals_header.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/aggregator/src/tests.rs b/aggregator/src/tests.rs index 4bffa8ade7..6e6643448e 100644 --- a/aggregator/src/tests.rs +++ b/aggregator/src/tests.rs @@ -4,7 +4,7 @@ mod compression; mod mock_chunk; mod rlc; -#[cfg(feature = "soundness_tests")] +#[cfg(feature = "soundness-tests")] mod literals_header; #[macro_export] diff --git a/aggregator/src/tests/literals_header.rs b/aggregator/src/tests/literals_header.rs index 58e44540aa..bfa12f6fe4 100644 --- a/aggregator/src/tests/literals_header.rs +++ b/aggregator/src/tests/literals_header.rs @@ -133,10 +133,16 @@ impl Circuit for TestLiteralsHeaderCircuit { )); } + #[cfg(feature = "soundness-tests")] let (assigned_literals_header_table_rows, assigned_padding_cells) = config .literals_header_table .assign(&mut layouter, literal_headers, n_enabled)?; + #[cfg(not(feature = "soundness-tests"))] + let _ = config + .literals_header_table + .assign(&mut layouter, literal_headers, n_enabled)?; + // Modify assigned witness values let mut first_pass = halo2_base::SKIP_FIRST_PASS; layouter.assign_region( @@ -158,6 +164,7 @@ impl Circuit for TestLiteralsHeaderCircuit { let mut rng = rand::thread_rng(); + #[cfg(feature = "soundness-tests")] match self.case { // sound case UnsoundCase::None => {} @@ -273,6 +280,7 @@ fn run(case: UnsoundCase) -> Result<(), Vec> { batch_files.sort(); let mut multi_batch_data = Vec::with_capacity(500_000); + for batch_file in batch_files { let batch_data = fs::read(batch_file).expect("batch file reads successfully"); multi_batch_data.extend_from_slice(&batch_data);