Bitcoin Core has a cache for transactions that are not within the node’s mempool however could possibly be in different mempools, and so are cached for improved compact block reconstruction. This cache holds as much as 100 transactions by default and this quantity might be modified with the blockreconstructionextratxn configuration choice.
What pursuits me are the inclusion and eviction standards for this cache. Does it solely maintain transactions evicted from the mempool, or additionally transactions that had been by no means accepted into the mempool as a result of coverage? If that is the case, what coverage does it use to forestall DoS assaults? And when the cache is full, how does it decide whether or not to incorporate a transaction and evict one other, and which one to evict? Is it based mostly on feerates, last-in-first-out, or one thing else?
