Skip to content

Commit

Permalink
Fix max_cpu_len_log (#714)
Browse files Browse the repository at this point in the history
* fix

* fix

* fix

* address comments
  • Loading branch information
sai-deng authored Oct 17, 2024
1 parent 4f70195 commit ce0ab8c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions evm_arithmetization/src/generation/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ pub(crate) trait State<F: RichField> {
{
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);

Expand Down

0 comments on commit ce0ab8c

Please sign in to comment.