barretenberg
Loading...
Searching...
No Matches
Public Member Functions | List of all members
acir_proofs::AcirComposer Class Reference

A class responsible for marshalling construction of keys and prover and verifier instances used to prove satisfiability of circuits written in ACIR. More...

#include <acir_composer.hpp>

Public Member Functions

 AcirComposer (size_t size_hint=0, bool verbose=true)
 
template<typename Builder = UltraCircuitBuilder>
void create_circuit (acir_format::acir_format &constraint_system)
 
std::shared_ptr< proof_system::plonk::proving_keyinit_proving_key (acir_format::acir_format &constraint_system)
 
std::vector< uint8_t > create_proof (acir_format::acir_format &constraint_system, acir_format::WitnessVector &witness, bool is_recursive)
 
void load_verification_key (proof_system::plonk::verification_key_data &&data)
 
std::shared_ptr< proof_system::plonk::verification_keyinit_verification_key ()
 
bool verify_proof (std::vector< uint8_t > const &proof, bool is_recursive)
 
std::string get_solidity_verifier ()
 
size_t get_exact_circuit_size ()
 
size_t get_total_circuit_size ()
 
size_t get_circuit_subgroup_size ()
 
std::vector< barretenberg::frserialize_proof_into_fields (std::vector< uint8_t > const &proof, size_t num_inner_public_inputs)
 Takes in a proof buffer and converts into a vector of field elements. The Recursion opcode requires the proof serialized as a vector of witnesses. Use this method to get the witness values!
 
std::vector< barretenberg::frserialize_verification_key_into_fields ()
 Takes in a verification key buffer and converts into a vector of field elements. The Recursion opcode requires the vk serialized as a vector of witnesses. Use this method to get the witness values! The composer should already have a verification key initialized.
 
void create_goblin_circuit (acir_format::acir_format &constraint_system, acir_format::WitnessVector &witness)
 
std::vector< uint8_t > create_goblin_proof ()
 
bool verify_goblin_proof (std::vector< uint8_t > const &proof)
 

Detailed Description

A class responsible for marshalling construction of keys and prover and verifier instances used to prove satisfiability of circuits written in ACIR.

Todo:
: This reflects the design of Plonk. Perhaps we should author new classes to better reflect the structure of the newer code since there's much more of that code now?

Member Function Documentation

◆ serialize_proof_into_fields()

std::vector< barretenberg::fr > acir_proofs::AcirComposer::serialize_proof_into_fields ( std::vector< uint8_t > const &  proof,
size_t  num_inner_public_inputs 
)

Takes in a proof buffer and converts into a vector of field elements. The Recursion opcode requires the proof serialized as a vector of witnesses. Use this method to get the witness values!

TODO: We should change this to return a proof without public inputs, since that is what std::verify_proof TODO: takes.

Parameters
proof
num_inner_public_inputs- number of public inputs on the proof being serialized

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