From 0e465c1ccf6f1415e89d7d827da8fca4dbc32b52 Mon Sep 17 00:00:00 2001 From: Robin Salen Date: Sun, 2 Apr 2023 11:35:54 -0400 Subject: [PATCH] Customize range specification for AllRecursiveCircuits --- evm/src/fixed_recursive_verifier.rs | 12 ++++++------ evm/tests/empty_txn_list.rs | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/evm/src/fixed_recursive_verifier.rs b/evm/src/fixed_recursive_verifier.rs index 8b8cf284..d85f42c4 100644 --- a/evm/src/fixed_recursive_verifier.rs +++ b/evm/src/fixed_recursive_verifier.rs @@ -339,41 +339,41 @@ where /// Preprocess all recursive circuits used by the system. pub fn new( all_stark: &AllStark, - degree_bits_range: Range, + degree_bits_ranges: &[Range; NUM_TABLES], stark_config: &StarkConfig, ) -> Self { let cpu = RecursiveCircuitsForTable::new( Table::Cpu, &all_stark.cpu_stark, - degree_bits_range.clone(), + degree_bits_ranges[0].clone(), &all_stark.cross_table_lookups, stark_config, ); let keccak = RecursiveCircuitsForTable::new( Table::Keccak, &all_stark.keccak_stark, - degree_bits_range.clone(), + degree_bits_ranges[1].clone(), &all_stark.cross_table_lookups, stark_config, ); let keccak_sponge = RecursiveCircuitsForTable::new( Table::KeccakSponge, &all_stark.keccak_sponge_stark, - degree_bits_range.clone(), + degree_bits_ranges[2].clone(), &all_stark.cross_table_lookups, stark_config, ); let logic = RecursiveCircuitsForTable::new( Table::Logic, &all_stark.logic_stark, - degree_bits_range.clone(), + degree_bits_ranges[3].clone(), &all_stark.cross_table_lookups, stark_config, ); let memory = RecursiveCircuitsForTable::new( Table::Memory, &all_stark.memory_stark, - degree_bits_range, + degree_bits_ranges[4].clone(), &all_stark.cross_table_lookups, stark_config, ); diff --git a/evm/tests/empty_txn_list.rs b/evm/tests/empty_txn_list.rs index fae2f656..66367ac6 100644 --- a/evm/tests/empty_txn_list.rs +++ b/evm/tests/empty_txn_list.rs @@ -96,7 +96,11 @@ fn test_empty_txn_list() -> anyhow::Result<()> { verify_proof(&all_stark, proof, &config)?; - let all_circuits = AllRecursiveCircuits::::new(&all_stark, 9..18, &config); + let all_circuits = AllRecursiveCircuits::::new( + &all_stark, + &[9..15, 9..15, 9..10, 9..12, 9..18], // Minimal ranges to prove an empty list + &config, + ); { let gate_serializer = DefaultGateSerializer;