Skip to content

Commit

Permalink
more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto committed Sep 23, 2023
1 parent d2de2de commit 57f216d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ name = "fft"
harness = false

[dependencies]
log = { version = "0.4.17", default_features = false }
backtrace = { version = "0.3", optional = true }
rayon = "1.5.1"
ff = "0.13"
Expand Down
6 changes: 6 additions & 0 deletions halo2_proofs/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,7 @@ impl<F: Field> ConstraintSystem<F> {
}

let max_gate_degree = self.max_gate_degree();
log::trace!("max gate degree: {}", max_gate_degree);
let max_single_lookup_degree: usize = self
.lookups_map
.values()
Expand All @@ -1783,15 +1784,20 @@ impl<F: Field> ConstraintSystem<F> {
})
.max()
.unwrap();
log::trace!("max_single_lookup_degree: {}", max_gate_degree);

let required_degree = std::cmp::max(max_gate_degree, max_single_lookup_degree);
let required_degree = (required_degree as u64 - 1).next_power_of_two() as usize;

log::trace!("required_degree: {}", required_degree);

self.set_minimum_degree(required_degree + 1);

// safe to unwrap here
let minimum_degree = self.minimum_degree.unwrap();

log::trace!("minimum_degree: {}", minimum_degree);

let mut lookups: Vec<_> = vec![];
for v in self.lookups_map.values() {
let LookupTracker { table, inputs } = v;
Expand Down

0 comments on commit 57f216d

Please sign in to comment.