Skip to content

Commit

Permalink
dev::cost: Handle circuits with zero permutation_chunks()
Browse files Browse the repository at this point in the history
  • Loading branch information
therealyingtong committed Mar 20, 2023
1 parent 95ce948 commit 0e5c7a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions halo2_proofs/src/dev/cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,11 @@ impl<G: PrimeGroup, ConcreteCircuit: Circuit<G::Scalar>> CircuitCost<G, Concrete

// Global permutation argument:
// - chunks commitments per instance
// - 2*chunks + (chunks - 1) evals per instance
equality: ProofContribution::new(chunks, 3 * chunks - 1),
// - 2 * chunks + (chunks - 1) evals per instance
equality: ProofContribution::new(
chunks,
if chunks == 0 { chunks } else { 3 * chunks - 1 },
),

_marker: PhantomData::default(),
}
Expand Down

0 comments on commit 0e5c7a1

Please sign in to comment.