|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Namespaces | |
| namespace | detail |
Typedefs | |
| using | C = Column |
| template<size_t N> | |
| using | RefTuple = typename detail::RefTupleHelper< N >::type |
| using | DstIndex = unordered_flat_map< size_t, std::vector< uint32_t > > |
| using | Poseidon2 = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > |
Enumerations | |
| enum class | SubtraceSel : uint8_t { EXECUTION , ALU , BITWISE , CAST , CALLDATACOPY , RETURNDATACOPY , SET , GETCONTRACTINSTANCE , EMITPUBLICLOG , POSEIDON2PERM , SHA256COMPRESSION , KECCAKF1600 , ECC , TORADIXBE , MAX = TORADIXBE } |
| enum class | InteractionType { LookupGeneric , LookupSequential , LookupIntoBitwise , LookupIntoIndexedByRow , LookupIntoPDecomposition , Permutation , MultiPermutation } |
Functions | |
| template<typename EventVariant > | |
| std::unordered_map< size_t, size_t > | compute_reverted_in_map (const std::vector< EventVariant > &events) |
| Computes a mapping of checkpoint creation indices to the indices where they are reverted. | |
| template<typename EventType , typename ProcessEventFn > | |
| void | process_with_discard (const std::vector< std::variant< EventType, simulation::CheckPointEventType > > &events, ProcessEventFn &&process_event) |
| Processes events from a stream, attaching a discard flag to indicate reverted checkpoints. | |
| const std::unordered_map< ExecutionOpCode, SubtraceInfo > & | get_subtrace_info_map () |
| FF | get_subtrace_id (SubtraceSel subtrace_sel) |
| Get the subtrace ID for a given subtrace enum. | |
| Column | get_subtrace_selector (SubtraceSel subtrace_sel) |
| Get the column selector for a given subtrace selector. | |
| Column | get_dyn_gas_selector (uint32_t dyn_gas_id) |
| Get the column selector for a given dynamic gas ID. | |
| void | order_jobs_by_destination_columns (std::vector< std::unique_ptr< InteractionBuilderInterface > > &jobs) |
| template<typename T > | |
| std::vector< T > | concatenate_jobs (std::vector< T > &&first, auto &&... rest) |
| const std::unordered_map< TransactionPhase, TxPhaseSpec > & | get_tx_phase_spec_map () |
| bool | is_shift (ColumnAndShifts c) |
| std::optional< ColumnAndShifts > | shift_column (Column c) |
| std::optional< Column > | unshift_column (ColumnAndShifts c) |
| AvmFullRow | get_full_row (const TraceContainer &trace, uint32_t row) |
| AvmFullRowConstRef | get_full_row_ref (const TraceContainer &trace, uint32_t row) |
| AvmFullRow | get_full_row (const class TraceContainer &trace, uint32_t row) |
| AvmFullRowConstRef | get_full_row_ref (const class TraceContainer &trace, uint32_t row) |
Variables | |
| constexpr uint32_t | PRECOMPUTED_TRACE_SIZE = (1 << 16) |
| typedef Column bb::avm2::tracegen::C |
Definition at line 20 of file keccakf1600_trace.cpp.
| using bb::avm2::tracegen::DstIndex = typedef unordered_flat_map<size_t, std::vector<uint32_t> > |
Definition at line 30 of file shared_index_cache.hpp.
| using bb::avm2::tracegen::Poseidon2 = typedef crypto::Poseidon2<crypto::Poseidon2Bn254ScalarFieldParams> |
Definition at line 14 of file merkle_check_trace.cpp.
| using bb::avm2::tracegen::RefTuple = typedef typename detail::RefTupleHelper<N>::type |
Definition at line 21 of file interaction_builder.hpp.
|
strong |
| Enumerator | |
|---|---|
| LookupGeneric | |
| LookupSequential | |
| LookupIntoBitwise | |
| LookupIntoIndexedByRow | |
| LookupIntoPDecomposition | |
| Permutation | |
| MultiPermutation | |
Definition at line 20 of file interaction_def.hpp.
|
strong |
| Enumerator | |
|---|---|
| EXECUTION | |
| ALU | |
| BITWISE | |
| CAST | |
| CALLDATACOPY | |
| RETURNDATACOPY | |
| SET | |
| GETCONTRACTINSTANCE | |
| EMITPUBLICLOG | |
| POSEIDON2PERM | |
| SHA256COMPRESSION | |
| KECCAKF1600 | |
| ECC | |
| TORADIXBE | |
| MAX | |
Definition at line 15 of file instruction_spec.hpp.
| std::unordered_map< size_t, size_t > bb::avm2::tracegen::compute_reverted_in_map | ( | const std::vector< EventVariant > & | events | ) |
Computes a mapping of checkpoint creation indices to the indices where they are reverted.
Scans through an event stream containing checkpoint events (CREATE, COMMIT, REVERT) and builds a map identifying which CREATE_CHECKPOINT events are later reverted by REVERT_CHECKPOINT events. This is used to determine which events between a checkpoint creation and its revert should be marked as discarded.
The function maintains a stack of checkpoint indices. When a CREATE_CHECKPOINT is encountered, its index is pushed. When a COMMIT_CHECKPOINT is encountered, the top is popped (checkpoint committed successfully). When a REVERT_CHECKPOINT is encountered, the top checkpoint index is recorded in the map before being popped.
| EventVariant | A std::variant type that includes simulation::CheckPointEventType. |
| events | The vector of events containing checkpoints and other event types. |
Definition at line 34 of file discard_reconstruction.hpp.
| std::vector< T > bb::avm2::tracegen::concatenate_jobs | ( | std::vector< T > && | first, |
| auto &&... | rest | ||
| ) |
Definition at line 34 of file interaction_builder.hpp.
| Column bb::avm2::tracegen::get_dyn_gas_selector | ( | uint32_t | dyn_gas_id | ) |
Get the column selector for a given dynamic gas ID.
| dyn_gas_id | The dynamic gas ID. |
Definition at line 186 of file instruction_spec.cpp.
| AvmFullRow bb::avm2::tracegen::get_full_row | ( | const class TraceContainer & | trace, |
| uint32_t | row | ||
| ) |
| AvmFullRow bb::avm2::tracegen::get_full_row | ( | const TraceContainer & | trace, |
| uint32_t | row | ||
| ) |
Definition at line 51 of file trace_conversion.cpp.
| AvmFullRowConstRef bb::avm2::tracegen::get_full_row_ref | ( | const class TraceContainer & | trace, |
| uint32_t | row | ||
| ) |
| AvmFullRowConstRef bb::avm2::tracegen::get_full_row_ref | ( | const TraceContainer & | trace, |
| uint32_t | row | ||
| ) |
Definition at line 67 of file trace_conversion.cpp.
| FF bb::avm2::tracegen::get_subtrace_id | ( | SubtraceSel | subtrace_sel | ) |
Get the subtrace ID for a given subtrace enum.
| subtrace_sel | The subtrace enum. |
Definition at line 108 of file instruction_spec.cpp.
| const std::unordered_map< ExecutionOpCode, SubtraceInfo > & bb::avm2::tracegen::get_subtrace_info_map | ( | ) |
Definition at line 13 of file instruction_spec.cpp.
| Column bb::avm2::tracegen::get_subtrace_selector | ( | SubtraceSel | subtrace_sel | ) |
Get the column selector for a given subtrace selector.
| subtrace_sel | The subtrace selector. |
Definition at line 146 of file instruction_spec.cpp.
| const std::unordered_map< TransactionPhase, TxPhaseSpec > & bb::avm2::tracegen::get_tx_phase_spec_map | ( | ) |
Definition at line 16 of file phase_spec.cpp.
| bool bb::avm2::tracegen::is_shift | ( | ColumnAndShifts | c | ) |
Definition at line 11 of file trace_conversion.cpp.
| void bb::avm2::tracegen::order_jobs_by_destination_columns | ( | std::vector< std::unique_ptr< InteractionBuilderInterface > > & | jobs | ) |
Definition at line 9 of file interaction_builder.cpp.
| void bb::avm2::tracegen::process_with_discard | ( | const std::vector< std::variant< EventType, simulation::CheckPointEventType > > & | events, |
| ProcessEventFn && | process_event | ||
| ) |
Processes events from a stream, attaching a discard flag to indicate reverted checkpoints.
This function iterates through an event stream containing both payload events (e.g., tree operations) and checkpoint management events. For each payload event, it calls the provided callback with the event and a boolean discard flag indicating whether the event belongs to a reverted checkpoint.
Events between a CREATE_CHECKPOINT (that will later be reverted) and its corresponding REVERT_CHECKPOINT are marked with discard=true. All other payload events are marked with discard=false.
Checkpoint events themselves are consumed by this function and not passed to the callback.
| EventType | The type of payload events (e.g., IndexedTreeReadWriteEvent). |
| ProcessEventFn | A callable type accepting (const EventType&, bool discard). |
| events | The vector of events containing both EventType and CheckPointEventType variants. |
| process_event | The callback function to invoke for each payload event with its discard flag. |
Definition at line 86 of file discard_reconstruction.hpp.
| std::optional< ColumnAndShifts > bb::avm2::tracegen::shift_column | ( | Column | c | ) |
Definition at line 23 of file trace_conversion.cpp.
| std::optional< Column > bb::avm2::tracegen::unshift_column | ( | ColumnAndShifts | c | ) |
Definition at line 37 of file trace_conversion.cpp.
|
constexpr |
Definition at line 11 of file precomputed_trace.hpp.