Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <cp_handler.hpp>
Public Member Functions | |
compliance_predicate_handler (const protoboardT &pb, const size_t name, const size_t type, const size_t max_arity, const bool relies_on_same_type_inputs, const std::set< size_t > accepted_input_types=std::set< size_t >()) | |
virtual void | generate_r1cs_constraints ()=0 |
virtual void | generate_r1cs_witness (const std::vector< std::shared_ptr< r1cs_pcd_message< FieldT >>> &incoming_message_values, const std::shared_ptr< r1cs_pcd_local_data< FieldT >> &local_data_value) |
r1cs_pcd_compliance_predicate< FieldT > | get_compliance_predicate () const |
r1cs_variable_assignment< FieldT > | get_full_variable_assignment () const |
std::shared_ptr< r1cs_pcd_message< FieldT > > | get_outgoing_message () const |
size_t | get_arity () const |
std::shared_ptr< r1cs_pcd_message< FieldT > > | get_incoming_message (const size_t message_idx) const |
std::shared_ptr< r1cs_pcd_local_data< FieldT > > | get_local_data () const |
r1cs_variable_assignment< FieldT > | get_witness () const |
Public Attributes | |
const size_t | name |
const size_t | type |
const size_t | max_arity |
const bool | relies_on_same_type_inputs |
const std::set< size_t > | accepted_input_types |
Protected Attributes | |
protoboardT | pb |
std::shared_ptr< r1cs_pcd_message_variable< FieldT > > | outgoing_message |
pb_variable< FieldT > | arity |
std::vector< std::shared_ptr< r1cs_pcd_message_variable< FieldT > > > | incoming_messages |
std::shared_ptr< r1cs_pcd_local_data_variable< FieldT > > | local_data |
A base class for creating compliance predicates.
Definition at line 82 of file cp_handler.hpp.
libsnark::compliance_predicate_handler< FieldT, protoboardT >::compliance_predicate_handler | ( | const protoboardT & | pb, |
const size_t | name, | ||
const size_t | type, | ||
const size_t | max_arity, | ||
const bool | relies_on_same_type_inputs, | ||
const std::set< size_t > | accepted_input_types = std::set< size_t >() |
||
) |
|
pure virtual |
Implemented in libsnark::ram_compliance_predicate_handler< ramT >, and libsnark::tally_cp_handler< FieldT >.
|
virtual |
Reimplemented in libsnark::tally_cp_handler< FieldT >.
size_t libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_arity | ( | ) | const |
r1cs_pcd_compliance_predicate<FieldT> libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_compliance_predicate | ( | ) | const |
r1cs_variable_assignment<FieldT> libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_full_variable_assignment | ( | ) | const |
std::shared_ptr<r1cs_pcd_message<FieldT> > libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_incoming_message | ( | const size_t | message_idx | ) | const |
std::shared_ptr<r1cs_pcd_local_data<FieldT> > libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_local_data | ( | ) | const |
std::shared_ptr<r1cs_pcd_message<FieldT> > libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_outgoing_message | ( | ) | const |
r1cs_variable_assignment<FieldT> libsnark::compliance_predicate_handler< FieldT, protoboardT >::get_witness | ( | ) | const |
const std::set<size_t> libsnark::compliance_predicate_handler< FieldT, protoboardT >::accepted_input_types |
Definition at line 98 of file cp_handler.hpp.
|
protected |
Definition at line 88 of file cp_handler.hpp.
|
protected |
Definition at line 90 of file cp_handler.hpp.
|
protected |
Definition at line 91 of file cp_handler.hpp.
const size_t libsnark::compliance_predicate_handler< FieldT, protoboardT >::max_arity |
Definition at line 96 of file cp_handler.hpp.
const size_t libsnark::compliance_predicate_handler< FieldT, protoboardT >::name |
Definition at line 94 of file cp_handler.hpp.
|
protected |
Definition at line 87 of file cp_handler.hpp.
|
protected |
Definition at line 85 of file cp_handler.hpp.
const bool libsnark::compliance_predicate_handler< FieldT, protoboardT >::relies_on_same_type_inputs |
Definition at line 97 of file cp_handler.hpp.
const size_t libsnark::compliance_predicate_handler< FieldT, protoboardT >::type |
Definition at line 95 of file cp_handler.hpp.