From eefe343973e04fce70daa1799e3ff935a40ec9b0 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:54:12 -0400 Subject: [PATCH 1/3] Add faqs on mempool size and memory usage --- frontend/src/app/docs/api-docs/api-docs-data.ts | 14 ++++++++++++++ .../src/app/docs/api-docs/api-docs.component.html | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index 62d031613..decde2845 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -8859,6 +8859,20 @@ export const faqData = [ fragment: "what-is-full-mempool", title: "What does it mean for the mempool to be \"full\"?", }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + fragment: "how-big-is-mempool.space-mempool", + title: "How big is the mempool.space mempool?", + }, + { + type: "endpoint", + category: "advanced", + showConditions: bitcoinNetworks, + fragment: "what-is-memory-usage", + title: "What is memory usage?", + }, { type: "endpoint", category: "advanced", diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index f5bf519bf..b45279bc3 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -207,6 +207,18 @@
When a Bitcoin transaction is made, it is stored in a Bitcoin node's mempool before it is confirmed into a block. When the rate of incoming transactions exceeds the rate transactions are confirmed, the mempool grows in size.
By default, Bitcoin Core allocates 300MB of memory for its mempool, so when a node's mempool grows big enough to use all 300MB of allocated memory, we say it's "full".
Once a node's mempool is using all of its allocated memory, it will start rejecting new transactions below a certain feerate threshold—so when this is the case, be extra sure to set a feerate that (at a minimum) exceeds that threshold. The current threshold feerate (and memory usage) are displayed right on Mempool's front page.
+mempool.space uses 2 Bitcoin nodes to obtain data: one with a standard 300MB memory allocation for its mempool (call this Node A), and another with a much larger memory allocation for its mempool (call this Node B).
+Most nodes on the Bitcoin network are configured to run like Node A. When all 300MB of memory are used up, the node will start rejecting transactions below a certain feerate from entering its mempool. Running a standard node allows mempool.space to tell you what this feerate is, so you can use a feerate that is high enough to get your transaction widely propagated (i.e. accepted into as many nodes' mempools as possible).
+Node B's mempool is so big that it doesn't ever fill up, so it never rejects transactions. This allows for mempool.space to provide you with information on any pending transaction it has received—no matter how congested the mempool is, and no matter how deep in the queue the transaction is.
+Memory usage on the front page indicates the amount of system memory used by a Bitcoin node's mempool at a particular moment in time. The amount of memory used by a node's mempool is always more than the total size of all pending transactions in its mempool due to indexes, pointers, and other overhead for storage and processing.
+When mempools fill up, you may notice memory usage on mempool.space go beyond 300MB. This is because, as explained above, mempool.space runs a node with a very high mempool memory allocation—so it never rejects (or evicts) transactions. If memory usage shows 600MB, for example, this just means that a node that stores all the transactions it receives will use about 600MB of memory for its mempool at that moment in time. It's another data point to give you an idea of how congested the network is.
+A Bitcoin node running the default 300MB setting for mempool memory allocation, like most Raspberry Pi nodes, will never go past 300MB of memory usage.
+When a new block is found, mining pools send miners a block template with no transactions so they can start searching for the next block as soon as possible. They send a block template full of transactions right afterward, but a full block template is a bigger data transfer and takes slightly longer to reach miners.
In this intervening time, which is usually no more than 1-2 seconds, miners sometimes get lucky and find a new block using the empty block template.
When a Bitcoin transaction is made, it is stored in a Bitcoin node's mempool before it is confirmed into a block. When the rate of incoming transactions exceeds the rate transactions are confirmed, the mempool grows in size.
By default, Bitcoin Core allocates 300MB of memory for its mempool, so when a node's mempool grows big enough to use all 300MB of allocated memory, we say it's "full".
Once a node's mempool is using all of its allocated memory, it will start rejecting new transactions below a certain feerate threshold—so when this is the case, be extra sure to set a feerate that (at a minimum) exceeds that threshold. The current threshold feerate (and memory usage) are displayed right on Mempool's front page.
-mempool.space uses 2 Bitcoin nodes to obtain data: one with a standard 300MB memory allocation for its mempool (call this Node A), and another with a much larger memory allocation for its mempool (call this Node B).
-Most nodes on the Bitcoin network are configured to run like Node A. When all 300MB of memory are used up, the node will start rejecting transactions below a certain feerate from entering its mempool. Running a standard node allows mempool.space to tell you what this feerate is, so you can use a feerate that is high enough to get your transaction widely propagated (i.e. accepted into as many nodes' mempools as possible).
-Node B's mempool is so big that it doesn't ever fill up, so it never rejects transactions. This allows for mempool.space to provide you with information on any pending transaction it has received—no matter how congested the mempool is, and no matter how deep in the queue the transaction is.
+mempool.space uses multiple Bitcoin nodes to obtain data: some with the default 300MB mempool memory limit (call these Small Nodes) and others with a much larger mempool memory limit (call these Big Nodes).
+Many nodes on the Bitcoin network are configured to run with the default 300MB mempool memory setting. When all 300MB of memory are used up, such nodes will reject transactions below a certain threshold feerate. Running Small Nodes allows mempool.space to tell you what this threshold feerate is—this is the "Purging" feerate that shows on the front page when mempools are full, which you can use to be reasonably sure that your transaction will be widely propagated.
+Big Node mempools are so big that they don't need to reject (or purge) transactions. Such nodes allow for mempool.space to provide you with information on any pending transaction it has received—no matter how congested the mempool is, and no matter how low-feerate or low-priority the transaction is.
Memory usage on the front page indicates the amount of system memory used by a Bitcoin node's mempool at a particular moment in time. The amount of memory used by a node's mempool is always more than the total size of all pending transactions in its mempool due to indexes, pointers, and other overhead for storage and processing.
-When mempools fill up, you may notice memory usage on mempool.space go beyond 300MB. This is because, as explained above, mempool.space runs a node with a very high mempool memory allocation—so it never rejects (or evicts) transactions. If memory usage shows 600MB, for example, this just means that a node that stores all the transactions it receives will use about 600MB of memory for its mempool at that moment in time. It's another data point to give you an idea of how congested the network is.
-A Bitcoin node running the default 300MB setting for mempool memory allocation, like most Raspberry Pi nodes, will never go past 300MB of memory usage.
+Memory usage on the front page refers to the real-time amount of system memory used by a Bitcoin node's mempool. This memory usage number is always higher than the total size of all pending transactions in the mempool due to indexes, pointers, and other overhead used by Bitcoin Core for storage and processing.
+mempool.space shows memory usage of a node that has a very high mempool memory limit (more on this above). As a result, when mempools fill up, you may notice memory usage on mempool.space go beyond 300MB. This is not a mistake—this memory usage figure is high because it's for Bitcoin node that isn't rejecting (or evicting) transactions. Consider it to be another data point to give you an idea of how congested the mempool is relative to the default memory limit of 300MB.
+A Bitcoin node running the default 300MB mempool memory limit, like most Raspberry Pi nodes, will never go past 300MB of memory usage.
-1 )">{{ item.title }}
- -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('auditOnly') && item.options.auditOnly && auditEnabled ) )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }} + -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ) || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('auditOnly') && item.options.auditOnly && auditEnabled ) )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }}{{ item.title }} | {{ item.category }} |
Memory usage on the front page refers to the real-time amount of system memory used by a Bitcoin node's mempool. This memory usage number is always higher than the total size of all pending transactions in the mempool due to indexes, pointers, and other overhead used by Bitcoin Core for storage and processing.
-mempool.space shows memory usage of a node that has a very high mempool memory limit (more on this above). As a result, when mempools fill up, you may notice memory usage on mempool.space go beyond 300MB. This is not a mistake—this memory usage figure is high because it's for Bitcoin node that isn't rejecting (or evicting) transactions. Consider it to be another data point to give you an idea of how congested the mempool is relative to the default memory limit of 300MB.
+mempool.space shows the memory usage of a Bitcoin node that has a very high mempool memory limit. As a result, when mempools fill up, you may notice memory usage on mempool.space go beyond 300MB. This is not a mistake—this memory usage figure is high because it's for a Bitcoin node that isn't rejecting (or evicting) transactions. Consider it to be another data point to give you an idea of how congested the mempool is relative to the default memory limit of 300MB.
A Bitcoin node running the default 300MB mempool memory limit, like most Raspberry Pi nodes, will never go past 300MB of memory usage.