7#include <gtest/gtest.h>
31 std::shared_ptr<MegaZKVerificationKey>
mega_vk;
37 static constexpr size_t NUM_APP_CIRCUITS = 2;
39 PrivateFunctionExecutionMockCircuitProducer circuit_producer(NUM_APP_CIRCUITS);
41 ClientIVC ivc(circuit_producer.total_num_circuits, trace_settings);
43 for (
size_t idx = 0; idx < circuit_producer.total_num_circuits; idx++) {
44 circuit_producer.construct_and_accumulate_next_circuit(ivc);
49 return { ivc.
get_vk().mega, proof };
57 auto key_witnesses = civc_data.
mega_vk->to_field_elements();
58 auto key_hash_witness = civc_data.
mega_vk->hash();
62 auto [key_indices, key_hash_index, proof_indices, public_inputs_indices] =
71 .proof = proof_indices,
72 .public_inputs = public_inputs_indices,
73 .key_hash = key_hash_index,
74 .proof_type = PROOF_TYPE::CIVC };
91 info(
"Estimate finalized number of gates: ",
builder.get_estimated_num_finalized_gates());
110 std::shared_ptr<VerificationKey> vk_from_valid_witness;
112 AcirProgram program = create_acir_program(civc_data);
113 auto proving_key = get_civc_recursive_verifier_pk(program);
132 std::shared_ptr<VerificationKey> vk_from_constraints;
134 AcirProgram program = create_acir_program(civc_data);
136 auto proving_key = get_civc_recursive_verifier_pk(program);
140 EXPECT_EQ(*vk_from_valid_witness, *vk_from_constraints);
static std::shared_ptr< DeciderProvingKey > get_civc_recursive_verifier_pk(AcirProgram &program)
MegaZKFlavor::VerificationKey MegaZKVerificationKey
static constexpr size_t PUBLIC_INPUTS_SIZE
static AcirProgram create_acir_program(const ClientIVCData &civc_data)
static ClientIVCData get_civc_data(TraceSettings trace_settings)
static void SetUpTestSuite()
Flavor::VerificationKey VerificationKey
The IVC scheme used by the aztec client for private function execution.
Proof prove()
Construct a proof for the IVC, which, if verified, fully establishes its correctness.
VerificationKey get_vk() const
A DeciderProvingKey is normally constructed from a finalized circuit and it contains all the informat...
static constexpr size_t PUBLIC_INPUTS_SIZE
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
The data that is propagated on the public inputs of a rollup circuit.
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
UltraVerifierOutput verify_proof(const Proof &proof, const Proof &ipa_proof={})
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
UltraKeccakFlavor::VerificationKey VerificationKey
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
TEST_F(BoomerangGoblinRecursiveVerifierTests, graph_description_basic)
Construct and check a goblin recursive verification circuit.
Entry point for Barretenberg command-line interface.
std::vector< fr > HonkProof
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::shared_ptr< MegaZKVerificationKey > mega_vk
A full proof for the IVC scheme containing a Mega proof showing correctness of the hiding circuit (wh...
std::vector< FF > to_field_elements() const
Serialize proof to field elements.