Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::tracegen::KeccakF1600TraceBuilder Class Referencefinal

#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.
 

Detailed Description

Definition at line 13 of file keccakf1600_trace.hpp.

Member Function Documentation

◆ process_memory_slices()

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).

Parameters
eventsContainer of KeccakF1600Event produced by simulation.
traceTrace to populate.

Definition at line 660 of file keccakf1600_trace.cpp.

◆ process_permutation()

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.

Parameters
eventsContainer of KeccakF1600Event produced by simulation.
traceTrace to populate.

Definition at line 490 of file keccakf1600_trace.cpp.

◆ process_single_slice()

void bb::avm2::tracegen::KeccakF1600TraceBuilder::process_single_slice ( const simulation::KeccakF1600Event event,
bool  write,
uint32_t &  row,
TraceContainer trace 
)
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.

Parameters
eventThe keccakf1600 event containing memory values and error info.
writeWhether this is a write slice (true) or read slice (false).
rowCurrent row index (updated in-place).
traceTrace to populate.

Definition at line 403 of file keccakf1600_trace.cpp.

Member Data Documentation

◆ interactions

const InteractionDefinition bb::avm2::tracegen::KeccakF1600TraceBuilder::interactions
static

Definition at line 21 of file keccakf1600_trace.hpp.


The documentation for this class was generated from the following files: