Author

Topic: More Explanation on mempool and candidate block (Read 234 times)

legendary
Activity: 2268
Merit: 18711
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};
hero member
Activity: 644
Merit: 661
- Jay -
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 -
hero member
Activity: 1022
Merit: 642
Magic

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.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
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
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
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.
hero member
Activity: 868
Merit: 952
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
hero member
Activity: 644
Merit: 661
- Jay -
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 -
newbie
Activity: 4
Merit: 0
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.
Jump to: