New implementation of incremental merkle tree
This is a new implementation of the incremental merkle tree used by our scheme to witness commitments to spendable value. It serves as a fixed-sized accumulator. This new construction has a much simpler API surface area, avoids memory safety issues, remains pruned at all times, avoids serialization edge cases, has more efficient insertion, and is abstract over the depth and hash function used at the type level. Further, it lays the groundwork for efficient "fast-forwarding" of witnesses into the tree as the treestate is updated.
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include "zerocash/IncrementalMerkleTree.h"
|
||||
|
||||
static const unsigned int INCREMENTAL_MERKLE_TREE_DEPTH = 20;
|
||||
#include "zcash/IncrementalMerkleTree.hpp"
|
||||
|
||||
/**
|
||||
* Pruned version of CTransaction: only retains metadata and unspent transaction outputs
|
||||
|
||||
Reference in New Issue
Block a user