Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_format::RecursionConstraint Struct Reference

RecursionConstraint struct contains information required to recursively verify a proof. More...

#include <recursion_constraint.hpp>

Public Attributes

std::vector< uint32_t > key
 
std::vector< uint32_t > proof
 
std::vector< uint32_t > public_inputs
 
uint32_t key_hash
 
uint32_t proof_type
 
WitnessOrConstant< bb::frpredicate
 

Friends

bool operator== (RecursionConstraint const &lhs, RecursionConstraint const &rhs)=default
 

Detailed Description

RecursionConstraint struct contains information required to recursively verify a proof.

The recursive verifier algorithm produces an aggregation object representing 2 G1 points, which in the code is called PairingPoints. The smart contract Verifier must be aware of this aggregation object in order to complete the recursive verification. We output the PairingPoints object to avoid perfoming pairing calculations in-circuit.

NOTE: Each recursive verification outputs a different PairingPoints object. If a circuit performs multiple recursive verifications we aggregate the PairingPoints into a single PairingPoints using random challenges.

NOTE: If a circuit C recursively verifies a proof \(\pi\) which is the output of another recursive verification, then \(\pi\) contains among its public inputs a PairingPoints object \(P\). Then, C extracts \(P\) from the public inputs, recursively verifies the proof \(\pi\) producing a PairingPoints objects \(P'\), and then aggregates \(P, P'\) to produce a new PairingPoints object \(P_{out}\) which is added to the public inputs of C.

Parameters
keythe indices of the verification key of the circuit whose proof is recursively verified
proofthe indices of the proof being recursively verified
public_inputsthe indices of the public inputs of the proof being recursively verified
key_hashthe index of the hash of the verification key of the circuit whose proof is being recursively verified
proof_typethe type of the proof being recursively verified
predicatewitness or constant determining whether the recursive verification constraint is active

Definition at line 60 of file recursion_constraint.hpp.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( RecursionConstraint const &  lhs,
RecursionConstraint const &  rhs 
)
friend

Member Data Documentation

◆ key

std::vector<uint32_t> acir_format::RecursionConstraint::key

Definition at line 61 of file recursion_constraint.hpp.

◆ key_hash

uint32_t acir_format::RecursionConstraint::key_hash

Definition at line 64 of file recursion_constraint.hpp.

◆ predicate

WitnessOrConstant<bb::fr> acir_format::RecursionConstraint::predicate

Definition at line 66 of file recursion_constraint.hpp.

◆ proof

std::vector<uint32_t> acir_format::RecursionConstraint::proof

Definition at line 62 of file recursion_constraint.hpp.

◆ proof_type

uint32_t acir_format::RecursionConstraint::proof_type

Definition at line 65 of file recursion_constraint.hpp.

◆ public_inputs

std::vector<uint32_t> acir_format::RecursionConstraint::public_inputs

Definition at line 63 of file recursion_constraint.hpp.


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