diff --git a/executor/src/witgen/global_constraints.rs b/executor/src/witgen/global_constraints.rs index 7a8eb7db4..a8a3364f3 100644 --- a/executor/src/witgen/global_constraints.rs +++ b/executor/src/witgen/global_constraints.rs @@ -366,13 +366,7 @@ fn smallest_period_candidate(fixed: &[T]) -> Option { if fixed.first() != Some(&0.into()) { return None; } - - // Handle the special case where last == 0 in Mersenne31 field, which is equivalent to 2^31 - 1 - if fixed.last() == Some(&0.into()) { - return None; - } - - (1..63).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into())) + (1..T::BITS as u64).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into())) } #[cfg(test)]