Skip to content

Commit

Permalink
fix: FailureLocation::find empty-region handling
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 committed Jan 11, 2023
1 parent b8e458e commit c18f2dd
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 c18f2dd

Please sign in to comment.