-
Notifications
You must be signed in to change notification settings - Fork 599
chore: remove gate estimation #17879
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
Merged
ledwards2225
merged 15 commits into
merge-train/barretenberg
from
lde/remove-gate-estimation
Oct 29, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
47c6519
delete two unused methods
ledwards2225 f312f64
delete unused and error prone gate estimation methods
ledwards2225 c57daa3
add inefficient but robust method for gate counts
ledwards2225 bbcbae2
cuple fixes
ledwards2225 2403991
fix for bool test; needs review
ledwards2225 19c8899
update bool test comments
ledwards2225 fbc50fa
WiP
ledwards2225 b9415a4
fix merge issues
ledwards2225 0a27805
fix smt tests
ledwards2225 91cd07d
Merge branch 'merge-train/barretenberg' into lde/remove-gate-estimation
ledwards2225 0f388ed
Merge branch 'merge-train/barretenberg' into lde/remove-gate-estimation
ledwards2225 e7ee72b
fix gate count in ecdsa
ledwards2225 32c885c
more ecdsa test fixes
ledwards2225 8e73e5b
Merge branch 'merge-train/barretenberg' into lde/remove-gate-estimation
ledwards2225 17a4f64
Merge branch 'merge-train/barretenberg' into lde/remove-gate-estimation
ledwards2225 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,7 +257,7 @@ template <class Curve> class EcdsaTests : public ::testing::Test { | |
| EXPECT_EQ(signature_result.get_value(), signature_verification_result); | ||
|
|
||
| // Log data | ||
| size_t finalized_num_gates = builder.get_estimated_num_finalized_gates(); | ||
| size_t finalized_num_gates = builder.get_num_finalized_gates_inefficient(); | ||
| info("num gates = ", finalized_num_gates); | ||
| benchmark_info(Builder::NAME_STRING, "ECDSA", "Signature Verification Test", "Gate Count", finalized_num_gates); | ||
|
|
||
|
|
@@ -371,8 +371,8 @@ TYPED_TEST(EcdsaTests, VerifySignature) | |
|
|
||
| size_t finalized_num_gates = | ||
| TestFixture::test_verify_signature(/*random_signature=*/false, TestFixture::TamperingMode::None); | ||
| static constexpr size_t NUM_GATES_SECP256K1 = 41827; | ||
| static constexpr size_t NUM_GATES_SECP256R1 = IsMegaBuilder<typename Curve::Builder> ? 71534 : 71532; | ||
| static constexpr size_t NUM_GATES_SECP256K1 = 41581; | ||
|
Contributor
Author
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. This is likely due to the fact that the old "estimation" method did not account for the de-duplication of NNF arithmetic gates (used in conjunction with biggroup operations) during finalization |
||
| static constexpr size_t NUM_GATES_SECP256R1 = IsMegaBuilder<typename Curve::Builder> ? 70994 : 70992; | ||
| BB_ASSERT_EQ(finalized_num_gates, | ||
| Curve::type == bb::CurveType::SECP256K1 ? NUM_GATES_SECP256K1 : NUM_GATES_SECP256R1, | ||
| "There has been a change in the number of gates for ECDSA verification"); | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In general I don't think tests should be printing anything so I started deleting these then realized they're ubiquitous and relented.