Transactions – Understanding Lifetime in Mempool (EIP 1559)

eip-1559pending-transactionstransactionstxpool

I want to know how long transactions will be kept in mempool after EIP 1559.

I know that before EIP 1559 they kept very, very long. How long certainly I don't know.

Best Answer

I don't think has changed much since EIP-1559.

As far as I've understood, transactions stay in the mempool as long as nodes decide to keep them there. Transactions with very low gas price get discarded quickly, since they are just considered as spam. But if the gas price is not super low, there is a chance it will get picked up in near future, so nodes may decide to keep it longer.

Nodes have internal buffers (basically databases) for storing mempool transactions. When that buffer starts to get full, they start to discard transactions, and probably they discard the ones with the lowest gas prices. So it all depends on how big buffers nodes have and what are the given gas prices.

There was a related post a few days ago: I set a 3 gwei for gas price. Now my transaction has been pending for 48+ hours now. But blocks aren't even full!