Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::MerkleCheck Class Reference

#include <merkle_check.hpp>

Inheritance diagram for bb::avm2::simulation::MerkleCheck:
bb::avm2::simulation::MerkleCheckInterface

Public Member Functions

 MerkleCheck (Poseidon2Interface &poseidon2, EventEmitterInterface< MerkleCheckEvent > &event_emitter)
 
void assert_membership (const FF &leaf_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &root) override
 
FF write (const FF &current_value, const FF &new_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &current_root) override
 
- Public Member Functions inherited from bb::avm2::simulation::MerkleCheckInterface
virtual ~MerkleCheckInterface ()=default
 

Private Attributes

EventEmitterInterface< MerkleCheckEvent > & events
 
Poseidon2Interfaceposeidon2
 

Detailed Description

Definition at line 30 of file merkle_check.hpp.

Constructor & Destructor Documentation

◆ MerkleCheck()

bb::avm2::simulation::MerkleCheck::MerkleCheck ( Poseidon2Interface poseidon2,
EventEmitterInterface< MerkleCheckEvent > &  event_emitter 
)
inline

Definition at line 32 of file merkle_check.hpp.

Member Function Documentation

◆ assert_membership()

void bb::avm2::simulation::MerkleCheck::assert_membership ( const FF leaf_value,
const uint64_t  leaf_index,
std::span< const FF sibling_path,
const FF root 
)
overridevirtual

Implements bb::avm2::simulation::MerkleCheckInterface.

Definition at line 10 of file merkle_check.cpp.

◆ write()

FF bb::avm2::simulation::MerkleCheck::write ( const FF current_value,
const FF new_value,
const uint64_t  leaf_index,
std::span< const FF sibling_path,
const FF current_root 
)
overridevirtual

Implements bb::avm2::simulation::MerkleCheckInterface.

Definition at line 47 of file merkle_check.cpp.

Member Data Documentation

◆ events

EventEmitterInterface<MerkleCheckEvent>& bb::avm2::simulation::MerkleCheck::events
private

Definition at line 49 of file merkle_check.hpp.

◆ poseidon2

Poseidon2Interface& bb::avm2::simulation::MerkleCheck::poseidon2
private

Definition at line 50 of file merkle_check.hpp.


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