-
Notifications
You must be signed in to change notification settings - Fork 316
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
feat: mega zk features #9774
Merged
Merged
feat: mega zk features #9774
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
2c37dc4
shplemini supports opening of libra masking univariates
iakovenkos 7bbacc2
clean-up
iakovenkos c78ed6e
de-coupled sumcheck from zk sumcheck data
iakovenkos fe93b4d
eccvm native proves/verifies evals of masking polys
iakovenkos df7f731
debugging eccvm recursive
iakovenkos 0b3e50a
debugggging still
iakovenkos 525ae12
Merge branch 'master' into si/zk-sumcheck-plus-shplemini
iakovenkos 4298d52
eccvm recursive fixed
iakovenkos bf468eb
opening proofs for libra polynomials in translator
iakovenkos ab9b81e
translator relation degree changes reverted
iakovenkos aca70fa
some clean-up
iakovenkos b7584ba
removed redundant line
iakovenkos 6403477
clean-up
iakovenkos bec76b9
Merge branch 'master' into si/zk-sumcheck-plus-shplemini
iakovenkos 8a1e95f
fix: link zero constraint relation in translator
iakovenkos 2504556
fix bb native tests
iakovenkos d18f0c2
Merge branch 'master' into si/zk-sumcheck-plus-shplemini
iakovenkos 937af2a
clean up
iakovenkos 6824085
Merge branch 'si/zk-sumcheck-plus-shplemini' of github.com:AztecProto…
iakovenkos 95d4160
fix build
iakovenkos 6d35080
evaluation proofs for libra masking univariates in Mega + transcript …
iakovenkos ac0afe5
megahonk tests + bench
iakovenkos b7b9fae
mega with k recursive
iakovenkos db32e48
fixed mega transcript test + oink headers clean-up
iakovenkos 69b913e
clean-up after review
iakovenkos ed57e42
Merge branch 'master' into si/zk-sumcheck-plus-shplemini
iakovenkos 1775d41
Merge branch 'master' into si/zk-sumcheck-plus-shplemini
iakovenkos e8c691a
resolve conflicts with 'master'
iakovenkos 2dc2170
Merge branch 'si/zk-sumcheck-plus-shplemini' into si/zk-sumcheck-mega
iakovenkos 3157236
clean up and renaming MegaFlavorWithZK to MegaZKFlavor
iakovenkos 6a32b27
Merge branch 'master' into si/zk-sumcheck-mega
iakovenkos 84bf601
more clean up after merging
iakovenkos f2d4eb0
cleaning
iakovenkos a94d29a
Merge branch 'master' into si/zk-sumcheck-mega
iakovenkos cef08d4
flavor clean-up
iakovenkos 3fe9ed7
Merge branch 'si/zk-sumcheck-mega' of github.com:AztecProtocol/aztec-…
iakovenkos c24adea
addressing comments
iakovenkos 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
51 changes: 51 additions & 0 deletions
51
barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/mega_zk_honk.bench.cpp
This file contains 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include <benchmark/benchmark.h> | ||
|
||
#include "barretenberg/benchmark/ultra_bench/mock_circuits.hpp" | ||
#include "barretenberg/stdlib_circuit_builders/mega_circuit_builder.hpp" | ||
|
||
using namespace benchmark; | ||
using namespace bb; | ||
|
||
/** | ||
* @brief Benchmark: Construction of a Ultra Honk proof for a circuit determined by the provided circuit function | ||
*/ | ||
static void construct_proof_megahonk_zk(State& state, | ||
void (*test_circuit_function)(MegaCircuitBuilder&, size_t)) noexcept | ||
{ | ||
size_t num_iterations = 10; // 10x the circuit | ||
bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>( | ||
state, test_circuit_function, num_iterations); | ||
} | ||
|
||
/** | ||
* @brief Benchmark: Construction of a Ultra Plonk proof with 2**n gates | ||
*/ | ||
static void construct_proof_megahonk_power_of_2_zk(State& state) noexcept | ||
{ | ||
auto log2_of_gates = static_cast<size_t>(state.range(0)); | ||
bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>( | ||
state, &bb::mock_circuits::generate_basic_arithmetic_circuit<MegaCircuitBuilder>, log2_of_gates); | ||
} | ||
|
||
// Define benchmarks | ||
|
||
// This exists due to an issue where get_row was blowing up in time | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, sha256, &stdlib::generate_sha256_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, keccak, &stdlib::generate_keccak_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, | ||
ecdsa_verification, | ||
&stdlib::generate_ecdsa_verification_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, | ||
merkle_membership, | ||
&stdlib::generate_merkle_membership_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
|
||
BENCHMARK(construct_proof_megahonk_power_of_2_zk) | ||
// 2**15 gates to 2**20 gates | ||
->DenseRange(15, 20) | ||
->Unit(kMillisecond); | ||
|
||
BENCHMARK_MAIN(); |
This file contains 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 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 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.
I think that instead of duplicating the mega honk benchmark file you could just template the MegaHonk benchmark
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.
I tried honestly, but it's not as nice as with the typed test suites, so prob we could keep two separate bench files for now (and maybe delete the one without zk, when we are done with zk)