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

#include <nullifier_tree_check.hpp>

Inheritance diagram for bb::avm2::simulation::NullifierTreeCheck:
bb::avm2::simulation::NullifierTreeCheckInterface bb::avm2::simulation::CheckpointNotifiable

Public Member Functions

 NullifierTreeCheck (Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, FieldGreaterThanInterface &field_gt, EventEmitterInterface< NullifierTreeCheckEvent > &event_emitter)
 
void assert_read (const FF &nullifier, std::optional< AztecAddress > contract_address, bool exists, const NullifierTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
 
AppendOnlyTreeSnapshot write (const FF &nullifier, std::optional< AztecAddress > contract_address, uint64_t nullifier_counter, const NullifierTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > low_leaf_sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot, std::optional< std::span< const FF > > insertion_sibling_path) override
 
void on_checkpoint_created () override
 
void on_checkpoint_committed () override
 
void on_checkpoint_reverted () override
 
- Public Member Functions inherited from bb::avm2::simulation::NullifierTreeCheckInterface
virtual ~NullifierTreeCheckInterface ()=default
 
- Public Member Functions inherited from bb::avm2::simulation::CheckpointNotifiable
virtual ~CheckpointNotifiable ()=default
 

Private Member Functions

FF silo_nullifier (const FF &nullifier, AztecAddress contract_address)
 
void validate_low_leaf (const FF &nullifier, const NullifierTreeLeafPreimage &low_leaf_preimage, bool exists)
 

Private Attributes

EventEmitterInterface< NullifierTreeCheckEvent > & events
 
Poseidon2Interfaceposeidon2
 
MerkleCheckInterfacemerkle_check
 
FieldGreaterThanInterfacefield_gt
 

Detailed Description

Definition at line 32 of file nullifier_tree_check.hpp.

Constructor & Destructor Documentation

◆ NullifierTreeCheck()

bb::avm2::simulation::NullifierTreeCheck::NullifierTreeCheck ( Poseidon2Interface poseidon2,
MerkleCheckInterface merkle_check,
FieldGreaterThanInterface field_gt,
EventEmitterInterface< NullifierTreeCheckEvent > &  event_emitter 
)
inline

Definition at line 34 of file nullifier_tree_check.hpp.

Member Function Documentation

◆ assert_read()

void bb::avm2::simulation::NullifierTreeCheck::assert_read ( const FF nullifier,
std::optional< AztecAddress contract_address,
bool  exists,
const NullifierTreeLeafPreimage low_leaf_preimage,
uint64_t  low_leaf_index,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot snapshot 
)
overridevirtual

◆ on_checkpoint_committed()

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

◆ on_checkpoint_created()

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

◆ on_checkpoint_reverted()

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

◆ silo_nullifier()

FF bb::avm2::simulation::NullifierTreeCheck::silo_nullifier ( const FF nullifier,
AztecAddress  contract_address 
)
private

Definition at line 8 of file nullifier_tree_check.cpp.

◆ validate_low_leaf()

void bb::avm2::simulation::NullifierTreeCheck::validate_low_leaf ( const FF nullifier,
const NullifierTreeLeafPreimage low_leaf_preimage,
bool  exists 
)
private

Definition at line 13 of file nullifier_tree_check.cpp.

◆ write()

AppendOnlyTreeSnapshot bb::avm2::simulation::NullifierTreeCheck::write ( const FF nullifier,
std::optional< AztecAddress contract_address,
uint64_t  nullifier_counter,
const NullifierTreeLeafPreimage low_leaf_preimage,
uint64_t  low_leaf_index,
std::span< const FF low_leaf_sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot,
std::optional< std::span< const FF > >  insertion_sibling_path 
)
overridevirtual

Member Data Documentation

◆ events

EventEmitterInterface<NullifierTreeCheckEvent>& bb::avm2::simulation::NullifierTreeCheck::events
private

Definition at line 68 of file nullifier_tree_check.hpp.

◆ field_gt

FieldGreaterThanInterface& bb::avm2::simulation::NullifierTreeCheck::field_gt
private

Definition at line 71 of file nullifier_tree_check.hpp.

◆ merkle_check

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

Definition at line 70 of file nullifier_tree_check.hpp.

◆ poseidon2

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

Definition at line 69 of file nullifier_tree_check.hpp.


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