Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Separate arithmetic gate in sort with edges (#4866)
Removes another optimization that is incompatible with execution trace sorting. Method `create_sort_constraint_with_edges`, adds gates for batch range checking a set of elements using the generalized permutation argument (`q_sort`). The first and last gates are arithmetic gates that ensure the first/last element in your batch is equal to the lower/upper bound of the range being checked. Previously, the first gate was simultaneously an arithmetic gate and a `q_sort` gate. This PR separates this into two gates so that the "lower bound check" is separated out into a single arithmetic gate. (Note: the final gate was already split in this way for a different reason: each sort gate looks into the wire values of the next row. The dummy gate provides this "next row" and breaks the cycle). Note: this adds an additional 1 gate per batched range check via `create_sort_constraint_with_edges`. This results in a vkey change hence the join split test update. ``` -------------------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters... -------------------------------------------------------------------------------- ClientIVCBench/Full/6 32579 ms 26658 ms ```
- Loading branch information