From f55590269ec1ead71004d51e8c59c2ebf323ccb3 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 19 May 2022 12:43:37 -0400 Subject: [PATCH 01/11] Move manual install docs away from main readme Replace with links to docker/, frontend/, and /backend. --- README.md | 176 +++--------------------------------------------------- 1 file changed, 7 insertions(+), 169 deletions(-) diff --git a/README.md b/README.md index db921d86d..ae0e2191e 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,7 @@ It is an open-source project developed and operated for the benefit of the Bitco Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server. -We support the following installation methods, ranked in order from simple to advanced: - -1) [One-click installation on full-node distros](#one-click-installation) -2) [Docker installation on Linux using docker-compose](./docker) -3) [Manual installation on Linux or FreeBSD](#manual-installation) -4) [Production installation on a powerful FreeBSD server](./production) - -This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations. +**Most people should use a one-click install method.** Other install methods are meant for developers and others with experience managing servers. ## One-Click Installation @@ -29,167 +22,12 @@ Mempool can be conveniently installed on the following full-node distros: - [myNode](https://github.com/mynodebtc/mynode) - [Start9](https://github.com/Start9Labs/embassy-os) - -## Manual Installation +**We highly recommend you deploy your own Mempool instance this way.** No matter which option you pick, you'll be able to get your own fully-sovereign instance of Mempool up quickly without needing to fiddle with any settings. -The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS. +## Advanced Installation Methods -You will need [Bitcoin Core](https://github.com/bitcoin/bitcoin), [Electrum Server](https://github.com/romanz/electrs), [Node.js](https://github.com/nodejs/node), [MariaDB](https://github.com/mariadb/server), and [Nginx](https://github.com/nginx/nginx). Below, we walk through how to configure each of these. +Mempool can be installed in other ways too, but we only recommend doing so if you're a developer, have experience managing servers, or otherwise know what you're doing. -### 1. Get Latest Mempool Release - -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 -``` - -### 2. Configure Bitcoin Core - -Enable RPC and txindex in `bitcoin.conf`: - -```bash -rpcuser=mempool -rpcpassword=mempool -txindex=1 -``` - -### 3. Get & Configure MySQL - -Install MariaDB from your OS package manager: - -```bash -# Debian, Ubuntu, etc. -apt-get install mariadb-server mariadb-client - -# macOS -brew install mariadb -mysql.server start -``` - -Create a database and grant privileges: - -```bash -MariaDB [(none)]> drop database mempool; -Query OK, 0 rows affected (0.00 sec) - -MariaDB [(none)]> create database mempool; -Query OK, 1 row affected (0.00 sec) - -MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool'; -Query OK, 0 rows affected (0.00 sec) -``` - -### 4. Build Mempool Backend - -Install Mempool dependencies with npm and build the backend: - -```bash -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 -``` - -Edit `mempool-config.json` with your Bitcoin Core node RPC credentials: - -```bash -{ - "MEMPOOL": { - "NETWORK": "mainnet", - "BACKEND": "electrum", - "HTTP_PORT": 8999 - }, - "CORE_RPC": { - "HOST": "127.0.0.1", - "PORT": 8332, - "USERNAME": "mempool", - "PASSWORD": "mempool" - }, - "ELECTRUM": { - "HOST": "127.0.0.1", - "PORT": 50002, - "TLS_ENABLED": true - }, - "DATABASE": { - "ENABLED": true, - "HOST": "127.0.0.1", - "PORT": 3306, - "USERNAME": "mempool", - "PASSWORD": "mempool", - "DATABASE": "mempool" - } -} -``` - -Start the backend: - -```bash -npm run start -``` - -When it's running, you should see output like this: - -```bash -Mempool updated in 0.189 seconds -Updating mempool -Mempool updated in 0.096 seconds -Updating mempool -Mempool updated in 0.099 seconds -Updating mempool -Calculated fee for transaction 1 / 10 -Calculated fee for transaction 2 / 10 -Calculated fee for transaction 3 / 10 -Calculated fee for transaction 4 / 10 -Calculated fee for transaction 5 / 10 -Calculated fee for transaction 6 / 10 -Calculated fee for transaction 7 / 10 -Calculated fee for transaction 8 / 10 -Calculated fee for transaction 9 / 10 -Calculated fee for transaction 10 / 10 -Mempool updated in 0.243 seconds -Updating mempool -``` - -### 5. Build Mempool Frontend - -Install the Mempool dependencies with npm and build the frontend: - -```bash -cd frontend -npm install --prod -npm run build -``` - -Install the output into the nginx webroot folder: - -```bash -sudo rsync -av --delete dist/ /var/www/ -``` - -### 6. `nginx` + `certbot` - -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 - -# install the mempool configuration for nginx -cp nginx.conf nginx-mempool.conf /etc/nginx/ - -# replace example.com with your domain name -certbot --nginx -d example.com -``` - -If everything went well, you should see the beautiful mempool :grin: - -If you get stuck on "loading blocks", this means the websocket can't connect. Check your nginx proxy setup, firewalls, etc. and open an issue if you need help. +- See the [`docker/`](./docker/) directory for instructions on deploying Mempool with Docker. +- See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers and small-scale deployments. +- See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale. \ No newline at end of file From 428401891e44ccedd0ca2e6c0f413c56254024a6 Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 25 May 2022 19:03:25 +0400 Subject: [PATCH 02/11] i18n extract --- frontend/src/locale/messages.xlf | 112 ++++++++++++++----------------- 1 file changed, 50 insertions(+), 62 deletions(-) diff --git a/frontend/src/locale/messages.xlf b/frontend/src/locale/messages.xlf index 2d1a498dd..578865b5c 100644 --- a/frontend/src/locale/messages.xlf +++ b/frontend/src/locale/messages.xlf @@ -398,11 +398,7 @@ src/app/components/blocks-list/blocks-list.component.html - 13,15 - - - src/app/components/latest-blocks/latest-blocks.component.html - 10,12 + 13,14 src/app/components/pool/pool.component.html @@ -464,10 +460,6 @@ src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html 5,7 - - src/app/components/latest-blocks/latest-blocks.component.html - 9,10 - src/app/components/pool/pool.component.html 212,214 @@ -505,8 +497,8 @@ 34,36 - src/app/components/latest-blocks/latest-blocks.component.html - 12,16 + src/app/components/blocks-list/blocks-list.component.html + 18,19 src/app/components/mempool-block/mempool-block.component.html @@ -528,14 +520,6 @@ src/app/components/blocks-list/blocks-list.component.html 4,9 - - src/app/components/latest-blocks/latest-blocks.component.html - 2,7 - - - src/app/components/latest-blocks/latest-blocks.component.ts - 39 - src/app/components/liquid-master-page/liquid-master-page.component.html 35,37 @@ -715,7 +699,7 @@ src/app/components/about/about.component.html - 357,361 + 361,365 src/app/dashboard/dashboard.component.html @@ -956,7 +940,7 @@ src/app/components/transactions-list/transactions-list.component.html - 245,247 + 249,251 @@ -1008,7 +992,7 @@ src/app/components/transactions-list/transactions-list.component.html - 272,273 + 277,278 Transaction singular confirmation count shared.confirmation-count.singular @@ -1036,7 +1020,7 @@ src/app/components/transactions-list/transactions-list.component.html - 273,274 + 278,279 Transaction plural confirmation count shared.confirmation-count.plural @@ -1368,7 +1352,7 @@ Community Alliances src/app/components/about/about.component.html - 257,259 + 261,263 about.alliances @@ -1376,7 +1360,7 @@ Project Translators src/app/components/about/about.component.html - 273,275 + 277,279 about.translators @@ -1384,7 +1368,7 @@ Project Contributors src/app/components/about/about.component.html - 287,289 + 291,293 about.contributors @@ -1392,7 +1376,7 @@ Project Members src/app/components/about/about.component.html - 299,301 + 303,305 about.project_members @@ -1400,7 +1384,7 @@ Project Maintainers src/app/components/about/about.component.html - 312,314 + 316,318 about.maintainers @@ -1490,7 +1474,7 @@ src/app/components/transactions-list/transactions-list.component.html - 280,282 + 285,287 src/app/dashboard/dashboard.component.html @@ -1920,7 +1904,7 @@ src/app/components/blocks-list/blocks-list.component.html - 15,17 + 15,16 src/app/components/pool/pool.component.html @@ -1963,11 +1947,7 @@ src/app/components/blocks-list/blocks-list.component.html - 18,20 - - - src/app/components/latest-blocks/latest-blocks.component.html - 13,16 + 19,21 src/app/components/mempool-block/mempool-block.component.html @@ -2109,7 +2089,7 @@ src/app/components/transactions-list/transactions-list.component.html - 265 + 269 src/app/dashboard/dashboard.component.html @@ -2257,19 +2237,23 @@ Transaction Details transaction.details - - Error loading block data. + + Error loading data. src/app/components/block/block.component.html - 274,280 + 203,205 - block.error.loading-block-data + + src/app/components/block/block.component.html + 285,290 + + error.general-loading-data Block : src/app/components/block/block.component.ts - 146 + 147 @@ -2294,10 +2278,6 @@ src/app/components/blocks-list/blocks-list.component.html 14,15 - - src/app/components/latest-blocks/latest-blocks.component.html - 11,12 - src/app/components/pool/pool.component.html 214,215 @@ -2316,7 +2296,7 @@ TXs src/app/components/blocks-list/blocks-list.component.html - 18,19 + 18 src/app/components/pool/pool.component.html @@ -2890,11 +2870,11 @@ src/app/components/transactions-list/transactions-list.component.html - 144,147 + 148,151 src/app/components/transactions-list/transactions-list.component.html - 255,257 + 259,261 show-all @@ -3445,7 +3425,7 @@ src/app/components/transactions-list/transactions-list.component.html - 276,279 + 281,284 Transaction unconfirmed state transaction.unconfirmed @@ -3562,7 +3542,7 @@ src/app/components/transactions-list/transactions-list.component.html - 265,266 + 269,270 sat shared.sat @@ -3604,7 +3584,7 @@ ScriptSig (ASM) src/app/components/transactions-list/transactions-list.component.html - 100,102 + 104,106 ScriptSig (ASM) transactions-list.scriptsig.asm @@ -3613,7 +3593,7 @@ ScriptSig (HEX) src/app/components/transactions-list/transactions-list.component.html - 104,107 + 108,111 ScriptSig (HEX) transactions-list.scriptsig.hex @@ -3622,7 +3602,7 @@ Witness src/app/components/transactions-list/transactions-list.component.html - 109,111 + 113,115 transactions-list.witness @@ -3630,7 +3610,7 @@ P2SH redeem script src/app/components/transactions-list/transactions-list.component.html - 113,114 + 117,118 transactions-list.p2sh-redeem-script @@ -3638,7 +3618,7 @@ P2TR tapscript src/app/components/transactions-list/transactions-list.component.html - 117,119 + 121,123 transactions-list.p2tr-tapscript @@ -3646,7 +3626,7 @@ P2WSH witness script src/app/components/transactions-list/transactions-list.component.html - 119,121 + 123,125 transactions-list.p2wsh-witness-script @@ -3654,7 +3634,7 @@ nSequence src/app/components/transactions-list/transactions-list.component.html - 124,126 + 128,130 transactions-list.nsequence @@ -3662,7 +3642,7 @@ Previous output script src/app/components/transactions-list/transactions-list.component.html - 129,130 + 133,134 transactions-list.previous-output-script @@ -3670,7 +3650,7 @@ Previous output type src/app/components/transactions-list/transactions-list.component.html - 133,134 + 137,138 transactions-list.previous-output-type @@ -3678,7 +3658,7 @@ Peg-out to src/app/components/transactions-list/transactions-list.component.html - 172,173 + 176,177 transactions-list.peg-out-to @@ -3686,7 +3666,7 @@ ScriptPubKey (ASM) src/app/components/transactions-list/transactions-list.component.html - 233,235 + 237,239 ScriptPubKey (ASM) transactions-list.scriptpubkey.asm @@ -3695,11 +3675,19 @@ ScriptPubKey (HEX) src/app/components/transactions-list/transactions-list.component.html - 237,240 + 241,244 ScriptPubKey (HEX) transactions-list.scriptpubkey.hex + + Show all inputs to reveal fee data + + src/app/components/transactions-list/transactions-list.component.html + 271,274 + + transactions-list.load-to-reveal-fee-info + This transaction saved % on fees by using native SegWit-Bech32 From 36f56de4f1c816da6ca26b94a8ee99abaa4bcd13 Mon Sep 17 00:00:00 2001 From: softsimon Date: Sat, 21 May 2022 02:07:43 +0400 Subject: [PATCH 03/11] Liquid UX fixes fixes #1683 fixes #1681 --- frontend/src/app/components/block/block.component.html | 2 +- .../src/app/components/statistics/statistics.component.html | 3 +-- .../src/app/components/statistics/statistics.component.scss | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/block/block.component.html b/frontend/src/app/components/block/block.component.html index 07ac76c21..00fc18f2a 100644 --- a/frontend/src/app/components/block/block.component.html +++ b/frontend/src/app/components/block/block.component.html @@ -114,7 +114,7 @@ - + Miner -
+