Barretenberg
The ZK-SNARK library at the core of Aztec
|
Go to the source code of this file.
Typedefs | |
using | HashPolicy = PedersenHashPolicy |
using | WrappedLeaf = WrappedNullifierLeaf< HashPolicy > |
Functions | |
void | print_tree (const size_t depth, std::vector< fr > hashes, std::string const &msg) |
bool | check_hash_path (const fr &root, const fr_hash_path &path, const indexed_nullifier_leaf &leaf_value, const size_t idx) |
TEST (crypto_nullifier_tree, test_nullifier_memory) | |
TEST (crypto_nullifier_tree, test_nullifier_memory_appending_zero) | |
TEST (crypto_nullifier_tree, test_nullifier_tree) | |
using HashPolicy = PedersenHashPolicy |
Definition at line 7 of file nullifier_memory_tree.test.cpp.
using WrappedLeaf = WrappedNullifierLeaf<HashPolicy> |
Definition at line 8 of file nullifier_memory_tree.test.cpp.
bool check_hash_path | ( | const fr & | root, |
const fr_hash_path & | path, | ||
const indexed_nullifier_leaf & | leaf_value, | ||
const size_t | idx | ||
) |
Definition at line 24 of file nullifier_memory_tree.test.cpp.
void print_tree | ( | const size_t | depth, |
std::vector< fr > | hashes, | ||
std::string const & | msg | ||
) |
Definition at line 10 of file nullifier_memory_tree.test.cpp.
TEST | ( | crypto_nullifier_tree | , |
test_nullifier_memory | |||
) |
Intial state:
val 0 0 0 0 0 0 0 0 nextIdx 0 0 0 0 0 0 0 0 nextVal 0 0 0 0 0 0 0 0
Add new value 30:
val 0 30 0 0 0 0 0 0 nextIdx 1 0 0 0 0 0 0 0 nextVal 30 0 0 0 0 0 0 0
Add new value 10:
val 0 30 10 0 0 0 0 0 nextIdx 2 0 1 0 0 0 0 0 nextVal 10 0 30 0 0 0 0 0
Add new value 20:
val 0 30 10 20 0 0 0 0 nextIdx 2 0 3 1 0 0 0 0 nextVal 10 0 20 30 0 0 0 0
Add new value 50:
val 0 30 10 20 50 0 0 0 nextIdx 2 4 3 1 0 0 0 0 nextVal 10 50 20 30 0 0 0 0
Definition at line 41 of file nullifier_memory_tree.test.cpp.
TEST | ( | crypto_nullifier_tree | , |
test_nullifier_memory_appending_zero | |||
) |
Intial state:
val 0 0 0 0 0 0 0 0 nextIdx 0 0 0 0 0 0 0 0 nextVal 0 0 0 0 0 0 0 0
Add new value 30:
val 0 30 0 0 0 0 0 0 nextIdx 1 0 0 0 0 0 0 0 nextVal 30 0 0 0 0 0 0 0
Add new value 10:
val 0 30 10 0 0 0 0 0 nextIdx 2 0 1 0 0 0 0 0 nextVal 10 0 30 0 0 0 0 0
Add new value 20:
val 0 30 10 20 0 0 0 0 nextIdx 2 0 3 1 0 0 0 0 nextVal 10 0 20 30 0 0 0 0
Add new value 0:
val 0 30 10 20 0 0 0 0 nextIdx 2 0 3 1 0 0 0 0 nextVal 10 0 20 30 0 0 0 0
Add new value 50:
val 0 30 10 20 0 0 50 0 nextIdx 2 6 3 1 0 0 0 0 nextVal 10 50 20 30 0 0 0 0
Definition at line 175 of file nullifier_memory_tree.test.cpp.
TEST | ( | crypto_nullifier_tree | , |
test_nullifier_tree | |||
) |
Definition at line 356 of file nullifier_memory_tree.test.cpp.