Author

Topic: Average mempool size difference across nodes (Read 148 times)

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
January 11, 2021, 01:16:48 PM
#6
Yes the mempool can be all over the place.
I asked a similar question back in 2019.
Take a look at this thread: https://bitcointalksearch.org/topic/mempool-current-number-of-transactions-question-5200716

-Dave
member
Activity: 79
Merit: 28
CMIIW, the reference client synchronizes first before repopulating the mempool again. It would make sense for them to catch up with the best tip so that any transactions spending the same UTXO within the mempool can be removed more efficiently.

Why didn't I think of it earlier. Makes super sense now, thanks!
legendary
Activity: 2954
Merit: 4158
Lets say I'm restarting my bitcoin node after a few days being offline. Since mempool is in RAM, my mempool is empty. Do I ask my peers for transactions I missed to fill my mempool or do I just normally receive transactions and when validating a block asking for missing transactions and put them directly into the UTXO? And Is the UTXO set also in RAM or stored on the HD?
The mempool is dumped onto the disk at shutdown. It's contained within mempool.dat within the data directory.

CMIIW, the reference client synchronizes first before repopulating the mempool again. It would make sense for them to catch up with the best tip so that any transactions spending the same UTXO within the mempool can be removed more efficiently.

My take on the issue is that discrepancies between mempool size should be a result of the user's configuration more than the nature of the propagation of the transaction. I've previously ran a node and a pruned Bitcoin Core node. When I did arbitrary comparisons, the difference between the two was fairly small, think less than a MB. It's no indication of the bigger picture but I'm inclined to believe that the difference should not be excessively big.
member
Activity: 79
Merit: 28
Thanks for the explanation. Gets me a better picture. But I got another question.

Lets say I'm restarting my bitcoin node after a few days being offline. Since mempool is in RAM, my mempool is empty. Do I ask my peers for transactions I missed to fill my mempool or do I just normally receive transactions and when validating a block asking for missing transactions and put them directly into the UTXO? And Is the UTXO set also in RAM or stored on the HD?

nodes will always attempt to find out transactions not in their mempool by sending mempool messages and receiving inv message as a response to populate their own mempool. It's thus fairly unlikely for the node to miss any transactions unless all of their peers has rules that are more restrictive than the user's nodes.

Or does that answer my question about transactiosn for the mempool? I'm not quite sure.
legendary
Activity: 2954
Merit: 4158
There isn't a way to get the absolute value since there isn't anyone actively recording the mempool size of the individual nodes.

The mempool size would be more dependent on the limit as specified by the individual node as opposed to the number of nodes it's connected to. Transaction propagation is generally fairly extensive, nodes will always attempt to find out transactions not in their mempool by sending mempool messages and receiving inv message as a response to populate their own mempool. It's thus fairly unlikely for the node to miss any transactions unless all of their peers has rules that are more restrictive than the user's nodes.

Not running your node 24/7 or not having more peers should not result in your mempool being significantly lower than others. At least the reference nodes should be able to see most of the standard transactions.
member
Activity: 79
Merit: 28
Does anybody know what the average difference of the mempool size between nodes is. I know some nodes have their on rules on what gets in the mempool, some don't run 24/7 and some are connected to more peers. But is the difference minimal or very high?
Jump to: