Skip to content

Commit

Permalink
Debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darth-cy committed Jun 5, 2024
1 parent f2d474d commit 0cf28bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aggregator/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod compression;
mod mock_chunk;
mod rlc;

#[cfg(feature = "soundness_tests")]
#[cfg(feature = "soundness-tests")]
mod literals_header;

#[macro_export]
Expand Down
8 changes: 8 additions & 0 deletions aggregator/src/tests/literals_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ impl Circuit<Fr> 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(
Expand All @@ -158,6 +164,7 @@ impl Circuit<Fr> for TestLiteralsHeaderCircuit {

let mut rng = rand::thread_rng();

#[cfg(feature = "soundness-tests")]
match self.case {
// sound case
UnsoundCase::None => {}
Expand Down Expand Up @@ -273,6 +280,7 @@ fn run(case: UnsoundCase) -> Result<(), Vec<VerifyFailure>> {
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);
Expand Down

0 comments on commit 0cf28bc

Please sign in to comment.