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

#include <merkle_check_trace.hpp>

Public Member Functions

void process (const simulation::EventEmitterInterface< simulation::MerkleCheckEvent >::Container &events, TraceContainer &trace)
 Trace generation for the MerkleCheck gadget. It handles both READ and WRITE MerkleCheck events. While MerkleCheckEvent does not explicitly state whether it is a READ or WRITE event, the distinction is inferred from the presence of the new_leaf_value field (std::optional<FF>).
 

Static Public Attributes

static const InteractionDefinition interactions
 

Detailed Description

Definition at line 10 of file merkle_check_trace.hpp.

Member Function Documentation

◆ process()

void bb::avm2::tracegen::MerkleCheckTraceBuilder::process ( const simulation::EventEmitterInterface< simulation::MerkleCheckEvent >::Container &  events,
TraceContainer trace 
)

Trace generation for the MerkleCheck gadget. It handles both READ and WRITE MerkleCheck events. While MerkleCheckEvent does not explicitly state whether it is a READ or WRITE event, the distinction is inferred from the presence of the new_leaf_value field (std::optional<FF>).

Note
A precondition/invariant for each event is that new_leaf_value and new_root are either both present or both absent. Additionally, root and new_root must be correct according to the sibling path, the leaf value, the leaf index and the new leaf value. Any violation such as a sibling path being too short will cause a circuit completeness issue. Simulation gadgets must guarantee the above consistency.
Parameters
eventsThe MerkleCheck events to process.
traceThe trace to write to.

Definition at line 30 of file merkle_check_trace.cpp.

Member Data Documentation

◆ interactions

const InteractionDefinition bb::avm2::tracegen::MerkleCheckTraceBuilder::interactions
static
Initial value:
=
InteractionDefinition()
.add<lookup_merkle_check_merkle_poseidon2_write_settings, InteractionType::LookupSequential>()
lookup_settings< lookup_merkle_check_merkle_poseidon2_read_settings_ > lookup_merkle_check_merkle_poseidon2_read_settings

Definition at line 15 of file merkle_check_trace.hpp.


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