So, I just started running a Bitcoin Core node, but I’ve noticed my mempool is empty for ages, even when I have a lot of peers connected. Anyone know why it takes so long to load mempool transactions? It's kinda frustrating. I want it to be faster.
Why is my Bitcoin node's mempool so slow to fill?
4 replies 57 views
Are you checking this after your node has fully synced with the network? If your node is still catching up and your UTXO set is outdated, it can’t verify new transactions yet... so that might explain why your mempool isn’t filling up.
I’m timing it from when my node starts connecting to peers via DNS. There’s a log line that says something about "waiting for 6000 seconds before querying DNS seeds". Doesn’t really feel right, though. Why not just collect some transactions while syncing and validate them later? Seems like a missed opportunity.
Yeah, you could technically code that in. Just the current software ain’t built that way. They could download blocks in reverse, starting from the latest and gradually work back to the Genesis Block... but no one’s done it yet. We just have full and SPV nodes.
There’s a lot of complexity involved. Rewriting that code would take a ton of effort. When you get a transaction, it’s treated like a peer sending it, and that peer's credibility is evaluated. If they send bad txs, you could end up banning them. Significant changes required to skip invalid peer checks and handle mempool preferences.