Three bitcore nodes (version of bitcoind is quite old - 0.12.1) are deployed to the servers on different cloud platforms.
All instances have the same bitcoin.conf files (except of rpcallowip, rpcuser and rpcpassword):
server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcthreads=8
rpcworkqueue=32
rpcservertimeout=60
rpcallowip=127.0.0.1
rpcuser=...
rpcpassword=...
uacomment=bitcore
The problem is all of them have considerably different mempools:
- first has 33689 txs in mempool
- second has 58219 txs
- third node has 39540 txs
- blockchain.info has 63598 txs
I understand, that mempool is node-specific and there is no "Single Bitcoin Network Mempool". However I need synchronization at least between these three nodes (though it would be better to be as close to blockchain.info as possible).
If there is transaction, that exists in blokchain.info's mempool, but doesn't exist in all three nodes' mempools - it is ok. But as soon as this transaction get to one of these three nodes, it should appear on others as soon as possible.
I've tried using addnode
option to force nodes connect to each other, but it didn't helped.
May be I am missing something, or at least there is a way to find the reason of so big differences in mempool ?
Aim of consistent mempool.
We have mobile client and application server, all looking into these nodes (some kind of load balancing). User can be logged into one account on different devices. When server sees transaction in mempool, it should update user's status.
When mempools differ it is possible, that:
- User will see different transactions on different devices, which may mess him
- User will see transaction, and server will miss it. In such situation user expects, that status will be updated, but server wouldn't do it
So it would be very nice, to have (almost) equal mempools.
So far.
I've tried:
addnode
(to connect to specific nodes)connect
(to connect only to specific nodes), to give it a try, thanks to @whatever
This options were described here, on bitcoin.se, and (alongside with other possible options for bitcoind) in bitcoin wiki. But there is still problem with big difference in mempool's size.