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

#include <calldata_trace.hpp>

Public Member Functions

void process_retrieval (const simulation::EventEmitterInterface< simulation::CalldataEvent >::Container &events, TraceContainer &trace)
 Populate the calldata retrieval trace (calldata.pil) from calldata events.
 
void process_hashing (const simulation::EventEmitterInterface< simulation::CalldataEvent >::Container &events, TraceContainer &trace)
 Populate the calldata hashing trace (calldata_hashing.pil) from calldata events.
 

Static Public Attributes

static const InteractionDefinition interactions
 

Detailed Description

Definition at line 10 of file calldata_trace.hpp.

Member Function Documentation

◆ process_hashing()

void bb::avm2::tracegen::CalldataTraceBuilder::process_hashing ( const simulation::EventEmitterInterface< simulation::CalldataEvent >::Container &  events,
TraceContainer trace 
)

Populate the calldata hashing trace (calldata_hashing.pil) from calldata events.

Processes each event's calldata through Poseidon2 in chunks of 3 fields, filling rows with input fields, indices, padding flags, round counters, and the output hash. Handles padding when the input length is not a multiple of 3.

Parameters
eventsThe calldata events to hash.
traceThe trace container to populate.

Definition at line 59 of file calldata_trace.cpp.

◆ process_retrieval()

void bb::avm2::tracegen::CalldataTraceBuilder::process_retrieval ( const simulation::EventEmitterInterface< simulation::CalldataEvent >::Container &  events,
TraceContainer trace 
)

Populate the calldata retrieval trace (calldata.pil) from calldata events.

Fills one row per calldata field per context, with index, value, context_id, and end columns. Empty calldata produces no rows (see calldata.pil EMPTY CALLDATA).

Parameters
eventsThe calldata events.
traceThe trace container to populate.

Definition at line 23 of file calldata_trace.cpp.

Member Data Documentation

◆ interactions

const InteractionDefinition bb::avm2::tracegen::CalldataTraceBuilder::interactions
static
Initial value:
=
InteractionDefinition()
.add<InteractionType::LookupSequential, lookup_calldata_hashing_get_calldata_field_1_settings>()
.add<InteractionType::Permutation, perm_calldata_hashing_check_final_size_settings>()
lookup_settings< lookup_calldata_hashing_get_calldata_field_2_settings_ > lookup_calldata_hashing_get_calldata_field_2_settings
lookup_settings< lookup_calldata_hashing_poseidon2_hash_settings_ > lookup_calldata_hashing_poseidon2_hash_settings
lookup_settings< lookup_calldata_hashing_get_calldata_field_0_settings_ > lookup_calldata_hashing_get_calldata_field_0_settings

Definition at line 17 of file calldata_trace.hpp.


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