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

Fix circuit size estimation for GoblinUltraHonk #6161

Closed
vezenovm opened this issue May 2, 2024 · 0 comments · Fixed by #6164
Closed

Fix circuit size estimation for GoblinUltraHonk #6161

vezenovm opened this issue May 2, 2024 · 0 comments · Fixed by #6164

Comments

@vezenovm
Copy link
Contributor

vezenovm commented May 2, 2024

In this PR (#6138) we started getting this failure https://app.circleci.com/pipelines/github/AztecProtocol/aztec-packages/37852/workflows/1dab32cb-5733-425a-9793-c49d784ebe42/jobs/1732326 on the witness_compression ACIR test. We fail on this assertion (degree <= srs->get_monomial_size()). Inside the ProverInstance constructor it looks like we are adding multiple gates that are not being accounted for by get_total_circuit_size() on the ultra circuit builder (which is the method used in the DSL package for estimating the circuit sizes). These extra gates added in the prover instance looks like the most likely culprit. prover_instance.cpp then calls compute_dyadic_size which looks to does similar things to get_total_circuit_size() in the ultra circuit builder except with also including ecc ops as part of the trace's size. We should reimplement get_total_circuit_size for the goblin ultra builder to account for any extra reserved gates.

@github-project-automation github-project-automation bot moved this to Todo in A3 May 2, 2024
lucasxia01 pushed a commit that referenced this issue May 2, 2024
Resolves #6161

Look into the issue for more context on the problem.

I moved `add_gates_to_ensure_all_polys_are_non_zero` to be part of
`finalize_circuit` for both the goblin and ultra builder. Then upon
creating an AcirFormat circuit we now call finalize_circuit. Previously
we were having to attach an additional buffer as a hack as we were using
`get_total_circuit_size` which correctly estimated a finalized circuit
size for plonk, but not for Honk. We will now have these additional
gates for UltraPlonk as well, but this is fine as they are not that many
gates (~12 gates) and we are removing plonk anyway.
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 May 2, 2024
AztecBot pushed a commit to AztecProtocol/barretenberg that referenced this issue May 3, 2024
Resolves AztecProtocol/aztec-packages#6161

Look into the issue for more context on the problem.

I moved `add_gates_to_ensure_all_polys_are_non_zero` to be part of
`finalize_circuit` for both the goblin and ultra builder. Then upon
creating an AcirFormat circuit we now call finalize_circuit. Previously
we were having to attach an additional buffer as a hack as we were using
`get_total_circuit_size` which correctly estimated a finalized circuit
size for plonk, but not for Honk. We will now have these additional
gates for UltraPlonk as well, but this is fine as they are not that many
gates (~12 gates) and we are removing plonk anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant