From 0102c738fa2c8c3a71ac4e419b927eaa9f0486b5 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Mon, 13 Jun 2022 21:03:17 -0400 Subject: [PATCH 1/8] Fix anchor links on new ng faq template --- frontend/src/app/docs/api-docs/api-docs.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/docs/api-docs/api-docs.component.ts b/frontend/src/app/docs/api-docs/api-docs.component.ts index 69abd18de..323eb1ba6 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.ts +++ b/frontend/src/app/docs/api-docs/api-docs.component.ts @@ -36,6 +36,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { ngAfterViewInit() { const that = this; + this.faqTemplates.forEach((x) => this.dict[x.type] = x.template); setTimeout( () => { if( this.route.snapshot.fragment ) { this.openEndpointContainer( this.route.snapshot.fragment ); @@ -44,7 +45,6 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { window.addEventListener('scroll', function() { that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative"; }, { passive: true} ); - this.faqTemplates.forEach((x) => this.dict[x.type] = x.template); }, 1 ); } From 8228290d25a003ef4732c42dd20bd78cd9282d0d Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Mon, 13 Jun 2022 21:08:44 -0400 Subject: [PATCH 2/8] Fix stray typos from moving faqs to html --- frontend/src/app/docs/api-docs/api-docs.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 90ec13695..386bab7d2 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -108,7 +108,7 @@ -

A mempool (short for "memory pool") the queue of pending and unconfirmed transactions for a cryptocurrency network node. There is no one global mempool: every node on the network maintains its own mempool, so different nodes may hold different transactions in their mempools.

+

A mempool (short for "memory pool") is the queue of pending and unconfirmed transactions for a cryptocurrency network node. There is no one global mempool: every node on the network maintains its own mempool, so different nodes may hold different transactions in their mempools.

@@ -127,7 +127,7 @@ - Mining is the process by which unconfirmed transactions in a mempool are confirmed into a block on a blockchain. Miners select unconfirmed transactions from their mempools and arrange them into a block such that they solve a particular math problem.

The first miner on the network to find a suitable block earns all the transaction fees from the transactions in that block. As a result, miners tend to prioritize transactions with higher transaction fees.

+

Mining is the process by which unconfirmed transactions in a mempool are confirmed into a block on a blockchain. Miners select unconfirmed transactions from their mempools and arrange them into a block such that they solve a particular math problem.

The first miner on the network to find a suitable block earns all the transaction fees from the transactions in that block. As a result, miners tend to prioritize transactions with higher transaction fees.

@@ -135,7 +135,7 @@ -

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.

The default maximum size of a Bitcoin node's mempool is 300MB, so when there are 300MB of transactions in the mempool, we say it's \"full\".

+

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.

The default maximum size of a Bitcoin node's mempool is 300MB, so when there are 300MB of transactions in the mempool, we say it's "full".

@@ -183,7 +183,7 @@ - You can manually install mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments." + You can manually install mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments. From a911e2ed4eca23bd8ce2d3b9c29a50b7b9f6a7ad Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Mon, 13 Jun 2022 21:11:57 -0400 Subject: [PATCH 3/8] Make minor faq updates Add Start9 and capitalize Mempool. --- frontend/src/app/docs/api-docs/api-docs.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 386bab7d2..1f6fca48c 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -179,11 +179,11 @@ - We support one-click installation on a number of Raspberry Pi full-node distros including Umbrel, RaspiBlitz, MyNode, and RoninDojo. + We support one-click installation on a number of Raspberry Pi full-node distros including Umbrel, RaspiBlitz, MyNode, RoninDojo, and Start9's Embassy. - You can manually install mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments. + You can manually install Mempool on your own Linux server, but this requires advanced sysadmin skills since you will be manually configuring everything. We do not provide support for manual deployments. From 2e5757331758861287d3fed1810541ddeffab560 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 14 Jun 2022 09:42:56 +0200 Subject: [PATCH 4/8] Fix pool ranking layout on small mobile device --- .../app/components/pool-ranking/pool-ranking.component.ts | 8 +++++++- frontend/src/app/services/mining.service.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index a5bf79678..64420229c 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -200,6 +200,11 @@ export class PoolRankingComponent implements OnInit { } prepareChartOptions(miningStats) { + let pieSize = ['20%', '80%']; // Desktop + if (this.isMobile() && !this.widget) { + pieSize = ['15%', '60%']; + } + this.chartOptions = { animation: false, color: chartColors, @@ -215,7 +220,7 @@ export class PoolRankingComponent implements OnInit { minShowLabelAngle: 3.6, name: 'Mining pool', type: 'pie', - radius: ['20%', '80%'], + radius: pieSize, data: this.generatePoolsChartSerieData(miningStats), labelLine: { lineStyle: { @@ -224,6 +229,7 @@ export class PoolRankingComponent implements OnInit { }, label: { fontSize: 14, + formatter: (serie) => `${serie.name === 'Binance Pool' ? 'Binance\nPool' : serie.name}`, }, itemStyle: { borderRadius: 1, diff --git a/frontend/src/app/services/mining.service.ts b/frontend/src/app/services/mining.service.ts index 7806debd7..0f1b54235 100644 --- a/frontend/src/app/services/mining.service.ts +++ b/frontend/src/app/services/mining.service.ts @@ -57,7 +57,7 @@ export class MiningService { // I think it's fine to hardcode this since we don't have x1000 hashrate jump everyday // If we want to support the mining dashboard for testnet, we can hardcode it too - let selectedPower = 15; + let selectedPower = 18; if (this.stateService.network === 'testnet') { selectedPower = 12; } From 2f3889914d3b6ca18dc70fb8dadb1dd96980c2db Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 14 Jun 2022 09:58:32 +0200 Subject: [PATCH 5/8] Hide bottom axis label for mempool and incoming tx charts on widgets --- .../incoming-transactions-graph.component.ts | 2 +- .../src/app/components/mempool-graph/mempool-graph.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts index 328742946..33ae2d320 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts @@ -127,7 +127,7 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges { }, xAxis: [ { - name: formatterXAxisLabel(this.locale, this.windowPreference), + name: this.template === 'widget' ? '' : formatterXAxisLabel(this.locale, this.windowPreference), nameLocation: 'middle', nameTextStyle: { padding: [20, 0, 0, 0], diff --git a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts index dfb111fdb..04c7ddf69 100644 --- a/frontend/src/app/components/mempool-graph/mempool-graph.component.ts +++ b/frontend/src/app/components/mempool-graph/mempool-graph.component.ts @@ -319,7 +319,7 @@ export class MempoolGraphComponent implements OnInit, OnChanges { }, xAxis: [ { - name: formatterXAxisLabel(this.locale, this.windowPreference), + name: this.template === 'widget' ? '' : formatterXAxisLabel(this.locale, this.windowPreference), nameLocation: 'middle', nameTextStyle: { padding: [20, 0, 0, 0], From b22d7fcec60da73af0b015a86fc59aafdcae428c Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 14 Jun 2022 10:35:29 +0200 Subject: [PATCH 6/8] Make Latest blocks and Adjustments widget title clickable --- .../mining-dashboard.component.html | 14 ++++++++++---- .../mining-dashboard.component.scss | 7 +++++++ .../src/app/dashboard/dashboard.component.html | 12 +++++++----- .../src/app/dashboard/dashboard.component.scss | 7 +++++++ 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html index fe7c08ba2..b0ec46ac5 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html @@ -49,9 +49,12 @@ @@ -60,9 +63,12 @@ diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss index 3ee108d9d..303591974 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.scss @@ -97,3 +97,10 @@ .card-text { font-size: 22px; } + +.title-link, .title-link:hover, .title-link:focus, .title-link:active { + display: block; + margin-bottom: 10px; + text-decoration: none; + color: inherit; +} \ No newline at end of file diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 99ae4a301..4eb95c1ca 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -103,10 +103,14 @@ -
+
-
Latest blocks
+ +
Latest blocks
+   + +
@@ -136,11 +140,10 @@
Height
-
-
+
Latest transactions
@@ -160,7 +163,6 @@ -
 
diff --git a/frontend/src/app/dashboard/dashboard.component.scss b/frontend/src/app/dashboard/dashboard.component.scss index 81e7a671d..a7e21ba94 100644 --- a/frontend/src/app/dashboard/dashboard.component.scss +++ b/frontend/src/app/dashboard/dashboard.component.scss @@ -317,3 +317,10 @@ vertical-align: text-top; padding-left: 10px; } + +.title-link, .title-link:hover, .title-link:focus, .title-link:active { + display: block; + margin-bottom: 10px; + text-decoration: none; + color: inherit; +} \ No newline at end of file From a3f747021052ab6307f83a89fc3973c936c7393d Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Wed, 15 Jun 2022 13:11:59 -0400 Subject: [PATCH 7/8] Edit formatting of regtest docs --- backend/README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/backend/README.md b/backend/README.md index b65001182..823998fdc 100644 --- a/backend/README.md +++ b/backend/README.md @@ -160,57 +160,56 @@ nodemon src/index.ts --ignore cache/ --ignore pools.json `nodemon` should be in npm's global binary folder. If needed, you can determine where that is with `npm -g bin`. -### Regtest cheatsheets +### Useful Regtest Commands -* Useful link https://gist.github.com/System-Glitch/cb4e87bf1ae3fec9925725bb3ebe223a +Helpful link: https://gist.github.com/System-Glitch/cb4e87bf1ae3fec9925725bb3ebe223a -* Run bitcoind for regtest +Run bitcoind on regtest: ``` bitcoind -regtest -rpcport=8332 ``` -* If it's the first time, create a new wallet +Create a new wallet, if needed: ``` bitcoin-cli -regtest -rpcport=8332 createwallet test ``` -* If it's not the first time, load the wallet. This command may take a while if you have lot of utxos +Load wallet (this command may take a while if you have lot of UTXOs): ``` bitcoin-cli -regtest -rpcport=8332 loadwallet test ``` -* Get a new address +Get a new address: ``` address=$(./src/bitcoin-cli -regtest -rpcport=8332 getnewaddress) ``` -* Mine blocks to the previously generated new address, you need at least 101 blocks before being able to spend. This will take some time to execute (~1 min) +Mine blocks to the previously generated address. You need at least 101 blocks before you can spend. This will take some time to execute (~1 min): ``` bitcoin-cli -regtest -rpcport=8332 generatetoaddress 101 $address ``` -* Send 0.1 BTC at 5 sat/vB to another address +Send 0.1 BTC at 5 sat/vB to another address: ``` ./src/bitcoin-cli -named -regtest -rpcport=8332 sendtoaddress address=$(./src/bitcoin-cli -regtest -rpcport=8332 getnewaddress) amount=0.1 fee_rate=5 ``` -* See more example of `sendtoaddress` +See more example of `sendtoaddress`: ``` ./src/bitcoin-cli sendtoaddress # will print the help ``` -* Mini script to generate transactions with random TX fee-rate (between 1 to 100 sat/vB). It's slow so don't expect to use this to test mempool spam, except if you let it run for a long time, or maybe with multiple regtest node connected to each other. +Mini script to generate transactions with random TX fee-rate (between 1 to 100 sat/vB). It's slow so don't expect to use this to test mempool spam, except if you let it run for a long time, or maybe with multiple regtest nodes connected to each other. ``` #!/bin/bash address=$(./src/bitcoin-cli -regtest -rpcport=8332 getnewaddress) for i in {1..1000000} do - ./src/bitcoin-cli -regtest -rpcport=8332 -named sendtoaddress address=$address amount=0.01 fee_rate=$(jot -r 1 1 100) + ./src/bitcoin-cli -regtest -rpcport=8332 -named sendtoaddress address=$address amount=0.01 fee_rate=$(jot -r 1 1 100) done ``` -* Generate block at regular interval (every 10 sec in this example) +Generate block at regular interval (every 10 seconds in this example): ``` watch -n 10 "./src/bitcoin-cli -regtest -rpcport=8332 generatetoaddress 1 $address" ``` - From df92b90d8950e6f35969b4c24e7bf2e17cfb7dc4 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:51:11 -0400 Subject: [PATCH 8/8] Add k3tan video link to docker readme --- docker/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/README.md b/docker/README.md index 45bdff615..286201548 100644 --- a/docker/README.md +++ b/docker/README.md @@ -4,6 +4,8 @@ This directory contains the Dockerfiles used to build and release the official i If you are looking to use these Docker images to deploy your own instance of Mempool, note that they only containerize Mempool's frontend and backend. You will still need to deploy and configure Bitcoin Core and an Electrum Server separately, along with any other utilities specific to your use case (e.g., a reverse proxy, etc). Such configuration is mostly beyond the scope of the Mempool project, so please only proceed if you know what you're doing. +See a video guide of this installation method by k3tan [on BitcoinTV.com](https://bitcointv.com/w/8fpAx6rf5CQ16mMhospwjg). + Jump to a section in this doc: - [Configure with Bitcoin Core Only](#configure-with-bitcoin-core-only) - [Configure with Bitcoin Core + Electrum Server](#configure-with-bitcoin-core--electrum-server)