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

#include <hinting_dbs.hpp>

Inheritance diagram for bb::avm2::simulation::HintingRawDB:
bb::avm2::simulation::LowLevelMerkleDBInterface

Public Member Functions

 HintingRawDB (LowLevelMerkleDBInterface &db)
 
TreeSnapshots get_tree_roots () const override
 
SiblingPath get_sibling_path (MerkleTreeId tree_id, index_t leaf_index) const override
 
GetLowIndexedLeafResponse get_low_indexed_leaf (MerkleTreeId tree_id, const FF &value) const override
 
FF get_leaf_value (MerkleTreeId tree_id, index_t leaf_index) const override
 
IndexedLeaf< PublicDataLeafValueget_leaf_preimage_public_data_tree (index_t leaf_index) const override
 
IndexedLeaf< NullifierLeafValueget_leaf_preimage_nullifier_tree (index_t leaf_index) const override
 
SequentialInsertionResult< PublicDataLeafValueinsert_indexed_leaves_public_data_tree (const PublicDataLeafValue &leaf_value) override
 
SequentialInsertionResult< NullifierLeafValueinsert_indexed_leaves_nullifier_tree (const NullifierLeafValue &leaf_value) override
 
std::vector< AppendLeafResultappend_leaves (MerkleTreeId tree_id, std::span< const FF > leaves) override
 
void pad_tree (MerkleTreeId tree_id, size_t num_leaves) override
 
void create_checkpoint () override
 
void commit_checkpoint () override
 
void revert_checkpoint () override
 
uint32_t get_checkpoint_id () const override
 
void dump_hints (ExecutionHints &hints)
 
- Public Member Functions inherited from bb::avm2::simulation::LowLevelMerkleDBInterface
virtual ~LowLevelMerkleDBInterface ()=default
 

Private Member Functions

AppendOnlyTreeSnapshot get_tree_info (MerkleTreeId tree_id) const
 
AppendOnlyTreeSnapshot appendLeafInternal (const AppendOnlyTreeSnapshot &state_before, const SiblingPath &path, const FF &root_after, MerkleTreeId tree_id, const FF &leaf)
 

Private Attributes

LowLevelMerkleDBInterfacedb
 
uint32_t checkpoint_action_counter = 0
 
MappedMerkleHints merkle_hints
 

Detailed Description

Definition at line 53 of file hinting_dbs.hpp.

Constructor & Destructor Documentation

◆ HintingRawDB()

bb::avm2::simulation::HintingRawDB::HintingRawDB ( LowLevelMerkleDBInterface db)
inline

Definition at line 55 of file hinting_dbs.hpp.

Member Function Documentation

◆ append_leaves()

std::vector< AppendLeafResult > bb::avm2::simulation::HintingRawDB::append_leaves ( world_state::MerkleTreeId  tree_id,
std::span< const FF leaves 
)
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 382 of file hinting_dbs.cpp.

◆ appendLeafInternal()

AppendOnlyTreeSnapshot bb::avm2::simulation::HintingRawDB::appendLeafInternal ( const AppendOnlyTreeSnapshot state_before,
const SiblingPath path,
const FF root_after,
world_state::MerkleTreeId  tree_id,
const FF leaf 
)
private

Definition at line 398 of file hinting_dbs.cpp.

◆ commit_checkpoint()

void bb::avm2::simulation::HintingRawDB::commit_checkpoint ( )
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 340 of file hinting_dbs.cpp.

◆ create_checkpoint()

void bb::avm2::simulation::HintingRawDB::create_checkpoint ( )
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 323 of file hinting_dbs.cpp.

◆ dump_hints()

void bb::avm2::simulation::HintingRawDB::dump_hints ( ExecutionHints hints)

Definition at line 425 of file hinting_dbs.cpp.

◆ get_checkpoint_id()

uint32_t bb::avm2::simulation::HintingRawDB::get_checkpoint_id ( ) const
inlineoverridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 79 of file hinting_dbs.hpp.

◆ get_leaf_preimage_nullifier_tree()

IndexedLeaf< NullifierLeafValue > bb::avm2::simulation::HintingRawDB::get_leaf_preimage_nullifier_tree ( index_t  leaf_index) const
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 266 of file hinting_dbs.cpp.

◆ get_leaf_preimage_public_data_tree()

IndexedLeaf< PublicDataLeafValue > bb::avm2::simulation::HintingRawDB::get_leaf_preimage_public_data_tree ( index_t  leaf_index) const
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 252 of file hinting_dbs.cpp.

◆ get_leaf_value()

FF bb::avm2::simulation::HintingRawDB::get_leaf_value ( world_state::MerkleTreeId  tree_id,
index_t  leaf_index 
) const
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 240 of file hinting_dbs.cpp.

◆ get_low_indexed_leaf()

GetLowIndexedLeafResponse bb::avm2::simulation::HintingRawDB::get_low_indexed_leaf ( world_state::MerkleTreeId  tree_id,
const FF value 
) const
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 209 of file hinting_dbs.cpp.

◆ get_sibling_path()

SiblingPath bb::avm2::simulation::HintingRawDB::get_sibling_path ( world_state::MerkleTreeId  tree_id,
index_t  leaf_index 
) const
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 198 of file hinting_dbs.cpp.

◆ get_tree_info()

AppendOnlyTreeSnapshot bb::avm2::simulation::HintingRawDB::get_tree_info ( world_state::MerkleTreeId  tree_id) const
private

Definition at line 192 of file hinting_dbs.cpp.

◆ get_tree_roots()

TreeSnapshots bb::avm2::simulation::HintingRawDB::get_tree_roots ( ) const
inlineoverridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 59 of file hinting_dbs.hpp.

◆ insert_indexed_leaves_nullifier_tree()

SequentialInsertionResult< NullifierLeafValue > bb::avm2::simulation::HintingRawDB::insert_indexed_leaves_nullifier_tree ( const NullifierLeafValue leaf_value)
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 301 of file hinting_dbs.cpp.

◆ insert_indexed_leaves_public_data_tree()

SequentialInsertionResult< PublicDataLeafValue > bb::avm2::simulation::HintingRawDB::insert_indexed_leaves_public_data_tree ( const PublicDataLeafValue leaf_value)
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 279 of file hinting_dbs.cpp.

◆ pad_tree()

void bb::avm2::simulation::HintingRawDB::pad_tree ( world_state::MerkleTreeId  tree_id,
size_t  num_leaves 
)
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 376 of file hinting_dbs.cpp.

◆ revert_checkpoint()

void bb::avm2::simulation::HintingRawDB::revert_checkpoint ( )
overridevirtual

Implements bb::avm2::simulation::LowLevelMerkleDBInterface.

Definition at line 356 of file hinting_dbs.cpp.

Member Data Documentation

◆ checkpoint_action_counter

uint32_t bb::avm2::simulation::HintingRawDB::checkpoint_action_counter = 0
private

Definition at line 85 of file hinting_dbs.hpp.

◆ db

LowLevelMerkleDBInterface& bb::avm2::simulation::HintingRawDB::db
private

Definition at line 84 of file hinting_dbs.hpp.

◆ merkle_hints

MappedMerkleHints bb::avm2::simulation::HintingRawDB::merkle_hints
mutableprivate

Definition at line 87 of file hinting_dbs.hpp.


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