diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.cpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.cpp index 461c3a70f40..e2fcc418203 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.cpp @@ -6,22 +6,23 @@ namespace bb { template -void ProtogalaxyVerifier_::receive_and_finalise_key(const std::shared_ptr& keys, - const std::string& domain_separator) +void ProtogalaxyVerifier_::run_oink_verifier_on_one_incomplete_key( + const std::shared_ptr& keys, const std::string& domain_separator) { OinkVerifier oink_verifier{ keys, transcript, domain_separator + '_' }; oink_verifier.verify(); } template -void ProtogalaxyVerifier_::prepare_for_folding(const std::vector& fold_data) +void ProtogalaxyVerifier_::run_oink_verifier_on_each_incomplete_key( + const std::vector& proof) { - transcript = std::make_shared(fold_data); + transcript = std::make_shared(proof); size_t index = 0; auto key = keys_to_fold[0]; auto domain_separator = std::to_string(index); if (!key->is_accumulator) { - receive_and_finalise_key(key, domain_separator); + run_oink_verifier_on_one_incomplete_key(key, domain_separator); key->target_sum = 0; key->gate_challenges = std::vector(static_cast(key->verification_key->log_circuit_size), 0); } @@ -30,15 +31,15 @@ void ProtogalaxyVerifier_::prepare_for_folding(const st for (auto it = keys_to_fold.begin() + 1; it != keys_to_fold.end(); it++, index++) { auto key = *it; auto domain_separator = std::to_string(index); - receive_and_finalise_key(key, domain_separator); + run_oink_verifier_on_one_incomplete_key(key, domain_separator); } } template std::shared_ptr ProtogalaxyVerifier_< - DeciderVerificationKeys>::verify_folding_proof(const std::vector& fold_data) + DeciderVerificationKeys>::verify_folding_proof(const std::vector& proof) { - prepare_for_folding(fold_data); + run_oink_verifier_on_each_incomplete_key(proof); auto delta = transcript->template get_challenge("delta"); const std::shared_ptr& accumulator = keys_to_fold[0]; // WORKTODO: move diff --git a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp index de2119c9b8a..7e1ed7c989f 100644 --- a/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/protogalaxy/protogalaxy_verifier.hpp @@ -25,23 +25,21 @@ template class ProtogalaxyVerifier_ { std::shared_ptr transcript = std::make_shared(); - CommitmentLabels commitment_labels; - ProtogalaxyVerifier_(const std::vector>& keys) : keys_to_fold(DeciderVerificationKeys(keys)){}; ~ProtogalaxyVerifier_() = default; /** - * @brief Instatiate the vks and the transcript. - * - * @param fold_data The data transmitted via the transcript by the prover. + * @brief Process the public data ϕ for the decider verification keys to be folded. */ - void prepare_for_folding(const std::vector&); + void run_oink_verifier_on_one_incomplete_key(const std::shared_ptr&, const std::string&); /** - * @brief Process the public data ϕ for the decider verification keys to be folded. + * @brief Instatiate the vks and the transcript. + * + * @param fold_data The data transmitted via the transcript by the prover. */ - void receive_and_finalise_key(const std::shared_ptr&, const std::string&); + void run_oink_verifier_on_each_incomplete_key(const std::vector&); /** * @brief Run the folding protocol on the verifier side to establish whether the public data ϕ of the new