Given the current uptick in mempool backlog, I was wondering what does it take for a transaction to leave it.
The answer here has the following reason:
It was included in a block
A conflicting transaction (i.e. one which spent at least one of the same inputs) was included in a block
Expired: it has been in the mempool longer than the time specified by -mempoolexpiry (default 336 hours)
The memory pool size limit was reached (set by -maxmempool). Lowest fee transactions are removed first.
A blockchain reorganization occurred (i.e. a different branch of the chain became the best), and this transaction spent coins that are now immature, i.e. the block where those coins were created is no longer at least 100 blocks deep
A blockchain reorganization occurred, and the new chain is shorter, such that the block height mentioned in this transaction's locktime has not yet been attained
A blockchain reorganization occurred. Transactions from disconnected blocks have to be added to the mempool. If it's already full, in this case, oldest transactions are removed to make room (not lowest fee in this case).
Under replace-by-fee, it was replaced by one with a higher fee
The answer is over 4 years old, so was wondering if anything of this has changed or is this still valid.
Its important to understand that the mempool is not a global state. It does not require consensus. So when asking "Why did a transaction disappear from the mempool" I would first ask "From whom's mempool did it disappear?" I'm running a 2GB mempool myself with a longer than usual expiry time.
reply
So the 336 hour purge is not in play?
If I had a 1sat/vb from 6 weeks ago, would it still be there?
reply
As default, it should be, but each mempool can have their own rules.
Also, from what I understand if mempool is over 300MB, low fee transactions get dropped earlier than the 2 weeks. (please someone correct me if I am wrong)
reply
I hadn't heard of this till I heard Sessions mention it.
What confuses me is that on mempool.space you can still see a lot of 1 sat/vb transactions sitting there. If this were true they would have been purged weeks ago.
reply
From whom's mempool did it disappear?
very well said
reply
Great reply. I meant it more like a default setting before anyone changes their mempool properties.
reply
mempool.space have a very good documentation page https://mempool.space/docs/faq
reply
In high level yes, but details not so much.
reply