Why is my Bitcoin node's mempool so slow to fill?

4 replies 57 views
0xNodeMember
Posts: 671 · Reputation: 80
#1Mar 11, 2022, 05:30 PM
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.
4 Reply Quote Share
mr_apeNewbie
Posts: 401 · Reputation: 35
#2Mar 13, 2022, 04:22 AM
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.
5 Reply Quote Share
0xNodeMember
Posts: 671 · Reputation: 80
#3Mar 13, 2022, 10:22 AM
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.
6 Reply Quote Share
0xLaserFull Member
Posts: 252 · Reputation: 641
#4Mar 13, 2022, 02:48 PM
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.
3 Reply Quote Share
mr_apeNewbie
Posts: 401 · Reputation: 35
#5Mar 13, 2022, 08:45 PM
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.
3 Reply Quote Share

Related topics