SPARSE_TRIE_MAX_NODES_SHRINK_CAPACITY

Constant SPARSE_TRIE_MAX_NODES_SHRINK_CAPACITY 

Source
pub const SPARSE_TRIE_MAX_NODES_SHRINK_CAPACITY: usize = 1_000_000;
Expand description

Default node capacity for shrinking the sparse trie. This is used to limit the number of trie nodes in allocated sparse tries.

Node maps have a key of Nibbles and value of SparseNode. The size_of::<Nibbles> is 40, and size_of::<SparseNode> is 80.

If we have 1 million entries of 120 bytes each, this conservative estimate comes out at around 120MB.