|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <content_addressed_cache.hpp>
Classes | |
| struct | Journal |
Public Types | |
| using | LeafType = LeafValueType |
| using | IndexedLeafValueType = IndexedLeaf< LeafValueType > |
| using | SharedPtr = std::shared_ptr< ContentAddressedCache > |
| using | UniquePtr = std::unique_ptr< ContentAddressedCache > |
Public Member Functions | |
| ContentAddressedCache ()=delete | |
| ContentAddressedCache (uint32_t depth) | |
| ~ContentAddressedCache ()=default | |
| ContentAddressedCache (const ContentAddressedCache &other)=default | |
| ContentAddressedCache & | operator= (const ContentAddressedCache &other)=default |
| ContentAddressedCache (ContentAddressedCache &&other) noexcept=default | |
| ContentAddressedCache & | operator= (ContentAddressedCache &&other) noexcept=default |
| bool | operator== (const ContentAddressedCache &other) const =default |
| void | checkpoint () |
| void | revert () |
| void | commit () |
| void | revert_all () |
| void | commit_all () |
| void | reset (uint32_t depth) |
| std::pair< bool, index_t > | find_low_value (const uint256_t &new_leaf_key, const uint256_t &retrieved_value, const index_t &db_index) const |
| bool | get_leaf_preimage_by_hash (const fr &leaf_hash, IndexedLeafValueType &leaf_pre_image) const |
| void | put_leaf_preimage_by_hash (const fr &leaf_hash, const IndexedLeafValueType &leaf_pre_image) |
| bool | get_leaf_by_index (const index_t &index, IndexedLeafValueType &leaf_pre_image) const |
| void | put_leaf_by_index (const index_t &index, const IndexedLeafValueType &leaf_pre_image) |
| void | update_leaf_key_index (const index_t &index, const fr &leaf_key) |
| std::optional< index_t > | get_leaf_key_index (const fr &leaf_key) const |
| void | put_node (const fr &node_hash, const NodePayload &node) |
| bool | get_node (const fr &node_hash, NodePayload &node) const |
| void | put_meta (const TreeMeta &meta) |
| const TreeMeta & | get_meta () const |
| std::optional< fr > | get_node_by_index (uint32_t level, const index_t &index) const |
| void | put_node_by_index (uint32_t level, const index_t &index, const fr &node) |
| const std::map< uint256_t, index_t > & | get_indices () const |
| bool | is_equivalent_to (const ContentAddressedCache &other) const |
Private Attributes | |
| std::unordered_map< fr, NodePayload > | nodes_ |
| std::map< uint256_t, index_t > | indices_ |
| std::unordered_map< fr, IndexedLeafValueType > | leaves_ |
| TreeMeta | meta_ |
| std::vector< std::unordered_map< index_t, fr > > | nodes_by_index_ |
| std::unordered_map< index_t, IndexedLeafValueType > | leaf_pre_image_by_index_ |
| std::vector< Journal > | journals_ |
Definition at line 34 of file content_addressed_cache.hpp.
| using bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::IndexedLeafValueType = IndexedLeaf<LeafValueType> |
Definition at line 37 of file content_addressed_cache.hpp.
| using bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::LeafType = LeafValueType |
Definition at line 36 of file content_addressed_cache.hpp.
| using bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::SharedPtr = std::shared_ptr<ContentAddressedCache> |
Definition at line 38 of file content_addressed_cache.hpp.
| using bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::UniquePtr = std::unique_ptr<ContentAddressedCache> |
Definition at line 39 of file content_addressed_cache.hpp.
|
delete |
| bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::ContentAddressedCache | ( | uint32_t | depth | ) |
Definition at line 124 of file content_addressed_cache.hpp.
|
default |
|
default |
|
defaultnoexcept |
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::checkpoint | ( | ) |
Definition at line 129 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::commit | ( | ) |
Definition at line 181 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::commit_all | ( | ) |
Definition at line 230 of file content_addressed_cache.hpp.
| std::pair< bool, index_t > bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::find_low_value | ( | const uint256_t & | new_leaf_key, |
| const uint256_t & | retrieved_value, | ||
| const index_t & | db_index | ||
| ) | const |
Definition at line 301 of file content_addressed_cache.hpp.
|
inline |
Definition at line 79 of file content_addressed_cache.hpp.
| bool bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::get_leaf_by_index | ( | const index_t & | index, |
| IndexedLeafValueType & | leaf_pre_image | ||
| ) | const |
Definition at line 356 of file content_addressed_cache.hpp.
| std::optional< index_t > bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::get_leaf_key_index | ( | const fr & | leaf_key | ) | const |
Definition at line 409 of file content_addressed_cache.hpp.
| bool bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::get_leaf_preimage_by_hash | ( | const fr & | leaf_hash, |
| IndexedLeafValueType & | leaf_pre_image | ||
| ) | const |
Definition at line 337 of file content_addressed_cache.hpp.
|
inline |
Definition at line 74 of file content_addressed_cache.hpp.
| bool bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::get_node | ( | const fr & | node_hash, |
| NodePayload & | node | ||
| ) | const |
Definition at line 425 of file content_addressed_cache.hpp.
| std::optional< fr > bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::get_node_by_index | ( | uint32_t | level, |
| const index_t & | index | ||
| ) | const |
Definition at line 436 of file content_addressed_cache.hpp.
| bool bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::is_equivalent_to | ( | const ContentAddressedCache< LeafValueType > & | other | ) | const |
Definition at line 254 of file content_addressed_cache.hpp.
|
default |
|
defaultnoexcept |
|
default |
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::put_leaf_by_index | ( | const index_t & | index, |
| const IndexedLeafValueType & | leaf_pre_image | ||
| ) |
Definition at line 369 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::put_leaf_preimage_by_hash | ( | const fr & | leaf_hash, |
| const IndexedLeafValueType & | leaf_pre_image | ||
| ) |
Definition at line 349 of file content_addressed_cache.hpp.
|
inline |
Definition at line 73 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::put_node | ( | const fr & | node_hash, |
| const NodePayload & | node | ||
| ) |
Definition at line 419 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::put_node_by_index | ( | uint32_t | level, |
| const index_t & | index, | ||
| const fr & | node | ||
| ) |
Definition at line 446 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::reset | ( | uint32_t | depth | ) |
Definition at line 243 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::revert | ( | ) |
Definition at line 134 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::revert_all | ( | ) |
Definition at line 237 of file content_addressed_cache.hpp.
| void bb::crypto::merkle_tree::ContentAddressedCache< LeafValueType >::update_leaf_key_index | ( | const index_t & | index, |
| const fr & | leaf_key | ||
| ) |
Definition at line 397 of file content_addressed_cache.hpp.
|
private |
Definition at line 109 of file content_addressed_cache.hpp.
|
private |
Definition at line 121 of file content_addressed_cache.hpp.
|
private |
Definition at line 118 of file content_addressed_cache.hpp.
|
private |
Definition at line 113 of file content_addressed_cache.hpp.
|
private |
Definition at line 114 of file content_addressed_cache.hpp.
|
private |
Definition at line 105 of file content_addressed_cache.hpp.
|
private |
Definition at line 117 of file content_addressed_cache.hpp.