Skip to content

Commit

Permalink
boundary handling of the fork() function in MockProver
Browse files Browse the repository at this point in the history
  • Loading branch information
Velaciela committed Jul 5, 2023
1 parent aab39d5 commit 90e22c6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion halo2_proofs/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,21 @@ impl<'a, F: Field + Group> Assignment<F> for MockProver<'a, F> {
for (i, sub_range) in ranges.iter().enumerate() {
if sub_range.start < range_start {
// TODO: use more precise error type
log::debug!(
"subCS_{} sub_range.start: {} < range_start{}",
i,
sub_range.start,
range_start
);
return Err(Error::Synthesis);
}
if i == ranges.len() - 1 && sub_range.end >= self.rw_rows.end {
if i == ranges.len() - 1 && sub_range.end > self.rw_rows.end {
log::debug!(
"subCS_{} sub_range.end: {} > self.rw_rows.end{}",
i,
sub_range.end,
self.rw_rows.end
);
return Err(Error::Synthesis);
}
range_start = sub_range.end;
Expand Down

0 comments on commit 90e22c6

Please sign in to comment.