From e51ab915731d6049e1744f4cf20558a29d6f6977 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Mon, 9 May 2022 00:47:10 -0400
Subject: [PATCH 01/12] Add faq on address lookups / electrs issues
---
frontend/src/app/docs/api-docs/api-docs-data.ts | 8 ++++++++
1 file changed, 8 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 badd02619..9b0fe5df7 100644
--- a/frontend/src/app/docs/api-docs/api-docs-data.ts
+++ b/frontend/src/app/docs/api-docs/api-docs-data.ts
@@ -4583,5 +4583,13 @@ export const faqData = [
fragment: "install-mempool-with-docker",
title: "Can I install Mempool using Docker?",
answer: "Yes, we publish Docker images (or you can build your own). Check out the documentation for details."
+ },
+ {
+ type: "endpoint",
+ category: "advanced",
+ showConditions: bitcoinNetworks,
+ fragment: "address-lookup-issues",
+ title: "Why do I get an error for certain address lookups on my Mempool instance?",
+ answer: "
Mempool uses an Electrum server to do address lookups. There are several implementations of the Electrum server protocol, and Mempool can use any of them.
But the implementation you use affects performance. romanz/electrs is a common choice for its low resource requirements, and most full-node distros use it. While this implementation works great for basic queries, it will struggle with queries to look up addresses with many transactions—especially when run on low-power hardware like a Raspberry Pi.
To remedy this, you will need to power Mempool with a more powerful Electrum server. Consider Fulcrum. Fulcrum requires more resources than romanz/electrs but can still run on a Raspberry Pi and handles heavy queries much more efficiently.
If you have stronger hardware, consider running blockstream/electrs, which is the backend mempool.space uses.
"
}
];
From fd06567e4997e23a007c3c087c90d69e7bb4fbca Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Mon, 9 May 2022 00:49:17 -0400
Subject: [PATCH 02/12] Add faq link to address lookup error
---
frontend/src/app/components/address/address.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/components/address/address.component.html b/frontend/src/app/components/address/address.component.html
index 0ac64f86d..fa9e14651 100644
--- a/frontend/src/app/components/address/address.component.html
+++ b/frontend/src/app/components/address/address.component.html
@@ -134,7 +134,7 @@
({{ error.error }})
- The number of transactions on this address exceeds the Electrum server limit
+ There many transactions on this address, more than your backend can handle. See more on setting up a stronger backend.
Consider viewing this address on the official Mempool website instead:
From 411f764ff6b9a861bee9bfa6e793fa57a86d21e9 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Mon, 9 May 2022 01:13:54 -0400
Subject: [PATCH 03/12] Remove $ from commands in repo docs
---
README.md | 38 +++++++++++++++++++-------------------
docker/README.md | 4 ++--
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/README.md b/README.md
index a6032a18a..db921d86d 100644
--- a/README.md
+++ b/README.md
@@ -41,10 +41,10 @@ You will need [Bitcoin Core](https://github.com/bitcoin/bitcoin), [Electrum Serv
Clone the Mempool repo, and checkout the latest release tag:
```bash
-$ git clone https://github.com/mempool/mempool
-$ cd mempool
-$ latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
-$ git checkout $latestrelease
+git clone https://github.com/mempool/mempool
+cd mempool
+latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
+git checkout $latestrelease
```
### 2. Configure Bitcoin Core
@@ -63,11 +63,11 @@ Install MariaDB from your OS package manager:
```bash
# Debian, Ubuntu, etc.
-$ apt-get install mariadb-server mariadb-client
+apt-get install mariadb-server mariadb-client
# macOS
-$ brew install mariadb
-$ mysql.server start
+brew install mariadb
+mysql.server start
```
Create a database and grant privileges:
@@ -88,15 +88,15 @@ Query OK, 0 rows affected (0.00 sec)
Install Mempool dependencies with npm and build the backend:
```bash
-$ cd backend
-$ npm install --prod
-$ npm run build
+cd backend
+npm install --prod
+npm run build
```
In the `backend` folder, make a copy of the sample config:
```bash
-$ cp mempool-config.sample.json mempool-config.json
+cp mempool-config.sample.json mempool-config.json
```
Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
@@ -133,7 +133,7 @@ Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
Start the backend:
```bash
-$ npm run start
+npm run start
```
When it's running, you should see output like this:
@@ -164,15 +164,15 @@ Updating mempool
Install the Mempool dependencies with npm and build the frontend:
```bash
-$ cd frontend
-$ npm install --prod
-$ npm run build
+cd frontend
+npm install --prod
+npm run build
```
Install the output into the nginx webroot folder:
```bash
-$ sudo rsync -av --delete dist/ /var/www/
+sudo rsync -av --delete dist/ /var/www/
```
### 6. `nginx` + `certbot`
@@ -181,13 +181,13 @@ Install the supplied `nginx.conf` and `nginx-mempool.conf` in `/etc/nginx`:
```bash
# install nginx and certbot
-$ apt-get install -y nginx python3-certbot-nginx
+apt-get install -y nginx python3-certbot-nginx
# install the mempool configuration for nginx
-$ cp nginx.conf nginx-mempool.conf /etc/nginx/
+cp nginx.conf nginx-mempool.conf /etc/nginx/
# replace example.com with your domain name
-$ certbot --nginx -d example.com
+certbot --nginx -d example.com
```
If everything went well, you should see the beautiful mempool :grin:
diff --git a/docker/README.md b/docker/README.md
index da7bf20e3..07590d0dd 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -34,7 +34,7 @@ The IP address in the example above refers to Docker's default gateway IP addres
Now, run:
```bash
-$ docker-compose up
+docker-compose up
```
Your Mempool instance should be running at http://localhost. The graphs will be populated as new transactions are detected.
@@ -59,7 +59,7 @@ Of course, if your Docker host IP address is different, update accordingly.
With `bitcoind` and Electrum Server set up, run Mempool with:
```bash
-$ docker-compose up
+docker-compose up
```
## Further Configuration
From 83a286851b4faf4d6211de7277403e71f3c954c7 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Mon, 9 May 2022 13:47:58 -0400
Subject: [PATCH 04/12] Make electrum server faq answer a list
---
frontend/src/app/docs/api-docs/api-docs-data.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 9b0fe5df7..b0d4d1c4f 100644
--- a/frontend/src/app/docs/api-docs/api-docs-data.ts
+++ b/frontend/src/app/docs/api-docs/api-docs-data.ts
@@ -4590,6 +4590,6 @@ export const faqData = [
showConditions: bitcoinNetworks,
fragment: "address-lookup-issues",
title: "Why do I get an error for certain address lookups on my Mempool instance?",
- answer: "Mempool uses an Electrum server to do address lookups. There are several implementations of the Electrum server protocol, and Mempool can use any of them.
But the implementation you use affects performance. romanz/electrs is a common choice for its low resource requirements, and most full-node distros use it. While this implementation works great for basic queries, it will struggle with queries to look up addresses with many transactions—especially when run on low-power hardware like a Raspberry Pi.
To remedy this, you will need to power Mempool with a more powerful Electrum server. Consider Fulcrum. Fulcrum requires more resources than romanz/electrs but can still run on a Raspberry Pi and handles heavy queries much more efficiently.
If you have stronger hardware, consider running blockstream/electrs, which is the backend mempool.space uses.
"
+ answer: "If you're getting errors when doing address lookups, it's probably because of your Electrum server backend.
Mempool uses an Electrum server to do address lookups. There are several implementations of the Electrum server protocol, and Mempool can use any of them, but the implementation you use affects performance:
- romanz/electrs. This is a common choice for its low resource requirements, and most full-node distros use it. But while this implementation works great for basic queries, it will struggle with heavier ones (e.g. looking up addresses with many transactions)—especially when running on low-power hardware like a Raspberry Pi.
- Fulcrum. Fulcrum requires more resources than romanz/electrs but it can still run on a Raspberry Pi, and it handles heavy queries much more efficiently. If you're having issues with romanz/electrs, Fulcrum is worth a try.
- blockstream/electrs. If you have stronger hardware, consider running Blockstream's electrs implementation. It's the backend mempool.space uses, and is also what powers blockstream.info.
"
}
];
From 0e0b8dbd6cc6e80df2d62b6b1d07f549a462c73e Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Thu, 5 May 2022 16:18:28 +0900
Subject: [PATCH 05/12] Add download feature on mining charts
---
frontend/src/app/app.module.ts | 4 ++-
.../block-fee-rates-graph.component.html | 4 +++
.../block-fee-rates-graph.component.ts | 19 +++++++++++++-
.../block-fees-graph.component.html | 7 ++++-
.../block-fees-graph.component.ts | 24 ++++++++++++++++-
.../block-rewards-graph.component.html | 7 ++++-
.../block-rewards-graph.component.ts | 24 ++++++++++++++++-
.../hashrate-chart.component.html | 7 ++++-
.../hashrate-chart.component.ts | 25 ++++++++++++++++++
.../hashrate-chart-pools.component.html | 9 +++++--
.../hashrate-chart-pools.component.ts | 26 +++++++++++++++++++
.../pool-ranking/pool-ranking.component.html | 4 +++
.../pool-ranking/pool-ranking.component.ts | 12 +++++++++
frontend/src/app/shared/graphs.utils.ts | 9 +++++++
14 files changed, 172 insertions(+), 9 deletions(-)
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 8738c37f1..ef40be5a3 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -48,7 +48,8 @@ import { DashboardComponent } from './dashboard/dashboard.component';
import { DifficultyComponent } from './components/difficulty/difficulty.component';
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle,
- faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl } from '@fortawesome/free-solid-svg-icons';
+ faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown,
+ faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload } from '@fortawesome/free-solid-svg-icons';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
@@ -195,5 +196,6 @@ export class AppModule {
library.addIcons(faAngleLeft);
library.addIcons(faBook);
library.addIcons(faListUl);
+ library.addIcons(faDownload);
}
}
diff --git a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html
index 1fb97407b..def7d96aa 100644
--- a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html
+++ b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html
@@ -1,6 +1,10 @@