Our "prune list" implementation maintains an internal "prune cache".
The prune list consists of roots of fully pruned subtrees.
The cache contains all pos beneath these roots.
We check if a pos was pruned by looking in the cache.
We can improve this without needing to maintain an internal cache.
To check if a pos is pruned we can look for the "next" pruned subtree and check if pos is beneath it.
We only need to consider the "next" subtree due to the append-only PMMR semantics.
If the next subtree does not include pos then we know that no other subtree will either.
Our "prune list" implementation maintains an internal "prune cache".
We can improve this without needing to maintain an internal cache.
To check if a pos is pruned we can look for the "next" pruned subtree and check if pos is beneath it. We only need to consider the "next" subtree due to the append-only PMMR semantics. If the next subtree does not include pos then we know that no other subtree will either.