Bitcoin Forum
November 06, 2024, 04:49:55 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do nodes share their mempool with each other?  (Read 183 times)
BoyFromDubai (OP)
Jr. Member
*
Offline Offline

Activity: 33
Merit: 22


View Profile
December 21, 2022, 12:22:22 PM
 #1

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11010


Crypto Swap Exchange


View Profile
December 21, 2022, 12:37:52 PM
 #2

There is a "mempool" message defined in the P2P protocol that the nodes can send each other to receive a list of transaction hashes that is in the other node's mempool and then request to receive any of the transactions they don't have using a "getdata" message.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1385


View Profile
December 21, 2022, 12:38:59 PM
 #3

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...

Think about it that way - transaction could be unconfirmed (is stored in the mempool) or confirmed (kept in block chain). Each new transaction must be populated  and known to other nodes - otherwise miners would not be aware given transaction exists and will not be able to include it in their mined blocks.

Why do you think mempool is 'too large' to be synchronised?
hZti
Hero Member
*****
Offline Offline

Activity: 1022
Merit: 642

Magic


View Profile
December 21, 2022, 04:11:00 PM
 #4

But do they share their mempool, when a node disconnects from the network for some time for example?

When the node goes offline it will not share any information, it will simply be updated as soon as it comes back online.


Quote
I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...

The mempool is quite small as it will only contain unconfirmed transactions (usually a few MB). If a transaction has a too small fee, it will be deleted from the mempool after some days, so the mempool will never be to big.

What you maybe mean is the blockchain, that is a few hundred GB of data. This will indeed take some days to synchronies if you start your node for the first time.
witcher_sense
Legendary
*
Offline Offline

Activity: 2450
Merit: 4415


🔐BitcoinMessage.Tools🔑


View Profile WWW
December 21, 2022, 04:56:04 PM
 #5

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...
A particular full node has its own subjective view regarding what to consider valid in the blockchain: it receives pieces of information from other nodes, verifies if everything is okay, and adds transactions to its local temporary storage of yet-to-be-confirmed financial transactions. Mempool is a completely optional feature: you, as an operator of your personal node, can decide whether to allocate memory for those unconfirmed transactions or not. The only drawback of you not having a mempool is that you can't tell other nodes about unconfirmed transactions, and you even can't see them until they get into the mined block. Some will say that without mempool, you will have an incomplete picture of the blockchain, and your node should no longer be considered "full" because you can't conduct full verification.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitDane
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 348


View Profile WWW
December 21, 2022, 09:28:58 PM
Last edit: December 22, 2022, 08:00:35 AM by BitDane
 #6

Nodes serves as gateway to the mempool[1] so there is a need for nodes to share their mempool with each other in order for other nodes (peers) to perform its own check for the validity of transactions.

Quote
If the transaction passes the node's checks, the transaction is added to the node's mempool. That node will also broadcast it to other nodes, called peers. Each of these peers will perform its own checks — adding valid transactions to its mempool and then broadcasting the transaction along to its peers.

Here is a good presentation by Babypips about how mempool is shared by nodes[2]

It was stated that every node on Bitcoin network share information about new transaction, since transaction is not directly added to the blockchain they are first collected and stored at mempool.  Then these nodes communicate with its peers to check the validity of transaction on after performing its own check and adds valid transaction to the mempool.  



[1] https://www.blocknative.com/blog/mempool-nodes
[2] https://www.babypips.com/crypto/learn/what-is-a-mempool#:~:text=Also%20known%20as%20%E2%80%9Cmempool%E2%80%9D%20for,to%20a%20newly%20created%20block.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8324


Bitcoin is a royal fork


View Profile WWW
December 21, 2022, 09:52:20 PM
Merited by ABCbits (1), BitDane (1)
 #7

But do they share their mempool, when a node disconnects from the network for some time for example?
A node that disconnects from the network has to come back online, and reach the chain tip to start receiving unconfirmed transactions. Obviously they can't share the mempool with an offline computer.

Then these nodes communicate with its peers to check the validity of transaction on the mempool.
They communicate to exchange unconfirmed transactions. Not to check / question its validity. That happens locally, and is done by each node individually.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitDane
Sr. Member
****
Offline Offline

Activity: 1372
Merit: 348


View Profile WWW
December 22, 2022, 07:57:55 AM
Last edit: December 22, 2022, 10:44:22 AM by BitDane
 #8

Then these nodes communicate with its peers to check the validity of transaction on the mempool.
They communicate to exchange unconfirmed transactions. Not to check / question its validity. That happens locally, and is done by each node individually.

Thank you for the correction and I stand corrected, yeah they communicate exchange information about unconfirmed transaction, no excuses I messed up there  Grin.
I messed up this line
Quote
Each Bitcoin node has its own mempool, where it stores the queue of transactions that it has checked and considers valid.

In addition we can also see the difference of mempool and blockchain function in this quotation.

Quote
The memory pool holds “fresh” or unconfirmed transactions (stored as individual transactions).
The blockchain holds “archived” or confirmed transactions  (packaged in “blocks”).

maikrothaman
Jr. Member
*
Offline Offline

Activity: 84
Merit: 1

PandoraCash.com anonymous money


View Profile WWW
December 23, 2022, 02:55:51 AM
 #9

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...

I'm not a programmer. I believe it is possible to spam the mempool if nodes would keep the entire mempool. A single person can generate 1M transactions by burning 0.5 BTC. The mempool would be unable to store all of the valid transactions due to RAM usage. I suppose some nodes might keep some mempool transactions while keeping others on different nodes.

Pandora Cash is the bitcoin killer
Untraceable, anonymous e-cash money
Private assets, unlinkable transactions, anonymous marketplace
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11010


Crypto Swap Exchange


View Profile
December 23, 2022, 03:00:54 AM
 #10

I'm not a programmer. I believe it is possible to spam the mempool if nodes would keep the entire mempool. A single person can generate 1M transactions by burning 0.5 BTC. The mempool would be unable to store all of the valid transactions due to RAM usage. I suppose some nodes might keep some mempool transactions while keeping others on different nodes.
This type of spam like any other type of spam requires paying a lot of fee in total specially since it also increases the fee so for example if they start at 1 sat/vb they will increase it to 100 sat/vb while their older transactions with low fee would be dropped out of mempool.
With 0.5BTC you can only create about roughly 100k transactions not a million.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7362


Top Crypto Casino


View Profile WWW
December 23, 2022, 04:08:57 AM
Merited by pooya87 (2), ABCbits (1)
 #11

I'm not a programmer. I believe it is possible to spam the mempool if nodes would keep the entire mempool. A single person can generate 1M transactions by burning 0.5 BTC. The mempool would be unable to store all of the valid transactions due to RAM usage. I suppose some nodes might keep some mempool transactions while keeping others on different nodes.
This type of spam like any other type of spam requires paying a lot of fee in total specially since it also increases the fee so for example if they start at 1 sat/vb they will increase it to 100 sat/vb while their older transactions with low fee would be dropped out of mempool.
With 0.5BTC you can only create about roughly 100k transactions not a million.

Assuming average tx size is 200vb, then that would take up 20MB of a mempool.

You'd have to burn around 7.5BTC to fully exhaust everyone's mempool.

Anyway, the fact that it costs 5 digits to pull off a successful mempool spam attack for no material gain shows how strong Bitcoin (and the Bitcoin price in particular) has become.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
gunhell16
Hero Member
*****
Offline Offline

Activity: 1876
Merit: 531



View Profile
December 23, 2022, 01:06:03 PM
 #12

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...

As far as I know mempool is like a waiting buffer or a waiting place for all the unconfirmed transaction before they are added to the
blockchain. While the Nodes is the computer that run the network software. Or in other terms it forms a network where
information can be shared or transacted.

Where the major function of Nodes are routing, storage, mining and wallet services. So if you know the difference beween Nodes and the mempool dude, You can able to find the right answer to your question anyway.







███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
 
 Duelbits 
██
██
██
██
██
██
██
██

██

██

██

██

██
TRY OUR UNIQUE GAMES!
    ◥ DICE  ◥ MINES  ◥ PLINKO  ◥ DUEL POKER  ◥ DICE DUELS   
█▀▀











█▄▄
 
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
 
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 KENONEW 
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀█











▄▄█
10,000x
 
MULTIPLIER
██
██
██
██
██
██
██
██

██

██

██

██

██
 
NEARLY
UP TO
50%
REWARDS
██
██
██
██
██
██
██
██

██

██

██

██

██
[/tabl
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8324


Bitcoin is a royal fork


View Profile WWW
December 23, 2022, 01:45:52 PM
 #13

You'd have to burn around 7.5BTC to fully exhaust everyone's mempool
And let's not forget that if some crazy multi-millionaire ever thought of executing this meaningless attack, nodes could just adjust the mempool size limit and make it ever more costly to do it again.

Anyway, the fact that it costs 5 digits to pull off a successful mempool spam attack for no material gain shows how strong Bitcoin (and the Bitcoin price in particular) has become.
It also shows that the block space is expensive. If block size was 10 MBs, spamming the UTXO set (or blockchain in general) would be about 10 times cheaper. See what happens with BSV, where they have 1 GB blocks, and some even store movies in.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
citb0in
Hero Member
*****
Offline Offline

Activity: 840
Merit: 730


Bitcoin g33k


View Profile
December 23, 2022, 03:36:00 PM
 #14

When a new node connects to the network, other nodes start to share new transactions with this new node they got. But do they share their mempool, when a node disconnects from the network for some time for example? I think that the mempool size is too large and it would be difficult to share their mempool state, but maybe I'm wrong...

No, the mempool is locally on each node and is not shared. A node (or better said the node operator) can decide for itself which transactions to pull and include in the local mempool, it can be configured on the node which transactions should be considered for a new block creation and on which criteria (thresholds) based upon.

  _      _   _       __  _          _  _   __
 |_) |  / \|/   (_  / \ | \  / |_ |_) (_ 
 |_) |_ \_/ \_ |\   __) \_/ |_ \/  |_ | \ __)
--> citb0in Solo-Mining Group <--- low stake of only 0.001 BTC. We regularly rent about 5 PH/s hash power and direct it to SoloCK pool. Wanna know more? Read through the link and JOIN NOW
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!