From 84a0da502fba97c2f4b252d6afb53ef09b65863e Mon Sep 17 00:00:00 2001 From: IlyasRidhuan Date: Tue, 25 Jun 2024 09:19:15 +0000 Subject: [PATCH] fix(avm): update codegen --- .../cpp/src/barretenberg/vm/generated/avm_prover.hpp | 2 ++ .../cpp/src/barretenberg/vm/generated/avm_verifier.cpp | 7 +++++-- bb-pilcom/bb-pil-backend/src/prover_builder.rs | 4 ++-- bb-pilcom/bb-pil-backend/src/verifier_builder.rs | 7 +++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.hpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.hpp index 4fe30cb7fcd..3f95563ac06 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.hpp @@ -16,6 +16,8 @@ class AvmProver { using Flavor = AvmFlavor; using FF = Flavor::FF; using PCS = Flavor::PCS; + using Curve = Flavor::Curve; + using ZeroMorph = ZeroMorphProver_; using PCSCommitmentKey = Flavor::CommitmentKey; using ProvingKey = Flavor::ProvingKey; using Polynomial = Flavor::Polynomial; diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp index 5fe89bc3d48..0a863144aad 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp @@ -52,7 +52,8 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, const std::vector; + // using Curve = Flavor::Curve; + // using ZeroMorph = ZeroMorphVerifier_; using VerifierCommitments = Flavor::VerifierCommitments; using CommitmentLabels = Flavor::CommitmentLabels; @@ -739,13 +740,15 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, const std::vectorget_g1_identity(), // transcript); + // auto pairing_points = PCS::reduce_verify(opening_claim, transcript); // auto verified = pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); // return sumcheck_verified.value() && verified; return sumcheck_verified.value(); diff --git a/bb-pilcom/bb-pil-backend/src/prover_builder.rs b/bb-pilcom/bb-pil-backend/src/prover_builder.rs index be412cf0d57..ddd8f370333 100644 --- a/bb-pilcom/bb-pil-backend/src/prover_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/prover_builder.rs @@ -25,6 +25,8 @@ impl ProverBuilder for BBFiles { using Flavor = {name}Flavor; using FF = Flavor::FF; using PCS = Flavor::PCS; + using Curve = Flavor::Curve; + using ZeroMorph = ZeroMorphProver_; using PCSCommitmentKey = Flavor::CommitmentKey; using ProvingKey = Flavor::ProvingKey; using Polynomial = Flavor::Polynomial; @@ -64,8 +66,6 @@ impl ProverBuilder for BBFiles { std::shared_ptr commitment_key; - using ZeroMorph = ZeroMorphProver_; - private: HonkProof proof; }}; diff --git a/bb-pilcom/bb-pil-backend/src/verifier_builder.rs b/bb-pilcom/bb-pil-backend/src/verifier_builder.rs index 710b9cafadc..ed93731b67f 100644 --- a/bb-pilcom/bb-pil-backend/src/verifier_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/verifier_builder.rs @@ -132,7 +132,8 @@ impl VerifierBuilder for BBFiles { using FF = Flavor::FF; using Commitment = Flavor::Commitment; // using PCS = Flavor::PCS; - // using ZeroMorph = ZeroMorphVerifier_; + // using Curve = Flavor::Curve; + // using ZeroMorph = ZeroMorphVerifier_; using VerifierCommitments = Flavor::VerifierCommitments; using CommitmentLabels = Flavor::CommitmentLabels; @@ -182,13 +183,15 @@ impl VerifierBuilder for BBFiles { // Execute ZeroMorph rounds. See https://hackmd.io/dlf9xEwhTQyE3hiGbq4FsA?view for a complete description of the // unrolled protocol. // NOTE: temporarily disabled - facing integration issues - // auto pairing_points = ZeroMorph::verify(commitments.get_unshifted(), + // auto opening_claim = ZeroMorph::verify(commitments.get_unshifted(), // commitments.get_to_be_shifted(), // claimed_evaluations.get_unshifted(), // claimed_evaluations.get_shifted(), // multivariate_challenge, + // pcs_verification_key->get_g1_identity(), // transcript); + // auto pairing_points = PCS::reduce_verify(opening_claim, transcript); // auto verified = pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); // return sumcheck_verified.value() && verified; return sumcheck_verified.value();