From 4e86d9d7f41d790451740156020240a47772f5fe Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Mon, 9 Aug 2021 19:08:52 +0200 Subject: [PATCH] Derive `quotient_degree_factor` --- src/plonk/circuit_builder.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plonk/circuit_builder.rs b/src/plonk/circuit_builder.rs index f4eaa881..9b060710 100644 --- a/src/plonk/circuit_builder.rs +++ b/src/plonk/circuit_builder.rs @@ -506,7 +506,6 @@ impl, const D: usize> CircuitBuilder { /// Builds a "full circuit", with both prover and verifier data. pub fn build(mut self) -> CircuitData { let mut timing = TimingTree::new("preprocess", Level::Trace); - let quotient_degree_factor = 7; // TODO: add this as a parameter. let start = Instant::now(); // Hash the public inputs, and route them to a `PublicInputGate` which will enforce that @@ -541,10 +540,13 @@ impl, const D: usize> CircuitBuilder { let gates = self.gates.iter().cloned().collect(); let (gate_tree, max_filtered_constraint_degree, num_constants) = Tree::from_gates(gates); - assert!( - max_filtered_constraint_degree <= quotient_degree_factor + 1, - "Constraints are too high degree." - ); + // `quotient_degree_factor` has to be between `max_filtered_constraint_degree-1` and `1<