Skip to content

Commit

Permalink
fix: FailureLocation::find empty-region handling (#121)
Browse files Browse the repository at this point in the history
After working on fixing
privacy-scaling-explorations/zkevm-circuits#1024, a bug was found in the
verification fn of the MockProver which implies that while finding a
FailureLocation, if a Region doesn't contain any rows.

This is fixed by introducing a 2-line solution suggested by @lispc.

Resolves: #117
  • Loading branch information
CPerezz authored Jan 11, 2023
1 parent b8e458e commit 7aa1009
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions halo2_proofs/src/dev/failure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ impl FailureLocation {
.iter()
.enumerate()
.find(|(_, r)| {
if r.rows.is_none() {
return false;
}
let (start, end) = r.rows.unwrap();
// We match the region if any input columns overlap, rather than all of
// them, because matching complex selector columns is hard. As long as
Expand Down

0 comments on commit 7aa1009

Please sign in to comment.