<p>mempoolcp command line utility is what you are looking for:</p>
<p><a href="https://github.com/dev7ba/mempoolcp" rel="nofollow noreferrer">https://github.com/dev7ba/mempoolcp</a></p>

CC BY-SA 4.0
2023-02-14T09:18:35.690Z
Cheers, I'm surprised someone tackled this 3 years after! Ideally a tool like this would be integrated into bitcoin core, but we all know it's hard to get code merged there.
Pedro
CC BY-SA 4.0
2023-02-13T17:35:51.520Z
2023-02-13T17:35:51.520Z
dev7ba
<p>I just started my 'occasional' full-node and I am watching the size of the mempool grow after full block synchronization - <code>watch -n 3 'bitcoin-cli getrawmempool true |jq "length"'</code> - it has around 4000 pending transactions. My 'continuous' full-node, however, has around 18000 pending transactions which seem to never become available to my 'ocasional' node. </p>

<p>Looks like that when a node starts up it will receive the new transactions that arrive at the mempool, but the old transactions that had been laying there are never 'synchronized'. How can I synchronize the mempool of a recently launched node with the one of its peers?</p>

<p>I could shut down my other full-node and copy past <code>mempool.dat</code> into my other node but this solution is very ugly as I need to shut down a long-running node with many connections.</p>

CC BY-SA 4.0
2020-02-10T19:05:25.427Z
Why do you think it matters?
Claris
CC BY-SA 4.0
2020-02-10T19:26:42.963Z
off the top of my head: fee recommendations with custom code, setting up your electrum server and proving up-to-date intormation, fee bumping transactions made on your mobile wallet through bitcoin core,...
Pedro
CC BY-SA 4.0
2020-02-10T19:30:40.743Z
Fee estimation wouldn’t work if you stuffed the men pool suddenly with old transaction. Electrum servers won’t be started and stopped frequently.
Claris
CC BY-SA 4.0
2020-02-10T19:33:48.373Z
Fee estimations made by looking at the current size of the mempool would work with old transactions (not bitcoin core recommendations, that's why I wrote 'custom code'). For example you could recommend a fee that is at the top 0.8 vMB of the mempool.
Pedro
CC BY-SA 4.0
2020-02-10T22:06:12.650Z
If you're writing custom code you can surely just not have an "occasional" node.
Claris
CC BY-SA 4.0
2020-02-10T22:33:51.110Z
Yes, but like I mentioned I have a continuous node and an occasional one. Anyway, I think I found a solution, which is far from ideal but it works. It is to get raw transactions from the mempool through an external API and then broadcast through my node.
Pedro
CC BY-SA 4.0
2020-02-11T18:43:05.300Z
You have a perceived issue with a piece of software you running in a bizarre way given your intentions. The easy solution to your perceived issue is to not do that.
Claris
<bitcoin-core><full-node><mempool><peers><connection>
How to achieve fast mempool synchronization at startup?
Pedro
# How to achieve fast mempool synchronization at startup?

(Asked by: username_0 on 2020-02-10)

I just started my 'occasional' full-node and I am watching the size of the mempool grow after full block synchronization - `watch -n 3 'bitcoin-cli getrawmempool true |jq "length"'` - it has around 4000 pending transactions. My 'continuous' full-node, however, has around 18000 pending transactions which seem to never become available to my 'ocasional' node.

Looks like that when a node starts up it will receive the new transactions that arrive at the mempool, but the old transactions that had been laying there are never 'synchronized'. How can I synchronize the mempool of a recently launched node with the one of its peers?

I could shut down my other full-node and copy past `mempool.dat` into my other node but this solution is very ugly as I need to shut down a long-running node with many connections.

**Tags:** bitcoin-core, full-node, mempool, peers, connection

> **Comments:**
> **username_1**: Why do you think it matters?  
> **username_0**: off the top of my head: fee recommendations with custom code, setting up your electrum server and proving up-to-date intormation, fee bumping transactions made on your mobile wallet through bitcoin core,...  
> **username_1**: Fee estimation wouldn’t work if you stuffed the men pool suddenly with old transaction. Electrum servers won’t be started and stopped frequently.  
> **username_0**: Fee estimations made by looking at the current size of the mempool would work with old transactions (not bitcoin core recommendations, that's why I wrote 'custom code'). For example you could recommend a fee that is at the top 0.8 vMB of the mempool.  
> **username_1**: If you're writing custom code you can surely just not have an "occasional" node.  
> **username_0**: Yes, but like I mentioned I have a continuous node and an occasional one. Anyway, I think I found a solution, which is far from ideal but it works. It is to get raw transactions from the mempool through an external API and then broadcast through my node.  
> **username_1**: You have a perceived issue with a piece of software you running in a bizarre way given your intentions. The easy solution to your perceived issue is to not do that.  

---

## 1 answers

### Answer by username_2 on 2023-02-13. Score: 1 | Accepted answer

mempoolcp command line utility is what you are looking for:

<https://github.com/username_2/mempoolcp>

> **Comments:**
> **username_0**: Cheers, I'm surprised someone tackled this 3 years after! Ideally a tool like this would be integrated into bitcoin core, but we all know it's hard to get code merged there.  

---

