Compare versions
Version 1 → Version 2. Removed · Added. This shows the entry's text as it is written, including its formatting marks.
Version 1 · Version 2 · Version history
Side by side · Together
Version 1Version 2
13 unchanged paragraphs
The mempool (short for "memory pool") is the set of valid but not yet confirmed Bitcoin transactions that a single full node holds in its memory while it waits for them to be included in a block.[1][2]
The mempool (short for "memory pool") is the set of valid but not yet confirmed Bitcoin transactions that a single full node holds in its memory while it waits for them to be included in a block.[1][2]
Each node keeps its own mempool, so there is no single, shared one: two nodes can hold slightly different sets of waiting transactions at the same moment, depending on which transactions they have received and what their settings allow.[1][3]
Each node keeps its own mempool, so there is no single, shared one: two nodes can hold slightly different sets of waiting transactions at the same moment, depending on which transactions they have received and what their settings allow.[1][3]
## Where it fits
## Where it fits
The original Bitcoin paper describes the network's work as a short cycle: new transactions are broadcast to all nodes, and each node collects new transactions into a block it then tries to find a [proof of work](/t/3595/proof-of-work) for.[4] The mempool is the practical form of that "collects new transactions" step. Full nodes may track unconfirmed transactions that are eligible to be included in the next block, and Bitcoin Core stores them in non-persistent memory, calling the store a memory pool or mempool.[1]
The original Bitcoin paper describes the network's work as a short cycle: new transactions are broadcast to all nodes, and each node collects new transactions into a block it then tries to find a [proof of work](/t/3595/proof-of-work) for.[4] The mempool is the practical form of that "collects new transactions" step. Full nodes may track unconfirmed transactions that are eligible to be included in the next block, and Bitcoin Core stores them in non-persistent memory, calling the store a memory pool or mempool.[1]
Transactions arrive by relay between peers. A peer announces a transaction with an inventory message, and the transaction is sent only if the recipient asks for it; the recipient then relays it onward if it is valid.[1] Light clients that use simplified payment verification do not keep a mempool or relay transactions, because they cannot independently confirm that a transaction is unspent and unconfirmed.[1] Once a transaction is included in a block added to the [blockchain](/t/3610/blockchain), it is no longer waiting.
Transactions arrive by relay between peers. A peer announces a transaction with an inventory message, and the transaction is sent only if the recipient asks for it; the recipient then relays it onward if it is valid.[1] Light clients that use simplified payment verification do not keep a mempool or relay transactions, because they cannot independently confirm that a transaction is unspent and unconfirmed.[1] Once a transaction is included in a block added to the [blockchain](/t/3610/blockchain), it is no longer waiting.
## What a mempool does not guarantee
## What a mempool does not guarantee
The mempool is a local, volatile store rather than part of the blockchain. When a node shuts down, its memory pool is lost, except for any transactions stored by its wallet, and transactions that are never mined tend to slowly disappear from the network as peers restart.[1] An unconfirmed transaction that one node holds may therefore be absent from another node, and nothing in the mempool is a promise that a miner will include it.
The mempool is a local, volatile store rather than part of the blockchain. When a node shuts down, its memory pool is lost, except for any transactions stored by its wallet, and transactions that are never mined tend to slowly disappear from the network as peers restart.[1] An unconfirmed transaction that one node holds may therefore be absent from another node, and nothing in the mempool is a promise that a miner will include it.
## Size limits
## Size limits
Bitcoin Core limits how much memory the mempool may use through its `-maxmempool` setting. The documented default is 300 MB and the minimum accepted value is 5 MB; Bitcoin Core's documentation notes that a lower limit means transactions are evicted sooner.[2] The limit is a node operator's setting, not a rule of the Bitcoin protocol, which is why nodes can differ.
Bitcoin Core limits how much memory the mempool may use through its `-maxmempool` setting. The documented default is 300 MB and the minimum accepted value is 5 MB; Bitcoin Core's documentation notes that a lower limit means transactions are evicted sooner.[2] The limit is a node operator's setting, not a rule of the Bitcoin protocol, which is why nodes can differ.
## Replacing and bumping waiting transactions
## Replacing and bumping waiting transactions
Two transactions conflict if they spend one or more of the same inputs. A node can replace a waiting transaction with a conflicting one, a mechanism called replace-by-fee (RBF).[3] Under Bitcoin Core's documented policy, a replacement must pay at least the total fee of the transactions it evicts, must pay an additional amount that covers its own size at the node's incremental relay feerate (0.1 satoshi per virtual byte by default), and must improve the mempool's fee-rate ordering of what would be mined.[3]
Two transactions conflict if they spend one or more of the same inputs. A node can replace a waiting transaction with a conflicting one, a mechanism called replace-by-fee (RBF).[3] Under Bitcoin Core's documented policy, a replacement must pay at least the total fee of the transactions it evicts, must pay an additional amount that covers its own size at the node's incremental relay feerate (0.1 satoshi per virtual byte by default), and must improve the mempool's fee-rate ordering of what would be mined.[3]
The rules have changed over time. [BIP 125](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki), authored by David A. Harding and Peter Todd and assigned in December 2015, let a transaction opt in to replacement by setting an input's sequence number below a threshold.[5] Full replacement without that signal became a configurable option in Bitcoin Core 24.0, and the default in version 28.0, released on 2 October 2024.[3][6] Bitcoin Core's documentation states that signaling is no longer required.[3]
The rules have changed over time. [BIP 125](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki), authored by David A. Harding and Peter Todd and assigned in December 2015, let a transaction opt in to replacement by setting an input's sequence number below a threshold.[5] Full replacement without that signal became a configurable option in Bitcoin Core 24.0, and the default in version 28.0, released on 2 October 2024.[3][6] Bitcoin Core's documentation states that signaling is no longer required.[3]
A different technique, child-pays-for-parent (CPFP), lets a high-fee child transaction pull a low-fee parent along. Bitcoin Core's package policy evaluates a parent and child together, using their combined fee rate, so that a low-fee parent can be accepted when a child pays enough.[7] Version 28.0 added relay of packages with one parent and one child, which its release notes describe as limited and not yet reliable under adversarial conditions.[6]
A different technique, child-pays-for-parent (CPFP), lets a high-fee child transaction pull a low-fee parent along. Bitcoin Core's package policy evaluates a parent and child together, using their combined fee rate, so that a low-fee parent can be accepted when a child pays enough.[7] Version 28.0 added relay of packages with one parent and one child, which its release notes describe as limited and not yet reliable under adversarial conditions.[6]
## When the mempool is full
A full mempool does not simply stop accepting transactions. Bitcoin Core's package documentation describes a dynamic minimum feerate, "determined by the transactions evicted when the mempool reaches capacity", which is separate from the static minimum relay feerate.[7] As of the documentation's current text, a transaction paying less than that rising minimum can be rejected, and a smaller `-maxmempool` setting means transactions are evicted sooner.[2][7]
This matters for transactions that were signed in advance and cannot be re-signed with a higher fee. The documentation gives an example with a minimum of 5 satoshis per virtual byte, in which a parent paying 1 satoshi per virtual byte is judged together with a high-fee child, so that the pair can be accepted although the parent alone could not.[7]
## Packages and version 3 transactions
Bitcoin Core evaluates some groups of related transactions as a unit, called a package. Its documentation limits a package to 25 transactions and 404,000 weight units.[7] It also limits package replacement: the transactions being replaced may belong to no more than 100 distinct clusters.[7]
The Bitcoin Core 28.0 release notes describe several mempool policy changes. Transactions with version number 3 became standard on all networks and follow a policy called TRUC, with a maximum transaction size of 10,000 virtual bytes.[6] The notes also state that limited package replace-by-fee was enabled and that the default of the `-mempoolfullrbf` option changed from 0 to 1.[6] They add that package relay can help when a parent transaction is below the mempool minimum feerate, and that TRUC parents may pay no fee.[6] The package documentation says combining TRUC transactions with package replacement can make fee bumping more robust.[7]
3 unchanged paragraphs
This entry describes Bitcoin Core's policy as published in its documentation; other node software may behave differently, and policy settings are not consensus rules.[3][7]
This entry describes Bitcoin Core's policy as published in its documentation; other node software may behave differently, and policy settings are not consensus rules.[3][7]
## Sources
## Sources
1. Bitcoin Developer Guide, "P2P Network" (Bitcoin.org developer documentation). https://developer.bitcoin.org/devguide/p2p_network.html
2. Bitcoin Core documentation, "Reduce Memory" (doc/reduce-memory.md). https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md
3. Bitcoin Core documentation, "Mempool Replacements" (doc/policy/mempool-replacements.md). https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md
4. Satoshi Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System", section 5 "Network". https://bitcoin.org/bitcoin.pdf
5. David A. Harding and Peter Todd, BIP 125, "Opt-in Full Replace-by-Fee Signaling", assigned 2015-12-04. https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
6. Bitcoin Core 28.0 release notes, published 2 October 2024. https://bitcoincore.org/en/releases/28.0/
7. Bitcoin Core documentation, "Package Mempool Accept" (doc/policy/packages.md). https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md
1. Bitcoin Developer Guide, "P2P Network" (Bitcoin.org developer documentation). https://developer.bitcoin.org/devguide/p2p_network.html
2. Bitcoin Core documentation, "Reduce Memory" (doc/reduce-memory.md). https://github.com/bitcoin/bitcoin/blob/master/doc/reduce-memory.md
3. Bitcoin Core documentation, "Mempool Replacements" (doc/policy/mempool-replacements.md). https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md
4. Satoshi Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System", section 5 "Network". https://bitcoin.org/bitcoin.pdf
5. David A. Harding and Peter Todd, BIP 125, "Opt-in Full Replace-by-Fee Signaling", assigned 2015-12-04. https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki
6. Bitcoin Core 28.0 release notes, published 2 October 2024. https://bitcoincore.org/en/releases/28.0/
7. Bitcoin Core documentation, "Package Mempool Accept" (doc/policy/packages.md). https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md