mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 09:13:09 +00:00
Constraint degree should be at least 3
This commit is contained in:
parent
85d162cdbc
commit
4a27a67bab
@ -403,6 +403,7 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
|
||||
let gates = self.gates.iter().cloned().collect();
|
||||
let (gate_tree, max_filtered_constraint_degree, num_constants) = Tree::from_gates(gates);
|
||||
let max_filtered_constraint_degree = max_filtered_constraint_degree.max(3);
|
||||
let prefixed_gates = PrefixedGate::from_tree(gate_tree);
|
||||
|
||||
let degree_bits = log2_strict(degree);
|
||||
|
||||
@ -25,6 +25,7 @@ pub fn partial_products<T: Product + Copy>(v: &[T], max_degree: usize) -> Vec<T>
|
||||
/// Returns a tuple `(a,b)`, where `a` is the length of the output of `partial_products()` on a
|
||||
/// vector of length `n`, and `b` is the number of elements needed to compute the final product.
|
||||
pub fn num_partial_products(n: usize, max_degree: usize) -> (usize, usize) {
|
||||
debug_assert!(max_degree > 1);
|
||||
let mut res = 0;
|
||||
let mut remainder = n;
|
||||
while remainder > max_degree {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user