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

Avoid zero-polynomials in Ultra Honk #423

Closed
ledwards2225 opened this issue May 4, 2023 · 0 comments · Fixed by #531
Closed

Avoid zero-polynomials in Ultra Honk #423

ledwards2225 opened this issue May 4, 2023 · 0 comments · Fixed by #531
Assignees

Comments

@ledwards2225
Copy link
Collaborator

ledwards2225 commented May 4, 2023

The approach taken in Standard Honk to avoid zero polynomials was to add a single valid arithmetic gate by default in the constructor of the standard circuit constructor.

The increased complexity of the relations in Ultra Honk makes this approach less straightforward. The biggest issue is that a lookup must be performed to populate various lookup related polys with non-zero values. This automatically increases the circuit size by at least the size of the corresponding table. Currently the approach (encapsulated in add_gates_to_ensure_all_polys_are_non_zero()) increases the circuit size by 16k and is obviously untenable.

One solution would be to add a dummy table with one row and perform a lookup on that. We should also investigate whether there is a way to simply allow zero polynomials and handle the resulting commitments accordingly.

Relatedly, for Ultra Honk we have the additional requirement that all polynomials for which we require a shift must have constant coefficient equal to zero. The current approach to doing this is to add a valid gate with all four wires equal to zero. This only works if there are no public inputs, however, since PI are always placed at the start of the witness polys. A universal solution may be to simple add 0 as a PI by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants