|
barretenberg
|
CircuitDataBackup is a structure we use to store all the information about the circuit that is needed to restore it back to a pre-finalized state. More...
#include <ultra_circuit_builder.hpp>
Public Types | |
| using | WireVector = std::vector< uint32_t, barretenberg::ContainerSlabAllocator< uint32_t > > |
| using | SelectorVector = std::vector< FF, barretenberg::ContainerSlabAllocator< FF > > |
Public Member Functions | |
| template<typename CircuitBuilder > | |
| void | restore_prefinilized_state (CircuitBuilder *builder) |
| Restores circuit constructor to a prefinilized state. | |
| template<typename CircuitBuilder > | |
| bool | is_same_state (const CircuitBuilder &builder) |
| Checks that the circuit state is the same as the stored circuit's one. | |
Static Public Member Functions | |
| template<typename CircuitBuilder > | |
| static CircuitDataBackup | store_full_state (const CircuitBuilder &builder) |
| Stores the state of everything logic-related in the builder. | |
| template<typename CircuitBuilder > | |
| static CircuitDataBackup | store_prefinilized_state (const CircuitBuilder *builder) |
| Stores the state of all members of the circuit constructor that are needed to restore the state after finalizing the circuit. | |
Public Attributes | |
| std::vector< uint32_t > | public_inputs |
| std::vector< FF > | variables |
| std::vector< uint32_t > | next_var_index |
| std::vector< uint32_t > | prev_var_index |
| std::vector< uint32_t > | real_variable_index |
| std::vector< uint32_t > | real_variable_tags |
| std::map< FF, uint32_t > | constant_variable_indices |
| WireVector | w_l |
| WireVector | w_r |
| WireVector | w_o |
| WireVector | w_4 |
| SelectorVector | q_m |
| SelectorVector | q_c |
| SelectorVector | q_1 |
| SelectorVector | q_2 |
| SelectorVector | q_3 |
| SelectorVector | q_4 |
| SelectorVector | q_arith |
| SelectorVector | q_sort |
| SelectorVector | q_elliptic |
| SelectorVector | q_aux |
| SelectorVector | q_lookup_type |
| uint32_t | current_tag = DUMMY_TAG |
| std::map< uint32_t, uint32_t > | tau |
| std::vector< RamTranscript > | ram_arrays |
| std::vector< RomTranscript > | rom_arrays |
| std::vector< uint32_t > | memory_read_records |
| std::vector< uint32_t > | memory_write_records |
| std::map< uint64_t, RangeList > | range_lists |
| std::vector< UltraCircuitBuilder_::cached_partial_non_native_field_multiplication > | cached_partial_non_native_field_multiplications |
| size_t | num_gates |
| bool | circuit_finalized = false |
CircuitDataBackup is a structure we use to store all the information about the circuit that is needed to restore it back to a pre-finalized state.
In check_circuit method in UltraCircuitBuilder we want to check that the whole circuit works, but ultra circuits need to have ram, rom and range gates added in the end for the check to be complete as well as the set permutation check, so we finalize the circuit when we check it. This structure allows us to restore the circuit to the state before the finalization.
|
inline |
Checks that the circuit state is the same as the stored circuit's one.
| builder |
|
inline |
|
inlinestatic |
Stores the state of everything logic-related in the builder.
We need this function for tests. Specifically, to ensure that we are not changing anything in check_circuit
| builder |
|
inlinestatic |
Stores the state of all members of the circuit constructor that are needed to restore the state after finalizing the circuit.
| builder |