Skip to content

Commit

Permalink
feat: relax constraint degree checks in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Kindi-0 committed Sep 11, 2024
1 parent ac9561d commit a23d939
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions prover/src/constraints/evaluation_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,13 @@ impl<'a, E: FieldElement> ConstraintEvaluationTable<'a, E> {
self.expected_transition_degrees, actual_degrees
);

// make sure evaluation domain size does not exceed the size required by max degree
let expected_domain_size =
core::cmp::max(max_degree, self.domain.trace_length() + 1).next_power_of_two();
assert_eq!(
expected_domain_size,
self.num_rows(),
"incorrect constraint evaluation domain size; expected {}, but was {}",
expected_domain_size,
self.num_rows()
// make sure the actual degrees are less than or equal to the expected degree bounds
assert!(
self.expected_transition_degrees >= actual_degrees,
"transition constraint degrees do not satisfy the expected degree bounds
\nexpected degree bounds: {:>3?}\nactual degrees: {:>3?}",
self.expected_transition_degrees,
actual_degrees
);
}
}
Expand Down

0 comments on commit a23d939

Please sign in to comment.