8#include <gtest/gtest.h>
32 std::shared_ptr<MegaZKVerificationKey>
mega_vk;
38 static constexpr size_t NUM_APP_CIRCUITS = 1;
40 PrivateFunctionExecutionMockCircuitProducer circuit_producer(NUM_APP_CIRCUITS);
41 const size_t num_circuits = circuit_producer.total_num_circuits;
42 Chonk ivc{ num_circuits };
44 for (
size_t j = 0; j < num_circuits; ++j) {
45 circuit_producer.construct_and_accumulate_next_circuit(ivc);
49 return { ivc.get_vk().mega, proof };
57 auto key_witnesses = chonk_data.
mega_vk->to_field_elements();
58 auto key_hash_witness = chonk_data.
mega_vk->hash();
62 auto [key_indices, key_hash_index, proof_indices, public_inputs_indices] =
68 static_cast<size_t>(chonk_data.
mega_vk->num_public_inputs) -
72 .proof = proof_indices,
73 .public_inputs = public_inputs_indices,
74 .key_hash = key_hash_index,
75 .proof_type = PROOF_TYPE::CHONK };
90 auto builder = create_circuit<Builder>(program, { .has_ipa_claim =
true });
95 return prover_instance;
109 std::shared_ptr<VerificationKey> vk_from_valid_witness;
111 AcirProgram program = create_acir_program(chonk_data);
112 auto prover_instance = get_chonk_recursive_verifier_pk(program);
131 std::shared_ptr<VerificationKey> vk_from_constraints;
133 AcirProgram program = create_acir_program(chonk_data);
135 auto prover_instance = get_chonk_recursive_verifier_pk(program);
139 EXPECT_EQ(*vk_from_valid_witness, *vk_from_constraints);
148 AcirProgram program = create_acir_program(chonk_data);
151 auto builder = create_circuit<Builder>(program, metadata);
static ChonkData get_chonk_data()
static void SetUpTestSuite()
Flavor::VerificationKey VerificationKey
MegaZKFlavor::VerificationKey MegaZKVerificationKey
static constexpr size_t PUBLIC_INPUTS_SIZE
static std::shared_ptr< ProverInstance > get_chonk_recursive_verifier_pk(AcirProgram &program)
static AcirProgram create_acir_program(const ChonkData &chonk_data)
The IVC scheme used by the aztec client for private function execution.
static constexpr size_t PUBLIC_INPUTS_SIZE
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
A ProverInstance is normally constructed from a finalized circuit and it contains all the information...
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 kernel (whi...
std::vector< FF > to_field_elements() const
Serialize proof to field elements.