|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <keccakf1600_trace.hpp>
Public Member Functions | |
| void | process_permutation (const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container &events, TraceContainer &trace) |
| Populate the keccakf1600 sub-trace from permutation events. | |
| void | process_memory_slices (const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container &events, TraceContainer &trace) |
| Populate the keccak_memory sub-trace for read/write memory slices. | |
Static Public Attributes | |
| static const InteractionDefinition | interactions |
Private Member Functions | |
| void | process_single_slice (const simulation::KeccakF1600Event &event, bool write, uint32_t &row, TraceContainer &trace) |
| Populate a single memory-slice (read or write) for one event. | |
Definition at line 13 of file keccakf1600_trace.hpp.
| void bb::avm2::tracegen::KeccakF1600TraceBuilder::process_memory_slices | ( | const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container & | events, |
| TraceContainer & | trace | ||
| ) |
Populate the keccak_memory sub-trace for read/write memory slices.
Skips events with out-of-range errors entirely. For tag-error events only the read slice is populated (up to the offending index). For success events both read and write slices are populated (25 rows each).
| events | Container of KeccakF1600Event produced by simulation. |
| trace | Trace to populate. |
Definition at line 660 of file keccakf1600_trace.cpp.
| void bb::avm2::tracegen::KeccakF1600TraceBuilder::process_permutation | ( | const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container & | events, |
| TraceContainer & | trace | ||
| ) |
Populate the keccakf1600 sub-trace from permutation events.
For each event, generates 24 rows (one per round) on the happy path, or a single row when an error (out-of-range or tag error) occurred.
| events | Container of KeccakF1600Event produced by simulation. |
| trace | Trace to populate. |
Definition at line 490 of file keccakf1600_trace.cpp.
|
private |
Populate a single memory-slice (read or write) for one event.
Generates one row per state word. On a read with a tag error, stops at the first offending word. Uses the "triangle" pattern: row i sets val[0]..val[N-1-i] with slice values shifted by i.
| event | The keccakf1600 event containing memory values and error info. |
| write | Whether this is a write slice (true) or read slice (false). |
| row | Current row index (updated in-place). |
| trace | Trace to populate. |
Definition at line 403 of file keccakf1600_trace.cpp.
|
static |
Definition at line 21 of file keccakf1600_trace.hpp.