After restarting a node, are missed transactions recovered in mempool? (v0.14.1)

2

As of v0.14.0 the mempool is now saved when shutting down a node and reloaded after starting up. If a node has been down for <20 mins lets say, does the bitcoin node attempt to recover the transactions it has missed or does it wait until it sees it in a block before requesting missed transactions from a peer?

Thank you!

Nabeel

Posted 2017-07-13T19:42:43.573

Reputation: 37

Answers

1

Bitcoin Core (v0.14+) does not actively try to learn about transactions it missed.

Historically, this was not done because it would unnecessarily and unintentionally extend the lifetime of transactions in the mempool. This is no longer an issue because the mempool is limited, and deals correct with expiration and eviction.

However, no efficient protocol exists to accomplish mempool syncing. We could ask for all txids from all peers, but this would amount to several hundred MB of data, most of which is redundant (as it'd be identical across peers). Some research has been done on set reconciliation protocols, which efficiently find differences between the mempools and just transfer the differences. None of that is close to deployment, however.

Pieter Wuille

Posted 2017-07-13T19:42:43.573

Reputation: 54 032

This is what I thought is the case. Is there any need for a protocol that would actively sync mempools when nodes restart after a reasonable amount of down time (20-120 mins for instance) such that the mempool is not completely overturned yet. May you also point me to any research done on mempool set reconciliation. Thank youNabeel 2017-07-14T14:51:29.687

I've described high level protocols for syncing https://bitcointalk.org/index.php?topic=1377345.0 and in more in-the-weeds technical detail at https://people.xiph.org/~greg/mempool_sync_relay.txt Bitcoin doesn't need active synchronization but I hope that we will able to use it to lower the bandwidth used by relay.

G. Maxwell 2018-07-25T00:56:47.950