rustreexo
rustreexo copied to clipboard
[WIP] feat: Pollard and partial forest support
Pollard is an efficient implementation of the accumulator for keeping track of a subset of the whole tree. Instead of storing a proof for some leaves, it is more efficient to hold them in a tree structure, and add/remove elements as needed. The main use-case for a Pollard is to keep track of unconfirmed transactions' proof, in the mempool. As you get new transactions through the p2p network, you check the proofs and add them to the Pollard. When a block is mined, we can remove the confirmed transactions from the Pollard, and keep the unconfirmed ones. We can also serve proofs for specific transactions as requested, allowing efficient transaction relay.