This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[word-lo-hi] fine tune copy circuit to reduce degree (#1508)
### Description [_PR description_] ### Issue Link #1499 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ### Contents This pr is to rewrite/split copy circuit constrains to trade more gates with less degree. copy table `tag` field is binary number decomposition with degree N (N represent number of bits, in copy table case N = 3). Once put in `or::expr([#num_or_condition])`, gate degrees will be exploded quickly by `N*#num_or_condition`. Before PR, copy circuit max is degree 12, After PR, copy circuit max 6 degree with 2 more gates. However, circuit degree upper bound still increase by 1 (9 -> 10) for word-lo-hi refactor, due to state-circuit `batch_is_zero-"is_zero is 1 if values are all zero">` gate degrees from 6 -> 10 Due to we fold 2 extra column, each contribute 2 degrees https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/word-lo-hi/zkevm-circuits/src/state_circuit.rs#L129-L141. State circuit need some discussion, as I thought rewrite it might be a bit over-engineering.
- Loading branch information