Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
content_addressed_cache.test.cpp File Reference

Go to the source code of this file.

Classes

class  ContentAddressedCacheTest
 

Typedefs

using LeafValueType = PublicDataLeafValue
 
using IndexedLeafType = IndexedLeaf< PublicDataLeafValue >
 
using CacheType = ContentAddressedCache< PublicDataLeafValue >
 

Functions

uint64_t get_index (uint64_t max_index=0)
 
void add_to_cache (CacheType &cache, index_t leaf_offset, uint64_t num_leaves, uint64_t num_nodes, uint64_t max_index=0)
 
CacheType create_cache (uint32_t depth)
 
 TEST_F (ContentAddressedCacheTest, can_create_cache)
 
 TEST_F (ContentAddressedCacheTest, can_checkpoint_cache)
 
 TEST_F (ContentAddressedCacheTest, can_not_revert_cache_without_checkpoint)
 
 TEST_F (ContentAddressedCacheTest, can_not_commit_cache_without_checkpoint)
 
std::vector< frsetup_nodes_test (uint32_t level, uint64_t index, CacheType &cache)
 
 TEST_F (ContentAddressedCacheTest, commit_then_revert_nodes)
 
 TEST_F (ContentAddressedCacheTest, commit_then_commit_nodes)
 
 TEST_F (ContentAddressedCacheTest, revert_then_commit_nodes)
 
 TEST_F (ContentAddressedCacheTest, revert_then_revert_nodes)
 
std::optional< IndexedLeafTypeget_leaf_by_index (CacheType &cache, index_t index)
 
std::vector< IndexedLeafTypesetup_leaves_tests (uint32_t index, CacheType &cache)
 
 TEST_F (ContentAddressedCacheTest, commit_then_revert_leaves)
 
 TEST_F (ContentAddressedCacheTest, commit_then_commit_leaves)
 
 TEST_F (ContentAddressedCacheTest, revert_then_commit_leaves)
 
 TEST_F (ContentAddressedCacheTest, revert_then_revert_leaves)
 
 TEST_F (ContentAddressedCacheTest, can_revert_cache)
 
 TEST_F (ContentAddressedCacheTest, can_commit_cache)
 
 TEST_F (ContentAddressedCacheTest, can_commit_all)
 
 TEST_F (ContentAddressedCacheTest, can_revert_all)
 
 TEST_F (ContentAddressedCacheTest, can_revert_through_multiple_levels)
 
 TEST_F (ContentAddressedCacheTest, can_commit_through_multiple_levels)
 
void test_reverts_remove_all_deeper_commits (uint64_t max_index, uint32_t depth, uint64_t num_levels)
 
 TEST_F (ContentAddressedCacheTest, reverts_remove_all_deeper_commits)
 
void reverts_remove_all_deeper_commits_2 (uint64_t max_index, uint32_t depth, uint64_t num_levels)
 
 TEST_F (ContentAddressedCacheTest, reverts_remove_all_deeper_commits_2)
 

Typedef Documentation

◆ CacheType

◆ IndexedLeafType

◆ LeafValueType

Function Documentation

◆ add_to_cache()

void add_to_cache ( CacheType cache,
index_t  leaf_offset,
uint64_t  num_leaves,
uint64_t  num_nodes,
uint64_t  max_index = 0 
)

Definition at line 29 of file content_addressed_cache.test.cpp.

◆ create_cache()

CacheType create_cache ( uint32_t  depth)

Definition at line 62 of file content_addressed_cache.test.cpp.

◆ get_index()

uint64_t get_index ( uint64_t  max_index = 0)

Definition at line 23 of file content_addressed_cache.test.cpp.

◆ get_leaf_by_index()

std::optional< IndexedLeafType > get_leaf_by_index ( CacheType cache,
index_t  index 
)

Definition at line 210 of file content_addressed_cache.test.cpp.

◆ reverts_remove_all_deeper_commits_2()

void reverts_remove_all_deeper_commits_2 ( uint64_t  max_index,
uint32_t  depth,
uint64_t  num_levels 
)

Definition at line 548 of file content_addressed_cache.test.cpp.

◆ setup_leaves_tests()

std::vector< IndexedLeafType > setup_leaves_tests ( uint32_t  index,
CacheType cache 
)

Definition at line 221 of file content_addressed_cache.test.cpp.

◆ setup_nodes_test()

std::vector< fr > setup_nodes_test ( uint32_t  level,
uint64_t  index,
CacheType cache 
)

Definition at line 99 of file content_addressed_cache.test.cpp.

◆ TEST_F() [1/20]

TEST_F ( ContentAddressedCacheTest  ,
can_checkpoint_cache   
)

Definition at line 78 of file content_addressed_cache.test.cpp.

◆ TEST_F() [2/20]

TEST_F ( ContentAddressedCacheTest  ,
can_commit_all   
)

Definition at line 421 of file content_addressed_cache.test.cpp.

◆ TEST_F() [3/20]

TEST_F ( ContentAddressedCacheTest  ,
can_commit_cache   
)

Definition at line 405 of file content_addressed_cache.test.cpp.

◆ TEST_F() [4/20]

TEST_F ( ContentAddressedCacheTest  ,
can_commit_through_multiple_levels   
)

Definition at line 482 of file content_addressed_cache.test.cpp.

◆ TEST_F() [5/20]

TEST_F ( ContentAddressedCacheTest  ,
can_create_cache   
)

Definition at line 72 of file content_addressed_cache.test.cpp.

◆ TEST_F() [6/20]

TEST_F ( ContentAddressedCacheTest  ,
can_not_commit_cache_without_checkpoint   
)

Definition at line 91 of file content_addressed_cache.test.cpp.

◆ TEST_F() [7/20]

TEST_F ( ContentAddressedCacheTest  ,
can_not_revert_cache_without_checkpoint   
)

Definition at line 85 of file content_addressed_cache.test.cpp.

◆ TEST_F() [8/20]

TEST_F ( ContentAddressedCacheTest  ,
can_revert_all   
)

Definition at line 442 of file content_addressed_cache.test.cpp.

◆ TEST_F() [9/20]

TEST_F ( ContentAddressedCacheTest  ,
can_revert_cache   
)

Definition at line 395 of file content_addressed_cache.test.cpp.

◆ TEST_F() [10/20]

TEST_F ( ContentAddressedCacheTest  ,
can_revert_through_multiple_levels   
)

Definition at line 462 of file content_addressed_cache.test.cpp.

◆ TEST_F() [11/20]

TEST_F ( ContentAddressedCacheTest  ,
commit_then_commit_leaves   
)

Definition at line 286 of file content_addressed_cache.test.cpp.

◆ TEST_F() [12/20]

TEST_F ( ContentAddressedCacheTest  ,
commit_then_commit_nodes   
)

Definition at line 142 of file content_addressed_cache.test.cpp.

◆ TEST_F() [13/20]

TEST_F ( ContentAddressedCacheTest  ,
commit_then_revert_leaves   
)

Definition at line 253 of file content_addressed_cache.test.cpp.

◆ TEST_F() [14/20]

TEST_F ( ContentAddressedCacheTest  ,
commit_then_revert_nodes   
)

Definition at line 120 of file content_addressed_cache.test.cpp.

◆ TEST_F() [15/20]

TEST_F ( ContentAddressedCacheTest  ,
revert_then_commit_leaves   
)

Definition at line 323 of file content_addressed_cache.test.cpp.

◆ TEST_F() [16/20]

TEST_F ( ContentAddressedCacheTest  ,
revert_then_commit_nodes   
)

Definition at line 164 of file content_addressed_cache.test.cpp.

◆ TEST_F() [17/20]

TEST_F ( ContentAddressedCacheTest  ,
revert_then_revert_leaves   
)

Definition at line 361 of file content_addressed_cache.test.cpp.

◆ TEST_F() [18/20]

TEST_F ( ContentAddressedCacheTest  ,
revert_then_revert_nodes   
)

Definition at line 187 of file content_addressed_cache.test.cpp.

◆ TEST_F() [19/20]

TEST_F ( ContentAddressedCacheTest  ,
reverts_remove_all_deeper_commits   
)

Definition at line 534 of file content_addressed_cache.test.cpp.

◆ TEST_F() [20/20]

◆ test_reverts_remove_all_deeper_commits()

void test_reverts_remove_all_deeper_commits ( uint64_t  max_index,
uint32_t  depth,
uint64_t  num_levels 
)

Definition at line 502 of file content_addressed_cache.test.cpp.