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

#include <public_data_tree_check.hpp>

Inheritance diagram for bb::avm2::simulation::PublicDataTreeCheck:
bb::avm2::simulation::PublicDataTreeCheckInterface bb::avm2::simulation::CheckpointNotifiable

Public Member Functions

 PublicDataTreeCheck (Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, FieldGreaterThanInterface &field_gt, ExecutionIdGetterInterface &execution_id_manager, EventEmitterInterface< PublicDataTreeCheckEvent > &read_event_emitter)
 
void assert_read (const FF &slot, const AztecAddress &contract_address, const FF &value, const PublicDataTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
 
AppendOnlyTreeSnapshot write (const FF &slot, const AztecAddress &contract_address, const FF &value, const PublicDataTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > low_leaf_sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot, std::span< const FF > insertion_sibling_path, bool is_protocol_write) override
 
void on_checkpoint_created () override
 
void on_checkpoint_committed () override
 
void on_checkpoint_reverted () override
 
- Public Member Functions inherited from bb::avm2::simulation::PublicDataTreeCheckInterface
virtual ~PublicDataTreeCheckInterface ()=default
 
- Public Member Functions inherited from bb::avm2::simulation::CheckpointNotifiable
virtual ~CheckpointNotifiable ()=default
 

Private Member Functions

void validate_low_leaf_jumps_over_slot (const PublicDataTreeLeafPreimage &low_leaf_preimage, const FF &leaf_slot)
 
FF compute_leaf_slot (const AztecAddress &contract_address, const FF &slot)
 

Private Attributes

EventEmitterInterface< PublicDataTreeCheckEvent > & events
 
Poseidon2Interfaceposeidon2
 
MerkleCheckInterfacemerkle_check
 
FieldGreaterThanInterfacefield_gt
 
ExecutionIdGetterInterfaceexecution_id_manager
 

Detailed Description

Definition at line 32 of file public_data_tree_check.hpp.

Constructor & Destructor Documentation

◆ PublicDataTreeCheck()

bb::avm2::simulation::PublicDataTreeCheck::PublicDataTreeCheck ( Poseidon2Interface poseidon2,
MerkleCheckInterface merkle_check,
FieldGreaterThanInterface field_gt,
ExecutionIdGetterInterface execution_id_manager,
EventEmitterInterface< PublicDataTreeCheckEvent > &  read_event_emitter 
)
inline

Definition at line 34 of file public_data_tree_check.hpp.

Member Function Documentation

◆ assert_read()

void bb::avm2::simulation::PublicDataTreeCheck::assert_read ( const FF slot,
const AztecAddress contract_address,
const FF value,
const PublicDataTreeLeafPreimage low_leaf_preimage,
uint64_t  low_leaf_index,
std::span< const FF sibling_path,
const AppendOnlyTreeSnapshot snapshot 
)
overridevirtual

◆ compute_leaf_slot()

FF bb::avm2::simulation::PublicDataTreeCheck::compute_leaf_slot ( const AztecAddress contract_address,
const FF slot 
)
private

Definition at line 7 of file public_data_tree_check.cpp.

◆ on_checkpoint_committed()

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

◆ on_checkpoint_created()

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

◆ on_checkpoint_reverted()

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

◆ validate_low_leaf_jumps_over_slot()

void bb::avm2::simulation::PublicDataTreeCheck::validate_low_leaf_jumps_over_slot ( const PublicDataTreeLeafPreimage low_leaf_preimage,
const FF leaf_slot 
)
private

Definition at line 12 of file public_data_tree_check.cpp.

◆ write()

AppendOnlyTreeSnapshot bb::avm2::simulation::PublicDataTreeCheck::write ( const FF slot,
const AztecAddress contract_address,
const FF value,
const PublicDataTreeLeafPreimage low_leaf_preimage,
uint64_t  low_leaf_index,
std::span< const FF low_leaf_sibling_path,
const AppendOnlyTreeSnapshot prev_snapshot,
std::span< const FF insertion_sibling_path,
bool  is_protocol_write 
)
overridevirtual

Member Data Documentation

◆ events

EventEmitterInterface<PublicDataTreeCheckEvent>& bb::avm2::simulation::PublicDataTreeCheck::events
private

Definition at line 69 of file public_data_tree_check.hpp.

◆ execution_id_manager

ExecutionIdGetterInterface& bb::avm2::simulation::PublicDataTreeCheck::execution_id_manager
private

Definition at line 73 of file public_data_tree_check.hpp.

◆ field_gt

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

Definition at line 72 of file public_data_tree_check.hpp.

◆ merkle_check

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

Definition at line 71 of file public_data_tree_check.hpp.

◆ poseidon2

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

Definition at line 70 of file public_data_tree_check.hpp.


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