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

#include <note_hash_tree_check.hpp>

Inheritance diagram for bb::avm2::simulation::NoteHashTreeCheck:
bb::avm2::simulation::NoteHashTreeCheckInterface bb::avm2::simulation::CheckpointNotifiable

Public Member Functions

 NoteHashTreeCheck (const FF &first_nullifier, Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, EventEmitterInterface< NoteHashTreeCheckEvent > &event_emitter)
 
FF get_first_nullifier () const override
 
bool note_hash_exists (const FF &unique_note_hash, const FF &leaf_value, uint64_t leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
 
AppendOnlyTreeSnapshot append_note_hash (const FF &note_hash, AztecAddress contract_address, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
 
AppendOnlyTreeSnapshot append_siloed_note_hash (const FF &siloed_note_hash, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
 
AppendOnlyTreeSnapshot append_unique_note_hash (const FF &unique_note_hash, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
 
void on_checkpoint_created () override
 
void on_checkpoint_committed () override
 
void on_checkpoint_reverted () override
 
- Public Member Functions inherited from bb::avm2::simulation::NoteHashTreeCheckInterface
virtual ~NoteHashTreeCheckInterface ()=default
 
- Public Member Functions inherited from bb::avm2::simulation::CheckpointNotifiable
virtual ~CheckpointNotifiable ()=default
 

Private Member Functions

FF make_siloed (AztecAddress contract_address, const FF &note_hash) const
 
FF make_nonce (uint64_t note_hash_counter) const
 
FF make_unique (const FF &siloed_note_hash, const FF &nonce) const
 
AppendOnlyTreeSnapshot append_note_hash_internal (FF note_hash, std::optional< AztecAddress > contract_address, bool should_make_unique, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot)
 

Private Attributes

FF first_nullifier
 
EventEmitterInterface< NoteHashTreeCheckEvent > & events
 
Poseidon2Interfaceposeidon2
 
MerkleCheckInterfacemerkle_check
 

Detailed Description

Definition at line 36 of file note_hash_tree_check.hpp.

Constructor & Destructor Documentation

◆ NoteHashTreeCheck()

bb::avm2::simulation::NoteHashTreeCheck::NoteHashTreeCheck ( const FF first_nullifier,
Poseidon2Interface poseidon2,
MerkleCheckInterface merkle_check,
EventEmitterInterface< NoteHashTreeCheckEvent > &  event_emitter 
)
inline

Definition at line 38 of file note_hash_tree_check.hpp.

Member Function Documentation

◆ append_note_hash()

AppendOnlyTreeSnapshot bb::avm2::simulation::NoteHashTreeCheck::append_note_hash ( const FF note_hash,
AztecAddress  contract_address,
uint64_t  note_hash_counter,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot 
)
overridevirtual

◆ append_note_hash_internal()

AppendOnlyTreeSnapshot bb::avm2::simulation::NoteHashTreeCheck::append_note_hash_internal ( FF  note_hash,
std::optional< AztecAddress contract_address,
bool  should_make_unique,
uint64_t  note_hash_counter,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot 
)
private

Definition at line 72 of file note_hash_tree_check.cpp.

◆ append_siloed_note_hash()

AppendOnlyTreeSnapshot bb::avm2::simulation::NoteHashTreeCheck::append_siloed_note_hash ( const FF siloed_note_hash,
uint64_t  note_hash_counter,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot 
)
overridevirtual

◆ append_unique_note_hash()

AppendOnlyTreeSnapshot bb::avm2::simulation::NoteHashTreeCheck::append_unique_note_hash ( const FF unique_note_hash,
uint64_t  note_hash_counter,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot 
)
overridevirtual

◆ get_first_nullifier()

FF bb::avm2::simulation::NoteHashTreeCheck::get_first_nullifier ( ) const
inlineoverridevirtual

◆ make_nonce()

FF bb::avm2::simulation::NoteHashTreeCheck::make_nonce ( uint64_t  note_hash_counter) const
private

Definition at line 26 of file note_hash_tree_check.cpp.

◆ make_siloed()

FF bb::avm2::simulation::NoteHashTreeCheck::make_siloed ( AztecAddress  contract_address,
const FF note_hash 
) const
private

Definition at line 21 of file note_hash_tree_check.cpp.

◆ make_unique()

FF bb::avm2::simulation::NoteHashTreeCheck::make_unique ( const FF siloed_note_hash,
const FF nonce 
) const
private

Definition at line 31 of file note_hash_tree_check.cpp.

◆ note_hash_exists()

bool bb::avm2::simulation::NoteHashTreeCheck::note_hash_exists ( const FF unique_note_hash,
const FF leaf_value,
uint64_t  leaf_index,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot snapshot 
)
overridevirtual

◆ on_checkpoint_committed()

void bb::avm2::simulation::NoteHashTreeCheck::on_checkpoint_committed ( )
overridevirtual

◆ on_checkpoint_created()

void bb::avm2::simulation::NoteHashTreeCheck::on_checkpoint_created ( )
overridevirtual

◆ on_checkpoint_reverted()

void bb::avm2::simulation::NoteHashTreeCheck::on_checkpoint_reverted ( )
overridevirtual

Member Data Documentation

◆ events

EventEmitterInterface<NoteHashTreeCheckEvent>& bb::avm2::simulation::NoteHashTreeCheck::events
private

Definition at line 85 of file note_hash_tree_check.hpp.

◆ first_nullifier

FF bb::avm2::simulation::NoteHashTreeCheck::first_nullifier
private

Definition at line 84 of file note_hash_tree_check.hpp.

◆ merkle_check

MerkleCheckInterface& bb::avm2::simulation::NoteHashTreeCheck::merkle_check
private

Definition at line 87 of file note_hash_tree_check.hpp.

◆ poseidon2

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

Definition at line 86 of file note_hash_tree_check.hpp.


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