-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Halo2 backend: use fewer copy constraints (#1376)
In Halo2, we need to simulate the "wrapping" behavior that we expect from the backend, by copying the first row of witness columns after the last. This was previously implemented by using copy constraints. Considering [how the argument works](https://zcash.github.io/halo2/design/proving-system/permutation.html), this leads to 1 additional fixed column during setup *per witness column*, and several additional witness columns (depending on the degree bound, but linear in the number of witness columns). But because Halo2 offers rotations of arbitrary offsets, we can instead constrain this as: `first_step * (witness_column - witness_column'degree)` On the `simple_sum` example, this improved the proof time by ~15% (353.01825ms -> 302.067125ms). The benchmarks on Keccak are still running...
- Loading branch information
1 parent
bcfee63
commit 1c98411
Showing
1 changed file
with
72 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters