This commit is contained in:
enrico.eth 2024-02-07 01:01:11 +08:00 committed by GitHub
commit 9e7a84d3f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -194,11 +194,10 @@ impl<F: PrimeFieldBits, const WINDOW_NUM_BITS: usize> RunningSumConfig<F, WINDOW
z = z_next;
zs.push(z.clone());
}
assert_eq!(zs.len(), num_windows + 1);
if strict {
// Constrain the final running sum output to be zero.
region.constrain_constant(zs.last().unwrap().cell(), F::ZERO)?;
region.constrain_constant(zs[num_windows].cell(), F::ZERO)?;
}
Ok(RunningSum(zs))