-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sumcheck protocol support mixed num_vars monomial form (#235)
### Goal To make sumcheck protocol support different num_vars, aiming for - [x] minimal change to sumcheck protocol, make verifier remain the same. no extra meta data passed from prover, and what prover have just mle and it's eval size Besides this PR also remove some parallism in verifier since it's unnecessary for relative low cost. ### design rationale (Also comments in codebase for reference) To deal with different num_vars, we exploit a fact that for each product which num_vars < max_num_vars, for it evaluation value we need to times 2^(max_num_vars - num_vars) E.g. Giving multivariate poly $f(X) = f_1(X1) + f_2(X), X1 \in {F}^{n'}, X \in {F}^{n}, |X1| := n', |X| = n, n' <= n$ For i round univariate poly, $f^i(x)$ $f^i[0] = \sum_b f(r, 0, b), b \in [0, 1]^{n-i-1}, r \in {F}^{n-i-1}$ chanllenge get from prev rounds = $\sum_b f_1(r, 0, b1) + f_2(r, 0, b), |b| >= |b1|, |b| - |b1| = n - n'$ = $2^{(|b| - |b1|)} * \sum_{b1} f_1(r, 0, b1) + \sum_b f_2(r, 0, b)$ same applied on f^i[1] It imply that, for every evals in f_1, to compute univariate poly, we just need to times a factor 2^(|b| - |b1|) for it evaluation value ### benchmark benchmark with ceno_zkvm `riscv_add`, and gkr `keccak` both remain the same and no impact. You might see some redundancy coding style, but this is for retain the best performance. I tried other variants and it impact benchmark results ### scope Related to #109 #210 .... To address #126 #127 This enhance protocol features potiential can be used for `range table-circuit`, `init/final-memory`, `cpu-init/cpu-final halt` to make selector sumcheck support batching different num_instance witin.
- Loading branch information
Showing
10 changed files
with
336 additions
and
108 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.