Skip to main content

TREE_DEPTH

Constant TREE_DEPTH 

Source
pub const TREE_DEPTH: usize = 24;
Expand description

Fixed depth of the Vote Commitment Tree (2^24 ≈ 16.7M leaf capacity).

Reduced from Zcash’s depth 32 (~4.3B) because governance voting produces far fewer leaves than a full shielded pool. Each voter generates 1 leaf per delegation + 2 per vote, so even 10K voters × 50 proposals = ~1M leaves per round — well within 2^24. This saves 8 Poseidon hashes per ZKP proof (~2,000 fewer constraints) and shrinks Merkle paths from 1,028 to 772 bytes.