Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::world_state Namespace Reference

Classes

struct  BatchInsertionResult
 
struct  Fork
 
struct  SequentialInsertionResult
 
struct  TreeWithStore
 
class  WorldState
 Holds the Merkle trees responsible for storing the state of the Aztec protocol. More...
 
struct  WorldStateDBStats
 
struct  WorldStateMeta
 
struct  WorldStateRevision
 
struct  WorldStateStatusFull
 
struct  WorldStateStatusSummary
 
struct  WorldStateStores
 

Typedefs

using HashPolicy = crypto::merkle_tree::Poseidon2HashPolicy
 
using FrStore = crypto::merkle_tree::ContentAddressedCachedTreeStore< fr >
 
using FrTree = crypto::merkle_tree::ContentAddressedAppendOnlyTree< FrStore, HashPolicy >
 
using NullifierStore = crypto::merkle_tree::ContentAddressedCachedTreeStore< crypto::merkle_tree::NullifierLeafValue >
 
using NullifierTree = crypto::merkle_tree::ContentAddressedIndexedTree< NullifierStore, HashPolicy >
 
using PublicDataStore = crypto::merkle_tree::ContentAddressedCachedTreeStore< crypto::merkle_tree::PublicDataLeafValue >
 
using PublicDataTree = crypto::merkle_tree::ContentAddressedIndexedTree< PublicDataStore, HashPolicy >
 
using Tree = std::variant< TreeWithStore< FrTree >, TreeWithStore< NullifierTree >, TreeWithStore< PublicDataTree > >
 
using TreeStateReference = std::pair< bb::fr, bb::crypto::merkle_tree::index_t >
 
using StateReference = std::unordered_map< MerkleTreeId, TreeStateReference >
 

Enumerations

enum  MerkleTreeId {
  NULLIFIER_TREE = 0 , NOTE_HASH_TREE = 1 , PUBLIC_DATA_TREE = 2 , L1_TO_L2_MESSAGE_TREE = 3 ,
  ARCHIVE = 4
}
 

Functions

std::string getMerkleTreeName (MerkleTreeId id)
 

Variables

const uint64_t CANONICAL_FORK_ID = 0
 
const uint64_t NUM_TREES = 5
 
const uint64_t DEFAULT_MIN_NUMBER_OF_READERS = 128
 

Typedef Documentation

◆ FrStore

◆ FrTree

◆ HashPolicy

◆ NullifierStore

◆ NullifierTree

◆ PublicDataStore

◆ PublicDataTree

◆ StateReference

using bb::world_state::StateReference = typedef std::unordered_map<MerkleTreeId, TreeStateReference>

Definition at line 32 of file types.hpp.

◆ Tree

◆ TreeStateReference

Definition at line 31 of file types.hpp.

Enumeration Type Documentation

◆ MerkleTreeId

Enumerator
NULLIFIER_TREE 
NOTE_HASH_TREE 
PUBLIC_DATA_TREE 
L1_TO_L2_MESSAGE_TREE 
ARCHIVE 

Definition at line 18 of file types.hpp.

Function Documentation

◆ getMerkleTreeName()

std::string bb::world_state::getMerkleTreeName ( MerkleTreeId  id)

Definition at line 6 of file types.cpp.

Variable Documentation

◆ CANONICAL_FORK_ID

const uint64_t bb::world_state::CANONICAL_FORK_ID = 0

Definition at line 26 of file types.hpp.

◆ DEFAULT_MIN_NUMBER_OF_READERS

const uint64_t bb::world_state::DEFAULT_MIN_NUMBER_OF_READERS = 128

Definition at line 51 of file world_state.hpp.

◆ NUM_TREES

const uint64_t bb::world_state::NUM_TREES = 5

Definition at line 27 of file types.hpp.