vote-commitment-tree
Append-only Poseidon Merkle tree for Vote Authority Notes (VANs) and vote commitments in the Zcash shielded-voting protocol.
The tree is maintained per vote round. Each delegation appends a VAN leaf; each cast-vote appends a new VAN plus a vote-commitment leaf. The chain publishes the tree root at every block height, which wallets use as a public input to ZKP2 (vote-commitment proof).
Usage
Sibling crate of zcash_voting; typically consumed transitively by wallets that pull that top-level crate. Standalone usage:
use TreeHandle;
let mut tree = open?;
tree.append?;
let root = tree.root?;
let path = tree.path?;
See vote-commitment-tree-client for the HTTP/CLI client that syncs this tree from a running Zcash voting chain node.
License
Dual-licensed under MIT or Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.