Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply sumcheck to nonzero constraints directly #292

Merged
merged 3 commits into from
Jul 26, 2024
Merged

Conversation

alxkzmn
Copy link
Contributor

@alxkzmn alxkzmn commented May 13, 2024

Please see summa-dev/plonkish#2 to understand how the "nonzero" gate is handled in the modified plonkish backend. TLDR:

  • we put a negative grand total below the balances in the same column;
  • we create a "nonzero" gate that's simply querying the current cell;
  • the modified plonkish backend sums them all up when including into sumcheck, so if we have a circuit that looks like this
Col Balance
Row0 3
Row1 5
Row2 -8

a simple gate that is querying the balance like meta.query_advice(balance, Rotation::cur()) will add all the cells to sumcheck without the need for rotations, and the final sumcheck (which is actually a zero check in hyperplonk) will pass (3 + 5 -8 =0).

@alxkzmn alxkzmn marked this pull request as ready for review May 13, 2024 14:01
@alxkzmn alxkzmn requested a review from sifnoc May 13, 2024 14:01
sifnoc and others added 2 commits July 26, 2024 19:47
* Added concatenated balance for nonzero constraint process

* fix: order of assigning balance value following the order of concatenated balance

* fixing typo

* Fix selector and concatenated balance on nonzero-constrain

* fix typo

* fix: following review comments

* fix: added assertions for N_CURRENCIES in the gate

* fix: gh workflow
@sifnoc
Copy link
Member

sifnoc commented Jul 26, 2024

Looks good! Let's merge this.
After then I will rename this branch name from "v3" to "v3b".

@sifnoc sifnoc merged commit 411b3df into v3 Jul 26, 2024
2 checks passed
@sifnoc sifnoc deleted the v3-direct-sumcheck branch July 26, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants