|
barretenberg
|
Public Types | |
| using | FF = FF_ |
| using | EmbeddedCurve = std::conditional_t< std::same_as< FF, barretenberg::g1::coordinate_field >, curve::BN254, curve::Grumpkin > |
Public Member Functions | |
| CircuitBuilderBase (size_t size_hint=0) | |
| CircuitBuilderBase (const CircuitBuilderBase &other)=default | |
| CircuitBuilderBase (CircuitBuilderBase &&other) noexcept=default | |
| CircuitBuilderBase & | operator= (const CircuitBuilderBase &other)=default |
| CircuitBuilderBase & | operator= (CircuitBuilderBase &&other) noexcept=default |
| virtual size_t | get_num_gates () const |
| virtual void | print_num_gates () const |
| virtual size_t | get_num_variables () const |
| virtual void | create_add_gate (const add_triple_< FF > &in)=0 |
| virtual void | create_mul_gate (const mul_triple_< FF > &in)=0 |
| virtual void | create_bool_gate (const uint32_t a)=0 |
| virtual void | create_poly_gate (const poly_triple_< FF > &in)=0 |
| virtual size_t | get_num_constant_gates () const =0 |
| uint32_t | get_first_variable_in_class (uint32_t index) const |
| void | update_real_variable_indices (uint32_t index, uint32_t new_real_index) |
| FF | get_variable (const uint32_t index) const |
| const FF & | get_variable_reference (const uint32_t index) const |
| uint32_t | get_public_input_index (const uint32_t witness_index) const |
| FF | get_public_input (const uint32_t index) const |
| std::vector< FF > | get_public_inputs () const |
| virtual uint32_t | add_variable (const FF &in) |
| virtual void | set_variable_name (uint32_t index, const std::string &name) |
| virtual void | update_variable_names (uint32_t index) |
| virtual void | finalize_variable_names () |
| virtual msgpack::sbuffer | export_circuit () |
| virtual uint32_t | add_public_variable (const FF &in) |
| virtual void | set_public_input (const uint32_t witness_index) |
| virtual void | assert_equal (const uint32_t a_idx, const uint32_t b_idx, std::string const &msg="assert_equal") |
| size_t | get_circuit_subgroup_size (const size_t num_gates) const |
| size_t | get_num_public_inputs () const |
| void | assert_valid_variables (const std::vector< uint32_t > &variable_indices) |
| bool | is_valid_variable (uint32_t variable_index) |
| void | add_recursive_proof (const std::vector< uint32_t > &proof_output_witness_indices) |
| Add information about which witnesses contain the recursive proof computation information. | |
| void | set_recursive_proof (const std::vector< uint32_t > &proof_output_witness_indices) |
| Update recursive_proof_public_input_indices with existing public inputs that represent a recursive proof. | |
| bool | failed () const |
| const std::string & | err () const |
| void | set_err (std::string msg) |
| void | failure (std::string msg) |
Static Public Attributes | |
| static constexpr uint32_t | REAL_VARIABLE = UINT32_MAX - 1 |
| static constexpr uint32_t | FIRST_VARIABLE_IN_CLASS = UINT32_MAX - 2 |
|
inlinevirtual |
Add a public variable to variables
The only difference between this and add_variable is that here it is also added to the public_inputs vector
| in | The value of the variable |
|
inline |
Add information about which witnesses contain the recursive proof computation information.
| circuit_constructor | Object with the circuit |
| proof_output_witness_indices | Witness indices that need to become public and stored as recurisve proof specific |
|
inlinevirtual |
Add a variable to variables
| in | The value of the variable |
|
virtual |
Join variable class b to variable class a.
| a_variable_idx | Index of a variable in class a. |
| b_variable_idx | Index of a variable in class b. |
| msg | Class tag. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Export the existing circuit as msgpack compatible buffer.
Reimplemented in proof_system::StandardCircuitBuilder_< FF >.
|
inlinevirtual |
After finishing the circuit can be called for automatic merging all existing collisions.
|
inline |
Get the index of the first variable in class.
| index | The index of the variable you want to look up. |
|
inlinevirtual |
|
inline |
Get the value of the variable v_{index}. N.B. We should probably inline this.
| index | The index of the variable. |
|
inline |
Get a reference to the variable v_{index}.
We need this function for check_circuit functions.
| index | The index of the variable. |
|
inlinevirtual |
|
inlinevirtual |
Make a witness variable public.
| witness_index | The index of the witness. |
|
inline |
Update recursive_proof_public_input_indices with existing public inputs that represent a recursive proof.
TODO: We can remove this and use add_recursive_proof once my question has been addressed TODO: using add_recursive_proof also means that we will need to remove the cde which is TODO: adding the public_inputs
| proof_output_witness_indices |
|
inlinevirtual |
Assign a name to a variable(equivalence class). Should be one name per equivalence class.
| index | Index of the variable you want to name. |
| name | Name of the variable. |
|
inline |
Update all variables from index in equivalence class to have real variable new_real_index.
| index | The index of a variable in the class we're updating. |
| new_real_index | The index of the real variable to update to. |
|
inlinevirtual |
After assert_equal() merge two class names if present. Preserves the first name in class.
| index | Index of the variable you have previously named and used in assert_equal. |