Barretenberg
The ZK-SNARK library at the core of Aztec
|
A very basic 2-d array for use as a backing store for merkle trees. Can store up to 'indices' nodes per row and 'levels' rows. More...
#include <array_store.hpp>
Public Types | |
using | ReadTransaction = typename PersistedStore::ReadTransaction |
using | WriteTransaction = typename PersistedStore::WriteTransaction |
using | ReadTransactionPtr = std::unique_ptr< ReadTransaction > |
Public Member Functions | |
ArrayStore (const std::string &name, uint32_t depth, index_t indices=1024) | |
~ArrayStore ()=default | |
ArrayStore ()=delete | |
ArrayStore (ArrayStore const &other)=delete | |
ArrayStore (ArrayStore const &&other)=delete | |
ArrayStore & | operator= (ArrayStore const &other)=delete |
ArrayStore & | operator= (ArrayStore const &&other)=delete |
void | put_node (uint32_t level, index_t index, const std::vector< uint8_t > &data) |
bool | get_node (uint32_t level, index_t index, std::vector< uint8_t > &data, ReadTransaction &, bool) const |
void | put_meta (const index_t &size, const bb::fr &root) |
void | get_meta (index_t &size, bb::fr &root, ReadTransaction &, bool) const |
void | commit () |
void | rollback () |
ReadTransactionPtr | create_read_transactiono () |
Private Attributes | |
std::vector< std::vector< std::pair< bool, std::vector< uint8_t > > > > | map |
TreeMeta | meta |
A very basic 2-d array for use as a backing store for merkle trees. Can store up to 'indices' nodes per row and 'levels' rows.
Definition at line 43 of file array_store.hpp.
using bb::crypto::merkle_tree::ArrayStore< PersistedStore >::ReadTransaction = typename PersistedStore::ReadTransaction |
Definition at line 46 of file array_store.hpp.
using bb::crypto::merkle_tree::ArrayStore< PersistedStore >::ReadTransactionPtr = std::unique_ptr<ReadTransaction> |
Definition at line 48 of file array_store.hpp.
using bb::crypto::merkle_tree::ArrayStore< PersistedStore >::WriteTransaction = typename PersistedStore::WriteTransaction |
Definition at line 47 of file array_store.hpp.
|
inline |
Definition at line 49 of file array_store.hpp.
|
default |
|
delete |
|
delete |
|
delete |
|
inline |
Definition at line 91 of file array_store.hpp.
|
inline |
Definition at line 94 of file array_store.hpp.
|
inline |
Definition at line 85 of file array_store.hpp.
|
inline |
Definition at line 71 of file array_store.hpp.
|
delete |
|
delete |
|
inline |
Definition at line 79 of file array_store.hpp.
|
inline |
Definition at line 67 of file array_store.hpp.
|
inline |
Definition at line 92 of file array_store.hpp.
|
private |
Definition at line 97 of file array_store.hpp.
|
private |
Definition at line 98 of file array_store.hpp.