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

#include <poseidon2_trace.hpp>

Public Member Functions

void process_hash (const simulation::EventEmitterInterface< simulation::Poseidon2HashEvent >::Container &hash_events, TraceContainer &trace)
 Processes the hash events for the Poseidon2 hash function. It populates the columns for the poseidon2_hash sub-trace. It generates a row per permutation call, (ca. 1/3 of number of inputs to hash).
 
void process_permutation (const simulation::EventEmitterInterface< simulation::Poseidon2PermutationEvent >::Container &perm_events, TraceContainer &trace)
 Processes the permutation events for the Poseidon2 permutation function. It populates the columns for the poseidon2_perm sub-trace. It generates exactly 1 row per invocation.
 
void process_permutation_with_memory (const simulation::EventEmitterInterface< simulation::Poseidon2PermutationMemoryEvent >::Container &perm_mem_events, TraceContainer &trace)
 Processes the events for the Poseidon2 memory-aware permutation function. It populates the columns for the poseidon2_perm_mem sub-trace. It generates exactly 1 row per invocation.
 

Static Public Attributes

static const InteractionDefinition interactions
 

Detailed Description

Definition at line 10 of file poseidon2_trace.hpp.

Member Function Documentation

◆ process_hash()

void bb::avm2::tracegen::Poseidon2TraceBuilder::process_hash ( const simulation::EventEmitterInterface< simulation::Poseidon2HashEvent >::Container &  hash_events,
TraceContainer trace 
)

Processes the hash events for the Poseidon2 hash function. It populates the columns for the poseidon2_hash sub-trace. It generates a row per permutation call, (ca. 1/3 of number of inputs to hash).

Parameters
hash_eventsThe container of hash events to process.
traceThe trace container.

Definition at line 105 of file poseidon2_trace.cpp.

◆ process_permutation()

void bb::avm2::tracegen::Poseidon2TraceBuilder::process_permutation ( const simulation::EventEmitterInterface< simulation::Poseidon2PermutationEvent >::Container &  perm_events,
TraceContainer trace 
)

Processes the permutation events for the Poseidon2 permutation function. It populates the columns for the poseidon2_perm sub-trace. It generates exactly 1 row per invocation.

Parameters
perm_eventsThe container of permutation events to process.
traceThe trace container.

Definition at line 173 of file poseidon2_trace.cpp.

◆ process_permutation_with_memory()

void bb::avm2::tracegen::Poseidon2TraceBuilder::process_permutation_with_memory ( const simulation::EventEmitterInterface< simulation::Poseidon2PermutationMemoryEvent >::Container &  perm_mem_events,
TraceContainer trace 
)

Processes the events for the Poseidon2 memory-aware permutation function. It populates the columns for the poseidon2_perm_mem sub-trace. It generates exactly 1 row per invocation.

Parameters
perm_mem_eventsThe container of the memory-aware permutation events to process.
traceThe trace container.

Definition at line 270 of file poseidon2_trace.cpp.

Member Data Documentation

◆ interactions

const InteractionDefinition bb::avm2::tracegen::Poseidon2TraceBuilder::interactions
static
Initial value:
=
InteractionDefinition()
.add<lookup_poseidon2_mem_input_output_poseidon2_perm_settings, InteractionType::LookupSequential>()
.add<lookup_poseidon2_mem_check_dst_addr_in_range_settings, InteractionType::LookupGeneric>(C::gt_sel)
lookup_settings< lookup_poseidon2_hash_poseidon2_perm_settings_ > lookup_poseidon2_hash_poseidon2_perm_settings
lookup_settings< lookup_poseidon2_mem_check_src_addr_in_range_settings_ > lookup_poseidon2_mem_check_src_addr_in_range_settings

Definition at line 22 of file poseidon2_trace.hpp.


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