|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <tx_trace.hpp>
Public Member Functions | |
| void | process (const simulation::EventEmitterInterface< simulation::TxEvent >::Container &events, TraceContainer &trace) |
| Process the TX events and populate the relevant TX columns in the trace. A processed TxEvent is either a TxStartupEvent or a TxPhaseEvent. A TxStartupEvent is used to provide some global information about the transaction, such as the gas limit or the phase lengths, and does not populate any rows in the trace. We have an outer loop iterating over each phase and an inner loop iterating over the events in the phase. A phase event is one of the types specified in the TxPhaseEventType enum and embedded in the TxPhaseEvent. A TxPhaseEvent is used to represent an event that occurs during a specific phase of the transaction. Each phase event populates exactly one row in the trace. The order of the phases is defined by the TransactionPhase enum. | |
Static Public Attributes | |
| static const InteractionDefinition | interactions |
Definition at line 10 of file tx_trace.hpp.
| void bb::avm2::tracegen::TxTraceBuilder::process | ( | const simulation::EventEmitterInterface< simulation::TxEvent >::Container & | events, |
| TraceContainer & | trace | ||
| ) |
Process the TX events and populate the relevant TX columns in the trace. A processed TxEvent is either a TxStartupEvent or a TxPhaseEvent. A TxStartupEvent is used to provide some global information about the transaction, such as the gas limit or the phase lengths, and does not populate any rows in the trace. We have an outer loop iterating over each phase and an inner loop iterating over the events in the phase. A phase event is one of the types specified in the TxPhaseEventType enum and embedded in the TxPhaseEvent. A TxPhaseEvent is used to represent an event that occurs during a specific phase of the transaction. Each phase event populates exactly one row in the trace. The order of the phases is defined by the TransactionPhase enum.
TxPhaseEvent variant types:
Transaction phases and TxPhaseEvent variant types:
A nuance of the tracegen for the tx trace is that if there are no events in a phase, we still need to emit a row for this "padded" row. This row is needed to simplify the circuit constraints and ensure that we have continuity in the tree state propagation.
| events | The container of TX events to process. |
| trace | The trace container. |
Definition at line 546 of file tx_trace.cpp.
|
static |
Definition at line 15 of file tx_trace.hpp.