Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
HypernovaRecursionConstraintTest Class Reference
Inheritance diagram for HypernovaRecursionConstraintTest:

Classes

struct  KernelGateCounts
 

Public Types

using Builder = MegaCircuitBuilder
 
using FF = Chonk::FF
 
using VerifierInputs = Chonk::VerifierInputs
 
using PairingPoints = Chonk::PairingPoints
 

Static Public Member Functions

static Builder construct_mock_app_circuit (const std::shared_ptr< Chonk > &ivc)
 Constuct a simple arbitrary circuit to represent a mock app circuit.
 
static Chonk::CircuitVerificationKey make_circuit_vk (Builder &builder_in, CircuitKind kind)
 
static void construct_and_accumulate_trailing_kernels (const std::shared_ptr< Chonk > &ivc)
 
static UltraCircuitBuilder create_inner_circuit (size_t log_num_gates=10)
 
static Builder construct_mock_UH_recursion_app_circuit (const std::shared_ptr< Chonk > &ivc, const bool tamper_vk)
 Constuct a mock app circuit with a UH recursive verifier.
 
static RecursionConstraint create_recursion_constraint (const VerifierInputs &input, PROOF_TYPE proof_type, std::vector< FF > &witness)
 Create an ACIR RecursionConstraint given the corresponding verifier inputs.
 
static std::vector< RecursionConstraintmake_hn_recursion_constraints (const std::vector< PROOF_TYPE > &proof_types)
 Build a set of bare HN recursion constraints carrying only the given proof types.
 
static AcirProgram construct_mock_kernel_program (const std::shared_ptr< Chonk > &ivc)
 Generate an acir program {constraints, witness} for a mock kernel.
 
static void construct_and_accumulate_mock_kernel (std::shared_ptr< Chonk > ivc)
 
static void construct_and_accumulate_mock_app (std::shared_ptr< Chonk > ivc)
 
static std::shared_ptr< Chonk::KernelVerificationKeyconstruct_kernel_vk_from_acir_program (AcirProgram &program)
 Construct a kernel circuit VK from an acir program with IVC recursion constraints. Always uses MegaKernelFlavor — for the hiding kernel use MegaZKFlavor directly at the call site.
 
static std::vector< PROOF_TYPEinit_kernel_proof_types (size_t num_apps)
 
static std::vector< PROOF_TYPEinner_kernel_proof_types (size_t num_apps)
 
static std::shared_ptr< Chonk::KernelVerificationKeymock_kernel_vk (const std::vector< PROOF_TYPE > &proof_types)
 
static std::shared_ptr< Chonk::MegaZKVerificationKeymock_hiding_kernel_vk ()
 
static KernelGateCounts mock_kernel_gate_counts (const std::vector< PROOF_TYPE > &proof_types)
 
static std::shared_ptr< Chonk::KernelVerificationKeyreal_init_kernel_vk (size_t num_apps)
 
static std::shared_ptr< Chonk::KernelVerificationKeyreal_inner_kernel_vk (size_t num_apps)
 
static std::shared_ptr< Chonk::KernelVerificationKeyreal_reset_tail_kernel_vk ()
 
static std::shared_ptr< Chonk::MegaZKVerificationKeyreal_hiding_kernel_vk ()
 

Protected Member Functions

void SetUp () override
 

Detailed Description

Definition at line 21 of file hypernova_recursion_constraint.test.cpp.

Member Typedef Documentation

◆ Builder

◆ FF

◆ PairingPoints

◆ VerifierInputs

Member Function Documentation

◆ construct_and_accumulate_mock_app()

static void HypernovaRecursionConstraintTest::construct_and_accumulate_mock_app ( std::shared_ptr< Chonk ivc)
inlinestatic

Definition at line 258 of file hypernova_recursion_constraint.test.cpp.

◆ construct_and_accumulate_mock_kernel()

static void HypernovaRecursionConstraintTest::construct_and_accumulate_mock_kernel ( std::shared_ptr< Chonk ivc)
inlinestatic

Definition at line 241 of file hypernova_recursion_constraint.test.cpp.

◆ construct_and_accumulate_trailing_kernels()

static void HypernovaRecursionConstraintTest::construct_and_accumulate_trailing_kernels ( const std::shared_ptr< Chonk > &  ivc)
inlinestatic

Definition at line 54 of file hypernova_recursion_constraint.test.cpp.

◆ construct_kernel_vk_from_acir_program()

static std::shared_ptr< Chonk::KernelVerificationKey > HypernovaRecursionConstraintTest::construct_kernel_vk_from_acir_program ( AcirProgram program)
inlinestatic

Construct a kernel circuit VK from an acir program with IVC recursion constraints. Always uses MegaKernelFlavor — for the hiding kernel use MegaZKFlavor directly at the call site.

Definition at line 269 of file hypernova_recursion_constraint.test.cpp.

◆ construct_mock_app_circuit()

static Builder HypernovaRecursionConstraintTest::construct_mock_app_circuit ( const std::shared_ptr< Chonk > &  ivc)
inlinestatic

Constuct a simple arbitrary circuit to represent a mock app circuit.

Definition at line 33 of file hypernova_recursion_constraint.test.cpp.

◆ construct_mock_kernel_program()

static AcirProgram HypernovaRecursionConstraintTest::construct_mock_kernel_program ( const std::shared_ptr< Chonk > &  ivc)
inlinestatic

Generate an acir program {constraints, witness} for a mock kernel.

The IVC contains and internal verification queue that contains proofs to be recursively verified. Construct an AcirProgram with a RecursionConstraint for each entry in the ivc verification queue. (In practice these constraints would come directly from calls to verify_proof in noir).

Note
This method needs the number of public inputs in each proof-to-be-verified so they can be extracted and provided separately as is required in the acir constraint system.
Parameters
ivc
inner_circuit_num_pub_inputsNum pub inputs for each circuit whose accumulation is recursively verified
Returns
Builder

Definition at line 201 of file hypernova_recursion_constraint.test.cpp.

◆ construct_mock_UH_recursion_app_circuit()

static Builder HypernovaRecursionConstraintTest::construct_mock_UH_recursion_app_circuit ( const std::shared_ptr< Chonk > &  ivc,
const bool  tamper_vk 
)
inlinestatic

Constuct a mock app circuit with a UH recursive verifier.

Definition at line 96 of file hypernova_recursion_constraint.test.cpp.

◆ create_inner_circuit()

static UltraCircuitBuilder HypernovaRecursionConstraintTest::create_inner_circuit ( size_t  log_num_gates = 10)
inlinestatic

Definition at line 68 of file hypernova_recursion_constraint.test.cpp.

◆ create_recursion_constraint()

static RecursionConstraint HypernovaRecursionConstraintTest::create_recursion_constraint ( const VerifierInputs input,
PROOF_TYPE  proof_type,
std::vector< FF > &  witness 
)
inlinestatic

Create an ACIR RecursionConstraint given the corresponding verifier inputs.

In practice such constraints are created via a call to verify_proof(...) in noir

Parameters
inputbberg style proof and verification key
witnessArray of witnesses into which the above data is placed
Returns
RecursionConstraint

Definition at line 150 of file hypernova_recursion_constraint.test.cpp.

◆ init_kernel_proof_types()

static std::vector< PROOF_TYPE > HypernovaRecursionConstraintTest::init_kernel_proof_types ( size_t  num_apps)
inlinestatic

Definition at line 286 of file hypernova_recursion_constraint.test.cpp.

◆ inner_kernel_proof_types()

static std::vector< PROOF_TYPE > HypernovaRecursionConstraintTest::inner_kernel_proof_types ( size_t  num_apps)
inlinestatic

Definition at line 294 of file hypernova_recursion_constraint.test.cpp.

◆ make_circuit_vk()

static Chonk::CircuitVerificationKey HypernovaRecursionConstraintTest::make_circuit_vk ( Builder builder_in,
CircuitKind  kind 
)
inlinestatic

Definition at line 42 of file hypernova_recursion_constraint.test.cpp.

◆ make_hn_recursion_constraints()

static std::vector< RecursionConstraint > HypernovaRecursionConstraintTest::make_hn_recursion_constraints ( const std::vector< PROOF_TYPE > &  proof_types)
inlinestatic

Build a set of bare HN recursion constraints carrying only the given proof types.

This is the input the Noir compiler hands to barretenberg: the proof type per recursive verification, with no proof/VK witnesses yet. Feeding it to create_mock_chonk_from_constraints exercises the same mock-IVC construction used by the production write-VK path.

Definition at line 176 of file hypernova_recursion_constraint.test.cpp.

◆ mock_hiding_kernel_vk()

static std::shared_ptr< Chonk::MegaZKVerificationKey > HypernovaRecursionConstraintTest::mock_hiding_kernel_vk ( )
inlinestatic

Definition at line 309 of file hypernova_recursion_constraint.test.cpp.

◆ mock_kernel_gate_counts()

static KernelGateCounts HypernovaRecursionConstraintTest::mock_kernel_gate_counts ( const std::vector< PROOF_TYPE > &  proof_types)
inlinestatic

Definition at line 327 of file hypernova_recursion_constraint.test.cpp.

◆ mock_kernel_vk()

static std::shared_ptr< Chonk::KernelVerificationKey > HypernovaRecursionConstraintTest::mock_kernel_vk ( const std::vector< PROOF_TYPE > &  proof_types)
inlinestatic

Definition at line 300 of file hypernova_recursion_constraint.test.cpp.

◆ real_hiding_kernel_vk()

static std::shared_ptr< Chonk::MegaZKVerificationKey > HypernovaRecursionConstraintTest::real_hiding_kernel_vk ( )
inlinestatic

Definition at line 387 of file hypernova_recursion_constraint.test.cpp.

◆ real_init_kernel_vk()

static std::shared_ptr< Chonk::KernelVerificationKey > HypernovaRecursionConstraintTest::real_init_kernel_vk ( size_t  num_apps)
inlinestatic

Definition at line 340 of file hypernova_recursion_constraint.test.cpp.

◆ real_inner_kernel_vk()

static std::shared_ptr< Chonk::KernelVerificationKey > HypernovaRecursionConstraintTest::real_inner_kernel_vk ( size_t  num_apps)
inlinestatic

Definition at line 355 of file hypernova_recursion_constraint.test.cpp.

◆ real_reset_tail_kernel_vk()

static std::shared_ptr< Chonk::KernelVerificationKey > HypernovaRecursionConstraintTest::real_reset_tail_kernel_vk ( )
inlinestatic

Definition at line 373 of file hypernova_recursion_constraint.test.cpp.

◆ SetUp()

void HypernovaRecursionConstraintTest::SetUp ( )
inlineoverrideprotected

Definition at line 398 of file hypernova_recursion_constraint.test.cpp.


The documentation for this class was generated from the following file: