|
Zecale - Reconciling Privacy and Scalability on Smart-Contract Chains
0.5
Reference implementation of the Zecale protocol by Clearmatics
|
#include <aggregator_gadget.hpp>


Public Member Functions | |
| aggregator_gadget (libsnark::protoboard< libff::Fr< wppT >> &pb, const verification_key_variable_gadget &vk, const std::array< libsnark::pb_variable_array< libff::Fr< wppT >>, NumProofs > &inputs, const std::array< std::shared_ptr< proof_variable_gadget >, NumProofs > &proofs, const std::array< libsnark::pb_variable< libff::Fr< wppT >>, NumProofs > &proof_results, const std::string &annotation_prefix) | |
| void | generate_r1cs_constraints () |
| void | generate_r1cs_witness (const std::array< const libsnark::r1cs_primary_input< libff::Fr< npp >> *, NumProofs > &in_extended_proofs) |
Gadget that aggregates a batch of nested proofs, creating a single wrapping proof the validity (or possible invalidity) of each proof in the batch.
A note about fields: A proof (PGHR13 or GROTH16) is made of group elements (G1 or G2 for some pairing) where the group elements belong to E/F_q (for G1) or E/F_q^n (for G2), and n varies depending on the setting. As such, the coordinates of the elements in the proof are defined over the field F_q. This field is referred to as the "base field". Primary inputs however are defined over F_r, referred to as the "scalar field".
In order to aggregate proofs, we require that the base field of the curve used in the nested proof (nppT here) be the scalar field for the wrapping pairing (wppT).
Definition at line 32 of file aggregator_gadget.hpp.
| libzecale::aggregator_gadget< wppT, nverifierT, NumProofs >::aggregator_gadget | ( | libsnark::protoboard< libff::Fr< wppT >> & | pb, |
| const verification_key_variable_gadget & | vk, | ||
| const std::array< libsnark::pb_variable_array< libff::Fr< wppT >>, NumProofs > & | inputs, | ||
| const std::array< std::shared_ptr< proof_variable_gadget >, NumProofs > & | proofs, | ||
| const std::array< libsnark::pb_variable< libff::Fr< wppT >>, NumProofs > & | proof_results, | ||
| const std::string & | annotation_prefix | ||
| ) |
| void libzecale::aggregator_gadget< wppT, nverifierT, NumProofs >::generate_r1cs_constraints | ( | ) |
| void libzecale::aggregator_gadget< wppT, nverifierT, NumProofs >::generate_r1cs_witness | ( | const std::array< const libsnark::r1cs_primary_input< libff::Fr< npp >> *, NumProofs > & | in_extended_proofs | ) |
Set the wppT scalar variables based on the nested verification key, proofs and inputs in nppT.
1.8.17