fix: FailureLocation::find empty-region handling (#121)

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
This commit is contained in:
Carlos Pérez 2023-01-11 13:11:59 +01:00 committed by GitHub
parent b8e458e8af
commit 7aa1009786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ impl FailureLocation {
.iter() .iter()
.enumerate() .enumerate()
.find(|(_, r)| { .find(|(_, r)| {
if r.rows.is_none() {
return false;
}
let (start, end) = r.rows.unwrap(); let (start, end) = r.rows.unwrap();
// We match the region if any input columns overlap, rather than all of // We match the region if any input columns overlap, rather than all of
// them, because matching complex selector columns is hard. As long as // them, because matching complex selector columns is hard. As long as