Bitcoin Forum
April 25, 2024, 12:29:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: More Explanation on mempool and candidate block  (Read 211 times)
Sudeeq3350 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 02, 2023, 05:28:54 PM
 #1

I'm a new member in these forums, and while doing research to learn how transactions can be added to blockchain, I came across two terms that confused me: memory pool and candidate block.
As a result, I require additional clarification. Thank you very much.
1714048173
Hero Member
*
Offline Offline

Posts: 1714048173

View Profile Personal Message (Offline)

Ignore
1714048173
Reply with quote  #2

1714048173
Report to moderator
1714048173
Hero Member
*
Offline Offline

Posts: 1714048173

View Profile Personal Message (Offline)

Ignore
1714048173
Reply with quote  #2

1714048173
Report to moderator
1714048173
Hero Member
*
Offline Offline

Posts: 1714048173

View Profile Personal Message (Offline)

Ignore
1714048173
Reply with quote  #2

1714048173
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
un_rank
Hero Member
*****
Offline Offline

Activity: 700
Merit: 674


- Jay -


View Profile WWW
April 02, 2023, 05:54:00 PM
Last edit: April 02, 2023, 06:04:21 PM by un_rank
Merited by hosseinimr93 (2), bitmover (2), vapourminer (1)
 #2

Mempool[1] or memory pool is the storage of all unconfirmed transactions on the bitcoin network.
You can check the mempool depth to know how much fees to use for your transaction to get confirmed in a reasonable amount of time. This would show as xxmb from the mempool tip, telling you that your transaction would be completed after xxmb has been cleared from the pool.

Each node has their own mempool with transactions they have validated and can chose their desired configuration.

Candidate block is each individuals miner's block of unconfirmed transactions. They still need to compete with other miners (who have their candidate blocks) to solve the puzzle and confirm the next valid block which would be transmitted to all nodes.

[1] https://jochen-hoenicke.de/queue/#BTC,24h,weight

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
Zaguru12
Hero Member
*****
Offline Offline

Activity: 672
Merit: 862



View Profile
April 02, 2023, 06:30:49 PM
Last edit: April 02, 2023, 06:43:42 PM by Zaguru12
 #3

A memory pool (also known as mem pool ) is like a storage for the node where transactions are stored before it is mined. The candidate block is where the nodes pick a transaction to store it temporarily before been mined on the blockchain.

The main difference is mem pool is the overall storage space for transactions but the candidate block is where the the multiple unconfirmed transactions picked from the Mempool are stored temporarily by mining nodes. It is This candidate block that the miner then adds to the blockchain

You can read through here;
https://learnmeabitcoin.com/technical/memory-pool

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
BlackHatCoiner
Legendary
*
Online Online

Activity: 1498
Merit: 7278


Farewell, Leo


View Profile
April 05, 2023, 09:34:28 AM
Merited by vapourminer (1)
 #4

Memory pool is constisted of the transactions that have been propagated and follow both consensus and standard rules. It is commonly said that each node is likely to have different mempool; besides asynchronous communication, that is also due to standardness. Most nodes for example will not accept and propagate transactions which pay less than 1000 sats/kb. But, there are a few who will even propagate a 0 sats/kb transaction. While all nodes must find consensus, standardness is rather a set of rules each node individually follows according to their standards.

Candidate block is a block whose miner is trying to find a valid Proof-of-Work.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

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

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

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

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

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











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
bitmover
Legendary
*
Offline Offline

Activity: 2282
Merit: 5884


bitcoindata.science


View Profile WWW
April 05, 2023, 04:48:38 PM
 #5

Mempool[1] or memory pool is the storage of all unconfirmed transactions on the bitcoin network.
You can check the mempool depth to know how much fees to use for your transaction to get confirmed in a reasonable amount of time. This would show as xxmb from the mempool tip, telling you that your transaction would be completed after xxmb has been cleared from the pool.


Just to  add to this answer.

The mempool has also a limited space of 300mb by default.
If the mempool exceeds 300mb the cheaper transactions may be dropped and the user will have to rebroadcast them again.

https://bitcoin.stackexchange.com/questions/96068/what-if-the-mempool-exceeds-300-mb

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
hZti
Hero Member
*****
Offline Offline

Activity: 952
Merit: 642

Magic


View Profile
April 05, 2023, 06:09:33 PM
 #6


Just to  add to this answer.

The mempool has also a limited space of 300mb by default.
If the mempool exceeds 300mb the cheaper transactions may be dropped and the user will have to rebroadcast them again.

https://bitcoin.stackexchange.com/questions/96068/what-if-the-mempool-exceeds-300-mb


This will usually also happen after around 2 weeks, when a transaction was not included into a block because of low fee rate. I’m not shure however if this happens because a specific time countdown or because it has reached the position to get thrown out of the mempool as the next one. Maybe somebody here does know and can clarify.
un_rank
Hero Member
*****
Offline Offline

Activity: 700
Merit: 674


- Jay -


View Profile WWW
April 05, 2023, 06:24:16 PM
Merited by o_e_l_e_o (4), hosseinimr93 (2), ABCbits (1), _act_ (1)
 #7

This will usually also happen after around 2 weeks, when a transaction was not included into a block because of low fee rate
This 14 day window is unrelated to the space in the mempool. By default, unconfirmed transactions transactions are dropped from the memory pool of nodes, it could be earlier or later for different nodes depending on their configuration. But when majority of nodes no longer have it on their mempool, it is best to rebroadcast it.

This is different from what bitmover is talking about. If a node exceeds their memory space (300mb by default) they can drop low fee transactions to free up space and include higher priority transactions (based on weight), even though those low fee transactions have not lasted close to 14 days unconfirmed.

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
April 06, 2023, 09:08:48 AM
Merited by hosseinimr93 (2), un_rank (2), vapourminer (1), ABCbits (1)
 #8

As un_rank says, they are two entirely different things.

Here is where they are defined in the code:

https://github.com/bitcoin/bitcoin/blob/5a8bd4505687a7ec76d731b1a8249ee04d641990/src/kernel/mempool_options.h#L19-L20
Code:
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300};

https://github.com/bitcoin/bitcoin/blob/5a8bd4505687a7ec76d731b1a8249ee04d641990/src/kernel/mempool_options.h#L23-L24
Code:
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
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!