diff --git a/evm_arithmetization/src/generation/state.rs b/evm_arithmetization/src/generation/state.rs index 1ea87bd0c..2581f8094 100644 --- a/evm_arithmetization/src/generation/state.rs +++ b/evm_arithmetization/src/generation/state.rs @@ -185,6 +185,15 @@ pub(crate) trait State { { let halt_offsets = self.get_halt_offsets(); + if let Some(max_len_log) = max_cpu_len_log { + assert!( + (1 << max_len_log) >= NUM_EXTRA_CYCLES_AFTER, + "Target length (2^{}) is less than NUM_EXTRA_CYCLES_AFTER ({})", + max_len_log, + NUM_EXTRA_CYCLES_AFTER + ); + } + let cycle_limit = max_cpu_len_log.map(|max_len_log| (1 << max_len_log) - NUM_EXTRA_CYCLES_AFTER);