-
Notifications
You must be signed in to change notification settings - Fork 234
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: Correct circuit size estimation for UltraHonk #6164
Changes from 11 commits
9df73e4
8aaaf0c
fd33995
b1c112f
546c99d
a1bd019
954a446
2cb3442
f2ba7f0
cedf262
f83c4f8
ab28152
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,10 @@ namespace bb { | |
|
||
template <typename FF> void GoblinUltraCircuitBuilder_<FF>::finalize_circuit() | ||
{ | ||
UltraCircuitBuilder_<UltraHonkArith<FF>>::finalize_circuit(); | ||
if (!this->circuit_finalized) { | ||
add_gates_to_ensure_all_polys_are_non_zero(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe should change this to add_goblin_ultra_gates_.... to be clear that this only adds the goblin_ultra gates and not the ultra ones anymore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
UltraCircuitBuilder_<UltraHonkArith<FF>>::finalize_circuit(); | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -25,9 +28,6 @@ template <typename FF> void GoblinUltraCircuitBuilder_<FF>::finalize_circuit() | |
// polynomials is zero, which is required for them to be shiftable. | ||
template <typename FF> void GoblinUltraCircuitBuilder_<FF>::add_gates_to_ensure_all_polys_are_non_zero() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update name and comment here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
{ | ||
// Most polynomials are handled via the conventional Ultra method | ||
UltraCircuitBuilder_<UltraHonkArith<FF>>::add_gates_to_ensure_all_polys_are_non_zero(); | ||
|
||
// All that remains is to handle databus related and poseidon2 related polynomials. In what follows we populate the | ||
// calldata with some mock data then constuct a single calldata read gate | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this not just be builder.num_gates now? also add a comment explaining why we don't have to add any buffers/do any computations here anymore