-
Notifications
You must be signed in to change notification settings - Fork 266
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: Encapsulated Goblin #3524
Conversation
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
MiscellaneousTransaction sizes based on how many contracts are deployed in the tx.
|
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.
LG, just left a few comments about comments.
// Add mock data to op queue to simulate interaction with a "first" circuit | ||
perform_op_queue_interactions_for_mock_first_circuit(op_queue); | ||
// Construct an initial circuit; its proof will be recursively verified by the first kernel | ||
info("Initial circuit."); |
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 never intended these prints to stick around but no strong feelings
|
||
// The same composer is used to manage Honk and Merge prover/verifier | ||
proof_system::honk::GoblinUltraComposer composer; | ||
// Construct a circuit with logic resembling that of the "kernel circuit" |
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.
Its a bit misleading to use the kernel terminology here since the point of this test is that there's no recursion. Not a big deal
}; | ||
|
||
/** | ||
* @brief A full goblin proof |
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.
Would you still call this a full Goblin proof?
using TranslatorConsistencyData = barretenberg::TranslationEvaluations; | ||
|
||
std::shared_ptr<OpQueue> op_queue = std::make_shared<OpQueue>(); | ||
bool verified{ true }; |
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 this is leftover and unused?
auto prover = composer.create_prover(instance); | ||
auto ultra_proof = prover.construct_proof(); | ||
|
||
// Construct and verify op queue merge proof |
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.
Just construct, not verify
@@ -4,8 +4,16 @@ | |||
#include "barretenberg/crypto/blake3s/blake3s.hpp" | |||
#include "barretenberg/crypto/pedersen_hash/pedersen.hpp" | |||
|
|||
// #define LOG_CHALLENGES |
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.
Are these supposed to be commented out?
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.
Oh I see
*/ | ||
TEST_F(GoblinRecursionTests, Pseudo) | ||
{ | ||
barretenberg::Goblin goblin; |
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.
Appreciate the X x;
and X x {y};
constructor usage, I find it nice to only see auto when it's actually needed
#include "barretenberg/proof_system/circuit_builder/eccvm/eccvm_circuit_builder.hpp" | ||
#include "barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp" | ||
#include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp" | ||
#include "barretenberg/translator_vm/goblin_translator_composer.hpp" |
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.
Charlie says often that any 'utils' naming is an antipattern and I somewhat agree. I think I agree in that often the exercise of thinking 'what if I didn't name this utils' can be fruitful, but disagree in that sometimes 'bundle of utilities needed to make X work' is GoodEnough(tm)
As an exercise here, I guess I'd call it mock_circuits.hpp instead
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.
Done
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.16.7</summary> ## [0.16.7](aztec-packages-v0.16.6...aztec-packages-v0.16.7) (2023-12-06) ### Features * Encapsulated Goblin ([#3524](#3524)) ([2f08423](2f08423)) ### Bug Fixes * Extract whole archive instead of subset ([#3604](#3604)) ([cb000d8](cb000d8)) ### Documentation * **yellow-paper:** Note hash, nullifier, and public data trees ([#3518](#3518)) ([0e2db8b](0e2db8b)) </details> <details><summary>barretenberg.js: 0.16.7</summary> ## [0.16.7](barretenberg.js-v0.16.6...barretenberg.js-v0.16.7) (2023-12-06) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>barretenberg: 0.16.7</summary> ## [0.16.7](barretenberg-v0.16.6...barretenberg-v0.16.7) (2023-12-06) ### Features * Encapsulated Goblin ([#3524](#3524)) ([2f08423](2f08423)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.16.7</summary> ## [0.16.7](AztecProtocol/aztec-packages@aztec-packages-v0.16.6...aztec-packages-v0.16.7) (2023-12-06) ### Features * Encapsulated Goblin ([#3524](AztecProtocol/aztec-packages#3524)) ([2f08423](AztecProtocol/aztec-packages@2f08423)) ### Bug Fixes * Extract whole archive instead of subset ([#3604](AztecProtocol/aztec-packages#3604)) ([cb000d8](AztecProtocol/aztec-packages@cb000d8)) ### Documentation * **yellow-paper:** Note hash, nullifier, and public data trees ([#3518](AztecProtocol/aztec-packages#3518)) ([0e2db8b](AztecProtocol/aztec-packages@0e2db8b)) </details> <details><summary>barretenberg.js: 0.16.7</summary> ## [0.16.7](AztecProtocol/aztec-packages@barretenberg.js-v0.16.6...barretenberg.js-v0.16.7) (2023-12-06) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>barretenberg: 0.16.7</summary> ## [0.16.7](AztecProtocol/aztec-packages@barretenberg-v0.16.6...barretenberg-v0.16.7) (2023-12-06) ### Features * Encapsulated Goblin ([#3524](AztecProtocol/aztec-packages#3524)) ([2f08423](AztecProtocol/aztec-packages@2f08423)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Adds a class to encapsulate Goblin. Uses this to thread a single transcript through the two VMs for proper challenge generation. The Goblin class has an interface via function:
accumulate
(construct a proof and a merge proof),prove
(run the VM proofs) andverify
(a testing function to natively verify those proofs. Rewrites the Goblin tests accordingly. Adds tests that use recursive verification of Honk proofs. When we have recursive merge verification we will have something worth measuring the assess the performance of Goblin proving.Closes AztecProtocol/barretenberg#785
Closes AztecProtocol/barretenberg#786