-
Notifications
You must be signed in to change notification settings - Fork 270
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: sumcheck part of ECCVM recursive verifier instantiated as an UltraCircuit #6413
Conversation
…es into mm/eccvm-work
…rotocol/aztec-packages into mm/stdlib-verifier-commitment-key
@@ -417,7 +417,8 @@ template <typename Flavor> class SumcheckVerifier { | |||
bool checked = false; | |||
//! [Final Verification Step] | |||
if constexpr (IsRecursiveFlavor<Flavor>) { | |||
checked = (full_honk_relation_purported_value == round.target_total_sum).get_value(); | |||
full_honk_relation_purported_value.assert_equal(round.target_total_sum); |
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.
we don't have an == operator in bigfield
@@ -9,20 +9,22 @@ namespace bb { | |||
* | |||
* @tparam Builder | |||
*/ | |||
template <typename Builder> class VerifierCommitmentKey<stdlib::bn254<Builder>> { | |||
template <typename Curve> class VerifierCommitmentKey { |
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.
Getting this to mirror exactly it's native counterpart which is required to construct the vk for the recursive verifier
@@ -70,6 +72,59 @@ template <typename BuilderType> class ECCVMRecursiveFlavor_ { | |||
using Base::Base; | |||
}; | |||
|
|||
using VerifierCommitmentKey = VerifierCommitmentKey<Curve>; | |||
/** | |||
* @brief The verification key is responsible for storing the the commitments to the precomputed (non-witnessk) |
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.
typo (witnessk)
* polynomials used by the verifier. | ||
* | ||
* @note Note the discrepancy with what sort of data is stored here vs in the proving key. We may want to | ||
* resolve that, and split out separate PrecomputedPolynom ials/Commitments data for clarity but also for |
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.
space typo
@@ -75,6 +75,16 @@ template <typename Builder, typename T> class bigfield { | |||
: bigfield(nullptr, uint256_t(native(value))) | |||
{} | |||
|
|||
// NOLINTNEXTLINE(google-runtime-int) intended behavior | |||
bigfield(const unsigned long value) | |||
: bigfield(nullptr, uint256_t(native(value))) |
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 the unsigned case there is no need to do native
typename G1::element a = generators[0]; | ||
typename G1::element b = generators[1]; | ||
typename G1::element c = generators[2]; | ||
std::shared_ptr<ECCOpQueue> op_queue = std::make_shared<ECCOpQueue>(); |
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.
Why did you change this?
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.
To make it uniform to the recursive verifier but can revert
explicit ECCVMRecursiveVerifier_(Builder* builder, | ||
const std::shared_ptr<NativeVerificationKey>& native_verifier_key); | ||
|
||
bool verify_proof(const HonkProof& proof); // return type?! |
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.
Could you switch it to stdlib_proof
|
||
if (circuit_size != key->circuit_size) { | ||
return false; | ||
for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { |
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.
nice
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. Proof generationEach column represents the number of threads used in proof generation.
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 kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
* master: feat: prepare circuit output for validation (#6678) chore: stop building/publishing `acvm_backend.wasm` (#6584) chore: add bench programs (#6566) chore: make public data update requests, note hashes, and unencrypted logs readonly in TS (#6658) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg feat: update honk recursion constraint (#6545) feat: Add code-workspace and update build dirs (#6723) feat: Sync from noir (#6717) feat: folding acir programs (#6685) feat: sumcheck part of ECCVM recursive verifier instantiated as an UltraCircuit (#6413)
This PR adds the ECCVM recursive verifier up to sumcheck (PCS incoming) with the necessary additional functionality in bigfield. It also removes some unnecessary fields in flavors that are obsolete.