|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <ultra_circuit_builder.hpp>
Classes | |
| struct | cached_partial_non_native_field_multiplication |
| Used to store instructions to create partial_non_native_field_multiplication gates. More... | |
| struct | RangeList |
Public Types | |
| enum | MEMORY_SELECTORS { MEM_NONE , RAM_CONSISTENCY_CHECK , ROM_CONSISTENCY_CHECK , RAM_TIMESTAMP_CHECK , ROM_READ , RAM_READ , RAM_WRITE } |
| enum | NNF_SELECTORS { NNF_NONE , LIMB_ACCUMULATE_1 , LIMB_ACCUMULATE_2 , NON_NATIVE_FIELD_1 , NON_NATIVE_FIELD_2 , NON_NATIVE_FIELD_3 } |
| using | ExecutionTrace = ExecutionTrace_ |
| using | FF = typename ExecutionTrace::FF |
| using | RomRamLogic = RomRamLogic_< ExecutionTrace > |
| using | scaled_witness = std::pair< uint32_t, FF > |
| using | add_simple = std::tuple< scaled_witness, scaled_witness, FF > |
Public Types inherited from bb::CircuitBuilderBase< ExecutionTrace_::FF > | |
| using | FF = ExecutionTrace_::FF |
| using | EmbeddedCurve = curve::Grumpkin |
Public Member Functions | |
| void | populate_public_inputs_block () |
| Copy the public input idx data into the public inputs trace block. | |
| void | process_non_native_field_multiplications () |
Called in compute_prover_instance when finalizing circuit. Iterates over the cached_non_native_field_multiplication objects, removes duplicates, and instantiates the remainder as constraints`. | |
| UltraCircuitBuilder_ (const size_t size_hint=0) | |
| UltraCircuitBuilder_ (const size_t size_hint, auto &witness_values, const std::vector< uint32_t > &public_inputs, size_t varnum) | |
| Constructor from data generated from ACIR. | |
| UltraCircuitBuilder_ (const UltraCircuitBuilder_ &other)=default | |
| UltraCircuitBuilder_ (UltraCircuitBuilder_ &&other)=default | |
| UltraCircuitBuilder_ & | operator= (const UltraCircuitBuilder_ &other)=default |
| UltraCircuitBuilder_ & | operator= (UltraCircuitBuilder_ &&other)=default |
| ~UltraCircuitBuilder_ () override=default | |
| void | check_selector_length_consistency () |
| Debug helper method for ensuring all selectors have the same size. | |
| void | finalize_circuit (const bool ensure_nonzero) |
| void | add_gates_to_ensure_all_polys_are_non_zero () |
| Ensure all polynomials have at least one non-zero coefficient to avoid commiting to the zero-polynomial. | |
| void | create_add_gate (const add_triple_< FF > &in) override |
| Create an addition gate, where in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.const_scaling = 0. | |
| void | create_big_mul_add_gate (const mul_quad_< FF > &in, const bool use_next_gate_w_4=false) |
| Create a big multiplication-addition gate, where in.a * in.b * in.mul_scaling + in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.d * in.d_scaling + in.const_scaling = 0. If include_next_gate_w_4 is enabled, then this sum also adds the value of the 4-th witness at the next index. | |
| void | create_big_add_gate (const add_quad_< FF > &in, const bool use_next_gate_w_4=false) |
| Create a big addition gate, where in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.d * in.d_scaling + in.const_scaling = 0. If include_next_gate_w_4 is enabled, then the sum also adds the value of the 4-th witness at the next index. | |
| void | create_big_mul_gate (const mul_quad_< FF > &in) |
| Create a basic multiplication gate q_m * a * b + q_1 * a + q_2 * b + q_3 * c + q_4 * d + q_c = 0 (q_arith = 1) | |
| void | create_mul_gate (const mul_triple_< FF > &in) override |
| Create a multiplication gate with q_m * a * b + q_3 * c + q_const = 0. | |
| void | create_bool_gate (const uint32_t a) override |
| Generate an arithmetic gate equivalent to x^2 - x = 0, which forces x to be 0 or 1. | |
| void | create_poly_gate (const poly_triple_< FF > &in) override |
| A plonk gate with disabled (set to zero) fourth wire. q_m * a * b + q_1 * a + q_2 * b + q_3. | |
| void | create_ecc_add_gate (const ecc_add_gate_< FF > &in) |
| Create an elliptic curve addition gate. | |
| void | create_ecc_dbl_gate (const ecc_dbl_gate_< FF > &in) |
| Create an elliptic curve doubling gate. | |
| void | fix_witness (const uint32_t witness_index, const FF &witness_value) |
| Add a gate equating a particular witness to a constant, fixing its value. | |
| void | create_new_range_constraint (const uint32_t variable_index, const uint64_t target_range, std::string const msg="create_new_range_constraint") |
| Constrain a variable to a range. | |
| void | create_range_constraint (const uint32_t variable_index, const size_t num_bits, std::string const &msg) |
| uint32_t | put_constant_variable (const FF &variable) |
| size_t | get_num_constant_gates () const override |
| void | get_num_estimated_gates_split_into_components (size_t &count, size_t &rangecount, size_t &romcount, size_t &ramcount, size_t &nnfcount) const |
| Get the final number of gates in a circuit, which consists of the sum of: 1) Current number number of actual gates 2) Number of public inputs, as we'll need to add a gate for each of them 3) Number of Rom array-associated gates 4) Number of range-list associated gates 5) Number of non-native field multiplication gates. | |
| size_t | get_num_finalized_gates () const override |
| Get the number of gates in a finalized circuit. | |
| size_t | get_estimated_num_finalized_gates () const override |
| Get the final number of gates in a circuit, which consists of the sum of: 1) Current number number of actual gates 2) Number of public inputs, as we'll need to add a gate for each of them 3) Number of Rom array-associated gates 4) Number of range-list associated gates 5) Number of non-native field multiplication gates. !!! WARNING: This function is predictive and might report an incorrect number. Make sure to finalize the circuit and then check the number of gates for a precise result. Kesha: it's basically voodoo. | |
| size_t | get_tables_size () const |
| Get combined size of all tables used in circuit. | |
| size_t | get_lookups_size () const |
| Get total number of lookups used in circuit. | |
| size_t | get_finalized_total_circuit_size () const |
| Get the actual finalized size of a circuit. Assumes the circuit is finalized already. | |
| size_t | get_estimated_total_circuit_size () const |
| Get the estimated size of the circuit if it was finalized now. | |
| std::vector< uint32_t > | get_used_witnesses () const |
| void | update_used_witnesses (uint32_t var_idx) |
| Add a witness index to the boomerang exclusion list. | |
| void | update_used_witnesses (const std::vector< uint32_t > &used_indices) |
| Add a list of witness indices to the boomerang exclusion list. | |
| void | update_finalize_witnesses (uint32_t var_idx) |
| Add a witness index to the finalize exclusion list. | |
| void | update_finalize_witnesses (const std::vector< uint32_t > &finalize_indices) |
| Add a list of witness indices to the finalize exclusion list. | |
| void | print_num_estimated_finalized_gates () const override |
| Print the number and composition of gates in the circuit. | |
| void | assert_equal_constant (const uint32_t a_idx, const FF &b, std::string const &msg="assert equal constant") |
| void | initialize_precomputed_table (const plookup::BasicTableId id, bool(*generator)(std::vector< FF > &, std::vector< FF > &, std::vector< FF > &), std::array< FF, 2 >(*get_values_from_key)(const std::array< uint64_t, 2 >)) |
| plookup::BasicTable & | get_table (const plookup::BasicTableId id) |
| Get the basic table with provided ID from the set of tables for the present circuit; create it if it doesnt yet exist. | |
| plookup::MultiTable & | get_multitable (const plookup::MultiTableId id) |
| plookup::ReadData< uint32_t > | create_gates_from_plookup_accumulators (const plookup::MultiTableId &id, const plookup::ReadData< FF > &read_values, const uint32_t key_a_index, std::optional< uint32_t > key_b_index=std::nullopt) |
| Perform a series of lookups, one for each 'row' in read_values. | |
| std::vector< uint32_t > | decompose_into_default_range (const uint32_t variable_index, const uint64_t num_bits, const uint64_t target_range_bitnum=DEFAULT_PLOOKUP_RANGE_BITNUM, std::string const &msg="decompose_into_default_range") |
| void | create_unconstrained_gate (auto &block, const uint32_t &idx_1, const uint32_t &idx_2, const uint32_t &idx_3, const uint32_t &idx_4) |
| Create a gate with no constraints but with possibly non-trivial wire values. | |
| void | create_unconstrained_gates (const std::vector< uint32_t > &variable_index) |
| void | create_sort_constraint (const std::vector< uint32_t > &variable_index) |
| void | create_sort_constraint_with_edges (const std::vector< uint32_t > &variable_index, const FF &, const FF &) |
| void | assign_tag (const uint32_t variable_index, const uint32_t tag) |
| uint32_t | create_tag (const uint32_t tag_index, const uint32_t tau_index) |
| uint32_t | get_new_tag () |
| RangeList | create_range_list (const uint64_t target_range) |
| void | process_range_list (RangeList &list) |
| void | process_range_lists () |
| void | apply_memory_selectors (const MEMORY_SELECTORS type) |
| Enable the memory gate of particular type. | |
| void | apply_nnf_selectors (const NNF_SELECTORS type) |
| Enable the nnf gate of particular type. | |
| void | range_constrain_two_limbs (const uint32_t lo_idx, const uint32_t hi_idx, const size_t lo_limb_bits=DEFAULT_NON_NATIVE_FIELD_LIMB_BITS, const size_t hi_limb_bits=DEFAULT_NON_NATIVE_FIELD_LIMB_BITS, std::string const &msg="range_constrain_two_limbs") |
| std::array< uint32_t, 2 > | decompose_non_native_field_double_width_limb (const uint32_t limb_idx, const size_t num_limb_bits=(2 *DEFAULT_NON_NATIVE_FIELD_LIMB_BITS)) |
| Decompose a single witness into two, where the lowest is DEFAULT_NON_NATIVE_FIELD_LIMB_BITS (68) range constrained and the lowst is num_limb_bits - DEFAULT.. range constrained. | |
| std::array< uint32_t, 2 > | evaluate_non_native_field_multiplication (const non_native_multiplication_witnesses< FF > &input) |
| Queue up non-native field multiplication data. | |
| std::array< uint32_t, 2 > | queue_partial_non_native_field_multiplication (const non_native_partial_multiplication_witnesses< FF > &input) |
| std::array< uint32_t, 5 > | evaluate_non_native_field_subtraction (add_simple limb0, add_simple limb1, add_simple limb2, add_simple limb3, std::tuple< uint32_t, uint32_t, FF > limbp) |
| std::array< uint32_t, 5 > | evaluate_non_native_field_addition (add_simple limb0, add_simple limb1, add_simple limb2, add_simple limb3, std::tuple< uint32_t, uint32_t, FF > limbp) |
| size_t | create_ROM_array (const size_t array_size) |
| Create a new read-only memory region. | |
| void | set_ROM_element (const size_t rom_id, const size_t index_value, const uint32_t value_witness) |
Initialize a rom cell to equal value_witness | |
| void | set_ROM_element_pair (const size_t rom_id, const size_t index_value, const std::array< uint32_t, 2 > &value_witnesses) |
| Initialize a ROM array element with a pair of witness values. | |
| uint32_t | read_ROM_array (const size_t rom_id, const uint32_t index_witness) |
| Read a single element from ROM. | |
| std::array< uint32_t, 2 > | read_ROM_array_pair (const size_t rom_id, const uint32_t index_witness) |
| Read a pair of elements from ROM. | |
| size_t | create_RAM_array (const size_t array_size) |
| Create a new updatable memory region. | |
| void | init_RAM_element (const size_t ram_id, const size_t index_value, const uint32_t value_witness) |
Initialize a RAM cell to equal value_witness | |
| uint32_t | read_RAM_array (const size_t ram_id, const uint32_t index_witness) |
| void | write_RAM_array (const size_t ram_id, const uint32_t index_witness, const uint32_t value_witness) |
| void | create_poseidon2_external_gate (const poseidon2_external_gate_< FF > &in) |
| Poseidon2 external round gate, activates the q_poseidon2_external selector and relation. | |
| void | create_poseidon2_internal_gate (const poseidon2_internal_gate_< FF > &in) |
| Poseidon2 internal round gate, activates the q_poseidon2_internal selector and relation. | |
| msgpack::sbuffer | export_circuit () override |
Public Member Functions inherited from bb::CircuitBuilderBase< ExecutionTrace_::FF > | |
| CircuitBuilderBase (size_t size_hint=0, bool has_dummy_witnesses=false) | |
| CircuitBuilderBase (const CircuitBuilderBase &other)=default | |
| CircuitBuilderBase (CircuitBuilderBase &&other) noexcept=default | |
| CircuitBuilderBase & | operator= (const CircuitBuilderBase &other)=default |
| CircuitBuilderBase & | operator= (CircuitBuilderBase &&other) noexcept=default |
| virtual | ~CircuitBuilderBase ()=default |
| bool | has_dummy_witnesses () const |
| bool | operator== (const CircuitBuilderBase &other) const=default |
| virtual size_t | get_num_variables () const |
| uint32_t | zero_idx () 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_poly_gate (const poly_triple_< FF > &in)=0 |
| const std::vector< FF > & | get_variables () const |
| 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 |
| Get the value of the variable v_{index}. | |
| void | set_variable (const uint32_t index, const FF &value) |
| Set the value of the variable pointed to by a witness index. | |
| 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 |
| const std::vector< uint32_t > & | public_inputs () const |
| void | finalize_public_inputs () |
| Set the public_inputs_finalized_ to true to prevent any new public inputs from being added. | |
| void | initialize_public_inputs (const std::vector< uint32_t > &public_inputs) |
| Directly initialize the public inputs vector. | |
| virtual uint32_t | add_variable (const FF &in) |
| virtual void | set_variable_name (uint32_t index, const std::string &name) |
| virtual uint32_t | add_public_variable (const FF &in) |
| virtual uint32_t | set_public_input (uint32_t witness_index) |
| Make a witness variable public. | |
| virtual void | assert_equal (uint32_t a_idx, uint32_t b_idx, std::string const &msg="assert_equal") |
| size_t | get_circuit_subgroup_size (size_t num_gates) const |
| size_t | num_public_inputs () const |
| void | assert_valid_variables (const std::vector< uint32_t > &variable_indices) |
| bool | failed () const |
| const std::string & | err () const |
| void | failure (std::string msg) |
Public Attributes | |
| ExecutionTrace | blocks |
| std::map< FF, uint32_t > | constant_variable_indices |
| std::vector< plookup::BasicTable > | lookup_tables |
| RomRamLogic | rom_ram_logic = RomRamLogic() |
| std::vector< uint32_t > | memory_read_records |
| std::vector< uint32_t > | memory_write_records |
| std::map< uint64_t, RangeList > | range_lists |
| std::vector< uint32_t > | used_witnesses |
| std::unordered_set< uint32_t > | finalize_witnesses |
| std::vector< cached_partial_non_native_field_multiplication > | cached_partial_non_native_field_multiplications |
| bool | circuit_finalized = false |
| std::vector< fr > | ipa_proof |
Public Attributes inherited from bb::CircuitBuilderBase< ExecutionTrace_::FF > | |
| size_t | num_gates |
| std::map< uint32_t, uint32_t > | tau |
| std::vector< uint32_t > | real_variable_index |
| std::vector< uint32_t > | real_variable_tags |
| uint32_t | current_tag |
Static Public Attributes | |
| static constexpr size_t | NUM_WIRES = ExecutionTrace::NUM_WIRES |
| static constexpr std::string_view | NAME_STRING = "UltraCircuitBuilder" |
| static constexpr size_t | DEFAULT_PLOOKUP_RANGE_BITNUM = 14 |
| static constexpr size_t | DEFAULT_PLOOKUP_RANGE_STEP_SIZE = 3 |
| static constexpr size_t | DEFAULT_PLOOKUP_RANGE_SIZE = (1 << DEFAULT_PLOOKUP_RANGE_BITNUM) - 1 |
| static constexpr size_t | DEFAULT_NON_NATIVE_FIELD_LIMB_BITS = 68 |
Additional Inherited Members | |
Protected Member Functions inherited from bb::CircuitBuilderBase< ExecutionTrace_::FF > | |
| void | set_zero_idx (uint32_t value) |
Protected Attributes inherited from bb::CircuitBuilderBase< ExecutionTrace_::FF > | |
| std::unordered_map< uint32_t, std::string > | variable_names |
Definition at line 40 of file ultra_circuit_builder.hpp.
| using bb::UltraCircuitBuilder_< ExecutionTrace_ >::add_simple = std::tuple<scaled_witness, scaled_witness, FF> |
Definition at line 720 of file ultra_circuit_builder.hpp.
| using bb::UltraCircuitBuilder_< ExecutionTrace_ >::ExecutionTrace = ExecutionTrace_ |
Definition at line 42 of file ultra_circuit_builder.hpp.
| using bb::UltraCircuitBuilder_< ExecutionTrace_ >::FF = typename ExecutionTrace::FF |
Definition at line 43 of file ultra_circuit_builder.hpp.
| using bb::UltraCircuitBuilder_< ExecutionTrace_ >::RomRamLogic = RomRamLogic_<ExecutionTrace> |
Definition at line 44 of file ultra_circuit_builder.hpp.
| using bb::UltraCircuitBuilder_< ExecutionTrace_ >::scaled_witness = std::pair<uint32_t, FF> |
Definition at line 719 of file ultra_circuit_builder.hpp.
| enum bb::UltraCircuitBuilder_::MEMORY_SELECTORS |
| Enumerator | |
|---|---|
| MEM_NONE | |
| RAM_CONSISTENCY_CHECK | |
| ROM_CONSISTENCY_CHECK | |
| RAM_TIMESTAMP_CHECK | |
| ROM_READ | |
| RAM_READ | |
| RAM_WRITE | |
Definition at line 57 of file ultra_circuit_builder.hpp.
| enum bb::UltraCircuitBuilder_::NNF_SELECTORS |
| Enumerator | |
|---|---|
| NNF_NONE | |
| LIMB_ACCUMULATE_1 | |
| LIMB_ACCUMULATE_2 | |
| NON_NATIVE_FIELD_1 | |
| NON_NATIVE_FIELD_2 | |
| NON_NATIVE_FIELD_3 | |
Definition at line 67 of file ultra_circuit_builder.hpp.
|
inline |
Definition at line 217 of file ultra_circuit_builder.hpp.
|
inline |
Constructor from data generated from ACIR.
| size_hint | |
| witness_values | witnesses values known to acir |
| public_inputs | indices of public inputs in witness array |
| varnum | number of known witness |
Definition at line 238 of file ultra_circuit_builder.hpp.
|
default |
|
default |
|
overridedefault |
| void bb::UltraCircuitBuilder_< ExecutionTrace >::add_gates_to_ensure_all_polys_are_non_zero | ( | ) |
Ensure all polynomials have at least one non-zero coefficient to avoid commiting to the zero-polynomial.
| in | Structure containing variables and witness selectors |
Definition at line 81 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::apply_memory_selectors | ( | const MEMORY_SELECTORS | type | ) |
Enable the memory gate of particular type.
Custom Gate Selectors
If we have several operations being performed do not require parametrization (if we put each of them into a separate widget they would not require any selectors other than the ones enabling the operation itself, for example q_special*(w_l-2*w_r)), we can group them all into one widget, by using a special selector q_memory for all of them and enabling each in particular, depending on the combination of standard selector values. So you can do: q_memory * (q_1 * q_2 * statement_1 + q_3 * q_4 * statement_2). q_1=q_2=1 would activate statement_1, while q_3=q_4=1 would activate statement_2
Multiple selectors are used to 'switch' memory gates on/off according to the following pattern:
| gate type | q_mem | q_1 | q_2 | q_3 | q_4 | q_m | q_c |
|---|---|---|---|---|---|---|---|
| RAM/ROM access gate | 1 | 1 | 0 | 0 | 0 | 1 | — |
| RAM timestamp check | 1 | 1 | 0 | 0 | 1 | 0 | — |
| ROM consistency check | 1 | 1 | 1 | 0 | 0 | 0 | — |
| RAM consistency check | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
| type |
Definition at line 1005 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::apply_nnf_selectors | ( | const NNF_SELECTORS | type | ) |
Enable the nnf gate of particular type.
If we have several operations being performed do not require parametrization (if we put each of them into a separate widget they would not require any selectors other than the ones enabling the operation itself, for example q_special*(w_l-2*w_r)), we can group them all into one widget, by using a special selector q_nnf for all of them and enabling each in particular, depending on the combination of standard selector values. So you can do: q_nnf * (q_1 * q_2 * statement_1 + q_3 * q_4 * statement_2). q_1=q_2=1 would activate statement_1, while q_3=q_4=1 would activate statement_2
Multiple selectors are used to 'switch' nnf gates on/off according to the following pattern:
| gate type | q_nnf | q_1 | q_2 | q_3 | q_4 | q_m |
|---|---|---|---|---|---|---|
| Bigfield Limb Accumulation 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| Bigfield Limb Accumulation 2 | 1 | 0 | 0 | 1 | 0 | 1 |
| Bigfield Product 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| Bigfield Product 2 | 1 | 0 | 1 | 0 | 1 | 0 |
| Bigfield Product 3 | 1 | 0 | 1 | 0 | 0 | 1 |
| type |
Definition at line 1127 of file ultra_circuit_builder.cpp.
|
inline |
Definition at line 610 of file ultra_circuit_builder.hpp.
|
inline |
Definition at line 670 of file ultra_circuit_builder.hpp.
|
inline |
Debug helper method for ensuring all selectors have the same size.
Each gate construction method manually appends values to the selectors. Failing to update one of the selectors will lead to an unsatisfiable circuit. This method provides a mechanism for ensuring that each selector has been updated as expected. Its logic is only active in debug mode.
Definition at line 272 of file ultra_circuit_builder.hpp.
|
override |
Create an addition gate, where in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.const_scaling = 0.
Arithmetic selector is set to 1, all other gate selectors are 0. Multiplication selector is set to 0
| in | A structure with variable indexes and selector values for the gate. |
Definition at line 224 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_big_add_gate | ( | const add_quad_< FF > & | in, |
| const bool | include_next_gate_w_4 = false |
||
| ) |
Create a big addition gate, where in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.d * in.d_scaling + in.const_scaling = 0. If include_next_gate_w_4 is enabled, then the sum also adds the value of the 4-th witness at the next index.
| in | Structure with variable indexes and wire selector values |
| include_next_gate_w_4 | Switches on/off the addition of w_4 at the next index |
Definition at line 274 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_big_mul_add_gate | ( | const mul_quad_< FF > & | in, |
| const bool | include_next_gate_w_4 = false |
||
| ) |
Create a big multiplication-addition gate, where in.a * in.b * in.mul_scaling + in.a * in.a_scaling + in.b * in.b_scaling + in.c * in.c_scaling + in.d * in.d_scaling + in.const_scaling = 0. If include_next_gate_w_4 is enabled, then this sum also adds the value of the 4-th witness at the next index.
| in | Structure with variable indexes and wire selector values |
| include_next_gate_w_4 | Switches on/off the addition of w_4 at the next index |
Definition at line 249 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_big_mul_gate | ( | const mul_quad_< FF > & | in | ) |
Create a basic multiplication gate q_m * a * b + q_1 * a + q_2 * b + q_3 * c + q_4 * d + q_c = 0 (q_arith = 1)
| in | Structure containing variables and witness selectors |
Definition at line 296 of file ultra_circuit_builder.cpp.
|
overridevirtual |
Generate an arithmetic gate equivalent to x^2 - x = 0, which forces x to be 0 or 1.
| variable_index | the variable which needs to be constrained |
Implements bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 340 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_ecc_add_gate | ( | const ecc_add_gate_< FF > & | in | ) |
Create an elliptic curve addition gate.
x and y are defined over scalar field.
| in | Elliptic curve point addition gate parameters, including the affine coordinates of the two points being added, the resulting point coordinates and the selector values that describe whether the second point is negated. |
gate structure: | 1 | 2 | 3 | 4 | | – | x1 | y1 | – | | x2 | x3 | y3 | y2 | we can chain successive ecc_add_gates if x3 y3 of previous gate equals x1 y1 of current gate
Definition at line 388 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_ecc_dbl_gate | ( | const ecc_dbl_gate_< FF > & | in | ) |
Create an elliptic curve doubling gate.
| in | Elliptic curve point doubling gate parameters |
gate structure: | 1 | 2 | 3 | 4 | | - | x1 | y1 | - | | - | x3 | y3 | - | we can chain an ecc_add_gate + an ecc_dbl_gate if x3 y3 of previous add_gate equals x1 y1 of current gate can also chain double gates together
Definition at line 446 of file ultra_circuit_builder.cpp.
| plookup::ReadData< uint32_t > bb::UltraCircuitBuilder_< ExecutionTrace >::create_gates_from_plookup_accumulators | ( | const plookup::MultiTableId & | id, |
| const plookup::ReadData< FF > & | read_values, | ||
| const uint32_t | key_a_index, | ||
| std::optional< uint32_t > | key_b_index = std::nullopt |
||
| ) |
Perform a series of lookups, one for each 'row' in read_values.
Definition at line 558 of file ultra_circuit_builder.cpp.
|
override |
Create a multiplication gate with q_m * a * b + q_3 * c + q_const = 0.
q_arith == 1
| in | Structure containing variables and witness selectors |
Definition at line 319 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_new_range_constraint | ( | const uint32_t | variable_index, |
| const uint64_t | target_range, | ||
| std::string const | msg = "create_new_range_constraint" |
||
| ) |
Constrain a variable to a range.
Checks if the range [0, target_range] already exists. If it doesn't, then creates a new range. Then tags variable as belonging to this set.
| variable_index | |
| target_range |
Definition at line 751 of file ultra_circuit_builder.cpp.
|
override |
A plonk gate with disabled (set to zero) fourth wire. q_m * a * b + q_1 * a + q_2 * b + q_3.
| in | Structure containing variables and witness selectors |
Definition at line 363 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< FF >::create_poseidon2_external_gate | ( | const poseidon2_external_gate_< FF > & | in | ) |
Poseidon2 external round gate, activates the q_poseidon2_external selector and relation.
Definition at line 1964 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< FF >::create_poseidon2_internal_gate | ( | const poseidon2_internal_gate_< FF > & | in | ) |
Poseidon2 internal round gate, activates the q_poseidon2_internal selector and relation.
Definition at line 1983 of file ultra_circuit_builder.cpp.
| size_t bb::UltraCircuitBuilder_< ExecutionTrace >::create_RAM_array | ( | const size_t | array_size | ) |
Create a new updatable memory region.
Creates a transcript object, where the inside memory state array is filled with "uninitialized memory" and and empty memory record array. Puts this object into the vector of ROM arrays.
| array_size | The size of region in elements |
Definition at line 1862 of file ultra_circuit_builder.cpp.
|
inline |
N.B. if variable_index is not used in any arithmetic constraints, this will create an unsatisfiable circuit! this range constraint will increase the size of the 'sorted set' of range-constrained integers by 1. The 'non-sorted set' of range-constrained integers is a subset of the wire indices of all arithmetic gates. No arithmetic gate => size imbalance between sorted and non-sorted sets. Checking for this and throwing an error would require a refactor of the Composer to catelog all 'orphan' variables not assigned to gates.
TODO(Suyash): The following is a temporary fix to make sure the range constraints on numbers with num_bits <= DEFAULT_PLOOKUP_RANGE_BITNUM is correctly enforced in the circuit. Longer term, as Zac says, we would need to refactor the composer to fix this.
Definition at line 308 of file ultra_circuit_builder.hpp.
| UltraCircuitBuilder_< ExecutionTrace >::RangeList bb::UltraCircuitBuilder_< ExecutionTrace >::create_range_list | ( | const uint64_t | target_range | ) |
Generalized Permutation Methods
Definition at line 602 of file ultra_circuit_builder.cpp.
| size_t bb::UltraCircuitBuilder_< ExecutionTrace >::create_ROM_array | ( | const size_t | array_size | ) |
Create a new read-only memory region.
Memory
Creates a transcript object, where the inside memory state array is filled with "uninitialized memory" and empty memory record array. Puts this object into the vector of ROM arrays.
| array_size | The size of region in elements |
Definition at line 1846 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_sort_constraint | ( | const std::vector< uint32_t > & | variable_index | ) |
Definition at line 878 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_sort_constraint_with_edges | ( | const std::vector< uint32_t > & | variable_index, |
| const FF & | start, | ||
| const FF & | end | ||
| ) |
Definition at line 928 of file ultra_circuit_builder.cpp.
|
inline |
Definition at line 682 of file ultra_circuit_builder.hpp.
|
inline |
Create a gate with no constraints but with possibly non-trivial wire values.
A dummy gate can be used to provide wire values to be accessed via shifts by the gate that proceeds it. The dummy gate itself does not have to satisfy any constraints (all selectors are zero).
| ExecutionTrace |
| block | Execution trace block into which the dummy gate is to be placed |
Definition at line 652 of file ultra_circuit_builder.hpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::create_unconstrained_gates | ( | const std::vector< uint32_t > & | variable_index | ) |
Definition at line 909 of file ultra_circuit_builder.cpp.
| std::vector< uint32_t > bb::UltraCircuitBuilder_< ExecutionTrace >::decompose_into_default_range | ( | const uint32_t | variable_index, |
| const uint64_t | num_bits, | ||
| const uint64_t | target_range_bitnum = DEFAULT_PLOOKUP_RANGE_BITNUM, |
||
| std::string const & | msg = "decompose_into_default_range" |
||
| ) |
Generalized Permutation Methods
TODO: Support this commented-out code! At the moment, decompose_into_default_range generates a minimum of 1 arithmetic gate. This is not strictly required iff num_bits <= target_range_bitnum. However, this produces an edge-case where a variable is range-constrained but NOT present in an arithmetic gate. This in turn produces an unsatisfiable circuit (see create_new_range_constraint). We would need to check for and accommodate/reject this edge case to support not adding addition gates here if not reqiured if (num_bits <= target_range_bitnum) { const uint64_t expected_range = (1ULL << num_bits) - 1ULL; create_new_range_constraint(variable_index, expected_range); return { variable_index }; }
Definition at line 636 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 2 > bb::UltraCircuitBuilder_< ExecutionTrace >::decompose_non_native_field_double_width_limb | ( | const uint32_t | limb_idx, |
| const size_t | num_limb_bits = (2 * DEFAULT_NON_NATIVE_FIELD_LIMB_BITS) |
||
| ) |
Decompose a single witness into two, where the lowest is DEFAULT_NON_NATIVE_FIELD_LIMB_BITS (68) range constrained and the lowst is num_limb_bits - DEFAULT.. range constrained.
Doesn't create gates constraining the limbs to each other.
| limb_idx | The index of the limb that will be decomposed |
| num_limb_bits | The range we want to constrain the original limb to |
Definition at line 1296 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 5 > bb::UltraCircuitBuilder_< ExecutionTrace >::evaluate_non_native_field_addition | ( | add_simple | limb0, |
| add_simple | limb1, | ||
| add_simple | limb2, | ||
| add_simple | limb3, | ||
| std::tuple< uint32_t, uint32_t, FF > | limbp | ||
| ) |
Uses a sneaky extra mini-addition gate in plookup_arithmetic_widget.hpp to add two non-native field elements in 4 gates (would normally take 5)
we want the following layout in program memory (x - y = z)
| 1 | 2 | 3 | 4 | |--—|--—|--—|--—| | y.p | x.0 | y.0 | x.p | (b.p + c.p - a.p = 0) AND (a.0 - b.0 - c.0 = 0) | z.p | x.1 | y.1 | z.0 | (a.1 - b.1 - c.1 = 0) | x.2 | y.2 | z.2 | z.1 | (a.2 - b.2 - c.2 = 0) | x.3 | y.3 | z.3 | — | (a.3 - b.3 - c.3 = 0)
By setting q_arith to 3, we can validate x_p + y_p + q_m = z_p
Definition at line 1610 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 2 > bb::UltraCircuitBuilder_< ExecutionTrace >::evaluate_non_native_field_multiplication | ( | const non_native_multiplication_witnesses< FF > & | input | ) |
Queue up non-native field multiplication data.
The data queued represents a non-native field multiplication identity a * b = q * p + r, where a, b, q, r are all emulated non-native field elements that are each split across 4 distinct witness variables.
Without this queue some functions, such as bb::stdlib::element::multiple_montgomery_ladder, would duplicate non-native field operations, which can be quite expensive. We queue up these operations, and remove duplicates in the circuit finishing stage of the proving key computation.
The non-native field modulus, p, is a circuit constant
The return value are the witness indices of the two remainder limbs lo_1, hi_2
N.B.: This method does NOT evaluate the prime field component of non-native field multiplications.
product gate 6
hi_2 - hi_1 - lo_1 - q2 - q3 = 0
product gate 7
Definition at line 1335 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 5 > bb::UltraCircuitBuilder_< ExecutionTrace >::evaluate_non_native_field_subtraction | ( | add_simple | limb0, |
| add_simple | limb1, | ||
| add_simple | limb2, | ||
| add_simple | limb3, | ||
| std::tuple< uint32_t, uint32_t, FF > | limbp | ||
| ) |
we want the following layout in program memory (x - y = z)
| 1 | 2 | 3 | 4 | |--—|--—|--—|--—| | y.p | x.0 | y.0 | z.p | (b.p + c.p - a.p = 0) AND (a.0 - b.0 - c.0 = 0) | x.p | x.1 | y.1 | z.0 | (a.1 - b.1 - c.1 = 0) | x.2 | y.2 | z.2 | z.1 | (a.2 - b.2 - c.2 = 0) | x.3 | y.3 | z.3 | — | (a.3 - b.3 - c.3 = 0)
Definition at line 1725 of file ultra_circuit_builder.cpp.
|
overridevirtual |
Export the existing circuit as msgpack compatible buffer. Should be called after finalize_circuit()
Reimplemented from bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 2004 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::finalize_circuit | ( | const bool | ensure_nonzero | ) |
First of all, add the gates related to ROM arrays and range lists. Note that the total number of rows in an Ultra program can be divided as following:
Now we have two variables referred to as n in the code:
In this case, we have composer.num_gates = n_computation before we execute the following two functions. After these functions are executed, the composer's n is incremented to include the ROM and range list gates. Therefore we have: composer.num_gates = n_computation + n_rom + n_range.
Its necessary to include the (n_rom + n_range) gates at this point because if we already have a proving key, and we just return it without including these ROM and range list gates, the overall circuit size would not be correct (resulting in the code crashing while performing FFT operations).
Therefore, we introduce a boolean flag circuit_finalized here. Once we add the rom and range gates, our circuit is finalized, and we must not to execute these functions again.
Definition at line 27 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::fix_witness | ( | const uint32_t | witness_index, |
| const FF & | witness_value | ||
| ) |
Add a gate equating a particular witness to a constant, fixing its value.
| witness_index | The index of the witness we are fixing |
| witness_value | The value we are fixing it to |
Definition at line 503 of file ultra_circuit_builder.cpp.
|
inlineoverridevirtual |
Get the final number of gates in a circuit, which consists of the sum of: 1) Current number number of actual gates 2) Number of public inputs, as we'll need to add a gate for each of them 3) Number of Rom array-associated gates 4) Number of range-list associated gates 5) Number of non-native field multiplication gates. !!! WARNING: This function is predictive and might report an incorrect number. Make sure to finalize the circuit and then check the number of gates for a precise result. Kesha: it's basically voodoo.
Reimplemented from bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 472 of file ultra_circuit_builder.hpp.
|
inline |
Get the estimated size of the circuit if it was finalized now.
This method estimates the size of the circuit without rounding up to the next power of 2. It takes into account the possibility that the tables will dominate the size and checks both the estimated plookup argument size and the general circuit size
Definition at line 538 of file ultra_circuit_builder.hpp.
|
inline |
Get the actual finalized size of a circuit. Assumes the circuit is finalized already.
This method calculates the size of the circuit without rounding up to the next power of 2. It takes into account the possibility that the tables will dominate the size and checks both the plookup argument size and the general circuit size
Definition at line 522 of file ultra_circuit_builder.hpp.
|
inline |
Get total number of lookups used in circuit.
Definition at line 504 of file ultra_circuit_builder.hpp.
| plookup::MultiTable & bb::UltraCircuitBuilder_< ExecutionTrace_ >::get_multitable | ( | const plookup::MultiTableId | id | ) |
|
inline |
Definition at line 689 of file ultra_circuit_builder.hpp.
|
inlineoverridevirtual |
Implements bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 345 of file ultra_circuit_builder.hpp.
|
inline |
Get the final number of gates in a circuit, which consists of the sum of: 1) Current number number of actual gates 2) Number of public inputs, as we'll need to add a gate for each of them 3) Number of Rom array-associated gates 4) Number of range-list associated gates 5) Number of non-native field multiplication gates.
| count | return arument, number of existing gates |
| rangecount | return argument, extra gates due to range checks |
| romcount | return argument, extra gates due to rom reads |
| ramcount | return argument, extra gates due to ram read/writes |
| nnfcount | return argument, extra gates due to queued non native field gates |
Definition at line 361 of file ultra_circuit_builder.hpp.
|
inlineoverridevirtual |
Get the number of gates in a finalized circuit.
Reimplemented from bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 451 of file ultra_circuit_builder.hpp.
| plookup::BasicTable & bb::UltraCircuitBuilder_< ExecutionTrace >::get_table | ( | const plookup::BasicTableId | id | ) |
Get the basic table with provided ID from the set of tables for the present circuit; create it if it doesnt yet exist.
| ExecutionTrace |
| id |
Definition at line 541 of file ultra_circuit_builder.cpp.
|
inline |
Get combined size of all tables used in circuit.
Definition at line 491 of file ultra_circuit_builder.hpp.
|
inline |
Definition at line 544 of file ultra_circuit_builder.hpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::init_RAM_element | ( | const size_t | ram_id, |
| const size_t | index_value, | ||
| const uint32_t | value_witness | ||
| ) |
Initialize a RAM cell to equal value_witness
| ram_id | The index of the RAM array, which cell we are initializing |
| index_value | The index of the cell within the array (an actual index, not a witness index) |
| value_witness | The index of the witness with the value that should be in the |
Definition at line 1875 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace_ >::initialize_precomputed_table | ( | const plookup::BasicTableId | id, |
| bool(*)(std::vector< FF > &, std::vector< FF > &, std::vector< FF > &) | generator, | ||
| std::array< FF, 2 >(*)(const std::array< uint64_t, 2 >) | get_values_from_key | ||
| ) |
Plookup Methods
|
default |
|
default |
| void bb::UltraCircuitBuilder_< ExecutionTrace >::populate_public_inputs_block | ( | ) |
Copy the public input idx data into the public inputs trace block.
Definition at line 1503 of file ultra_circuit_builder.cpp.
|
inlineoverridevirtual |
Print the number and composition of gates in the circuit.
x
Reimplemented from bb::CircuitBuilderBase< ExecutionTrace_::FF >.
Definition at line 595 of file ultra_circuit_builder.hpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::process_non_native_field_multiplications | ( | ) |
Called in compute_prover_instance when finalizing circuit. Iterates over the cached_non_native_field_multiplication objects, removes duplicates, and instantiates the remainder as constraints`.
Definition at line 1522 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::process_range_list | ( | RangeList & | list | ) |
Definition at line 803 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::process_range_lists | ( | ) |
Definition at line 857 of file ultra_circuit_builder.cpp.
| uint32_t bb::UltraCircuitBuilder_< ExecutionTrace >::put_constant_variable | ( | const FF & | variable | ) |
Definition at line 520 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 2 > bb::UltraCircuitBuilder_< ExecutionTrace >::queue_partial_non_native_field_multiplication | ( | const non_native_partial_multiplication_witnesses< FF > & | input | ) |
Compute the limb-multiplication part of a non native field mul
i.e. compute the low 204 and high 204 bit components of a * b where a, b are nnf elements composed of 4 limbs with size DEFAULT_NON_NATIVE_FIELD_LIMB_BITS
Definition at line 1563 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::range_constrain_two_limbs | ( | const uint32_t | lo_idx, |
| const uint32_t | hi_idx, | ||
| const size_t | lo_limb_bits = DEFAULT_NON_NATIVE_FIELD_LIMB_BITS, |
||
| const size_t | hi_limb_bits = DEFAULT_NON_NATIVE_FIELD_LIMB_BITS, |
||
| std::string const & | msg = "range_constrain_two_limbs" |
||
| ) |
Non Native Field Arithmetic
NON NATIVE FIELD METHODS
Methods to efficiently apply constraints that evaluate non-native field multiplications Applies range constraints to two 70-bit limbs, splititng each into 5 14-bit sublimbs. We can efficiently chain together two 70-bit limb checks in 3 gates, using nnf gates
Definition at line 1206 of file ultra_circuit_builder.cpp.
| uint32_t bb::UltraCircuitBuilder_< ExecutionTrace >::read_RAM_array | ( | const size_t | ram_id, |
| const uint32_t | index_witness | ||
| ) |
Definition at line 1883 of file ultra_circuit_builder.cpp.
| uint32_t bb::UltraCircuitBuilder_< ExecutionTrace >::read_ROM_array | ( | const size_t | rom_id, |
| const uint32_t | index_witness | ||
| ) |
Read a single element from ROM.
| rom_id | The index of the array to read from |
| index_witness | The witness with the index inside the array |
Definition at line 1941 of file ultra_circuit_builder.cpp.
| std::array< uint32_t, 2 > bb::UltraCircuitBuilder_< ExecutionTrace >::read_ROM_array_pair | ( | const size_t | rom_id, |
| const uint32_t | index_witness | ||
| ) |
Read a pair of elements from ROM.
| rom_id | The id of the ROM array |
| index_witness | The witness containing the index in the array |
Definition at line 1954 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::set_ROM_element | ( | const size_t | rom_id, |
| const size_t | index_value, | ||
| const uint32_t | value_witness | ||
| ) |
Initialize a rom cell to equal value_witness
Initialize a ROM cell to equal value_witness index_value is a RAW VALUE that describes the cell index. It is NOT a witness When intializing ROM arrays, it is important that the index of the cell is known when compiling the circuit. This ensures that, for a given circuit, we know with 100% certainty that EVERY rom cell is initialized
| rom_id | The index of the ROM array, which cell we are initializing |
| index_value | The index of the cell within the array (an actual index, not a witness index) |
| value_witness | The index of the witness with the value that should be in the |
Definition at line 1911 of file ultra_circuit_builder.cpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::set_ROM_element_pair | ( | const size_t | rom_id, |
| const size_t | index_value, | ||
| const std::array< uint32_t, 2 > & | value_witnesses | ||
| ) |
Initialize a ROM array element with a pair of witness values.
| rom_id | ROM array id |
| index_value | Index in the array |
| value_witnesses | The witnesses to put in the slot |
Definition at line 1926 of file ultra_circuit_builder.cpp.
|
inline |
Add a list of witness indices to the finalize exclusion list.
| finalize_indices | List of witness indices to add to the finalize exclusion list |
Barretenberg has special isolated subcircuit detection logic that ensures that variables in the main circuit are all connected. However, during finalization we intentionally create some subcircuits that are only connected through the set permutation. We want to exclude these variables from this detection.
Definition at line 584 of file ultra_circuit_builder.hpp.
|
inline |
Add a witness index to the finalize exclusion list.
| var_idx | Witness index to add to the finalize exclusion list |
Barretenberg has special isolated subcircuit detection logic that ensures that variables in the main circuit are all connected. However, during finalization we intentionally create some subcircuits that are only connected through the set permutation. We want to exclude these variables from this detection.
Definition at line 576 of file ultra_circuit_builder.hpp.
|
inline |
Add a list of witness indices to the boomerang exclusion list.
| used_indices | List of witness indices to add to the boomerang exclusion list |
Barretenberg has special boomerang value detection logic that detects variables that are used in one gate However, there are some cases where we want to exclude certain variables from this detection (for example, when we show that x!=0 -> x*(x^-1) = 1).
Definition at line 562 of file ultra_circuit_builder.hpp.
|
inline |
Add a witness index to the boomerang exclusion list.
| var_idx | Witness index to add to the boomerang exclusion list |
Barretenberg has special boomerang value detection logic that detects variables that are used in one gate However, there are some cases where we want to exclude certain variables from this detection (for example, when we show that x!=0 -> x*(x^-1) = 1).
Definition at line 553 of file ultra_circuit_builder.hpp.
| void bb::UltraCircuitBuilder_< ExecutionTrace >::write_RAM_array | ( | const size_t | ram_id, |
| const uint32_t | index_witness, | ||
| const uint32_t | value_witness | ||
| ) |
Definition at line 1889 of file ultra_circuit_builder.cpp.
| ExecutionTrace bb::UltraCircuitBuilder_< ExecutionTrace_ >::blocks |
Definition at line 184 of file ultra_circuit_builder.hpp.
| std::vector<cached_partial_non_native_field_multiplication> bb::UltraCircuitBuilder_< ExecutionTrace_ >::cached_partial_non_native_field_multiplications |
Definition at line 207 of file ultra_circuit_builder.hpp.
| bool bb::UltraCircuitBuilder_< ExecutionTrace_ >::circuit_finalized = false |
Definition at line 209 of file ultra_circuit_builder.hpp.
| std::map<FF, uint32_t> bb::UltraCircuitBuilder_< ExecutionTrace_ >::constant_variable_indices |
Definition at line 188 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 55 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 52 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 54 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 53 of file ultra_circuit_builder.hpp.
| std::unordered_set<uint32_t> bb::UltraCircuitBuilder_< ExecutionTrace_ >::finalize_witnesses |
Definition at line 206 of file ultra_circuit_builder.hpp.
| std::vector<fr> bb::UltraCircuitBuilder_< ExecutionTrace_ >::ipa_proof |
Definition at line 211 of file ultra_circuit_builder.hpp.
| std::vector<plookup::BasicTable> bb::UltraCircuitBuilder_< ExecutionTrace_ >::lookup_tables |
Definition at line 191 of file ultra_circuit_builder.hpp.
| std::vector<uint32_t> bb::UltraCircuitBuilder_< ExecutionTrace_ >::memory_read_records |
Definition at line 197 of file ultra_circuit_builder.hpp.
| std::vector<uint32_t> bb::UltraCircuitBuilder_< ExecutionTrace_ >::memory_write_records |
Definition at line 199 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 48 of file ultra_circuit_builder.hpp.
|
staticconstexpr |
Definition at line 46 of file ultra_circuit_builder.hpp.
| std::map<uint64_t, RangeList> bb::UltraCircuitBuilder_< ExecutionTrace_ >::range_lists |
Definition at line 200 of file ultra_circuit_builder.hpp.
| RomRamLogic bb::UltraCircuitBuilder_< ExecutionTrace_ >::rom_ram_logic = RomRamLogic() |
Definition at line 194 of file ultra_circuit_builder.hpp.
| std::vector<uint32_t> bb::UltraCircuitBuilder_< ExecutionTrace_ >::used_witnesses |
Definition at line 203 of file ultra_circuit_builder.hpp.