Compare commits

..

1 Commits

Author SHA1 Message Date
wiz
ff8495f7cf Add Maxmind GeoIP Lite download to Docker build 2023-03-19 17:33:51 +09:00
140 changed files with 2868 additions and 6095 deletions

View File

@@ -1,13 +1,13 @@
# The Mempool Open Source Project™ [![mempool](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ry4br7/master&style=flat-square)](https://dashboard.cypress.io/projects/ry4br7/runs) # The Mempool Open Source Project™ [![mempool](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ry4br7/master&style=flat-square)](https://dashboard.cypress.io/projects/ry4br7/runs)
https://user-images.githubusercontent.com/93150691/226236121-375ea64f-b4a1-4cc0-8fad-a6fb33226840.mp4 https://user-images.githubusercontent.com/232186/222445818-234aa6c9-c233-4c52-b3f0-e32b8232893b.mp4
<br>
Mempool is the fully-featured mempool visualizer, explorer, and API service running at [mempool.space](https://mempool.space/). Mempool is the fully-featured mempool visualizer, explorer, and API service running at [mempool.space](https://mempool.space/).
It is an open-source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market that is evolving Bitcoin into a multi-layer ecosystem. It is an open-source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market that is evolving Bitcoin into a multi-layer ecosystem.
![mempool](https://mempool.space/resources/screenshots/v2.4.0-dashboard.png)
# Installation Methods # Installation Methods
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. 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.
@@ -30,8 +30,6 @@ Mempool can be conveniently installed on the following full-node distros:
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. 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.
**We only provide support for advanced installation methods to <a href="https://mempool.space/enterprise">Enterprise sponsors</a>.**
- See the [`docker/`](./docker/) directory for instructions on deploying Mempool with Docker. - 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. - See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers.
- See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale. - See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.

View File

@@ -2,9 +2,7 @@
These instructions are mostly intended for developers. These instructions are mostly intended for developers.
If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. Mempool does not provide support for custom setups.
**We only provide support for this installation method to <a href="https://mempool.space/enterprise">Enterprise sponsors</a>.**
See other ways to set up Mempool on [the main README](/../../#installation-methods). See other ways to set up Mempool on [the main README](/../../#installation-methods).

View File

@@ -27,15 +27,13 @@
"AUDIT": false, "AUDIT": false,
"ADVANCED_GBT_AUDIT": false, "ADVANCED_GBT_AUDIT": false,
"ADVANCED_GBT_MEMPOOL": false, "ADVANCED_GBT_MEMPOOL": false,
"CPFP_INDEXING": false, "CPFP_INDEXING": false
"DISK_CACHE_BLOCK_INTERVAL": 6
}, },
"CORE_RPC": { "CORE_RPC": {
"HOST": "127.0.0.1", "HOST": "127.0.0.1",
"PORT": 8332, "PORT": 8332,
"USERNAME": "mempool", "USERNAME": "mempool",
"PASSWORD": "mempool", "PASSWORD": "mempool"
"TIMEOUT": 60000
}, },
"ELECTRUM": { "ELECTRUM": {
"HOST": "127.0.0.1", "HOST": "127.0.0.1",
@@ -43,15 +41,13 @@
"TLS_ENABLED": true "TLS_ENABLED": true
}, },
"ESPLORA": { "ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3000", "REST_API_URL": "http://127.0.0.1:3000"
"UNIX_SOCKET_PATH": "/tmp/esplora-bitcoin-mainnet"
}, },
"SECOND_CORE_RPC": { "SECOND_CORE_RPC": {
"HOST": "127.0.0.1", "HOST": "127.0.0.1",
"PORT": 8332, "PORT": 8332,
"USERNAME": "mempool", "USERNAME": "mempool",
"PASSWORD": "mempool", "PASSWORD": "mempool"
"TIMEOUT": 60000
}, },
"DATABASE": { "DATABASE": {
"ENABLED": true, "ENABLED": true,
@@ -95,8 +91,7 @@
"LND": { "LND": {
"TLS_CERT_PATH": "tls.cert", "TLS_CERT_PATH": "tls.cert",
"MACAROON_PATH": "readonly.macaroon", "MACAROON_PATH": "readonly.macaroon",
"REST_API_URL": "https://localhost:8080", "REST_API_URL": "https://localhost:8080"
"TIMEOUT": 10000
}, },
"CLIGHTNING": { "CLIGHTNING": {
"SOCKET": "lightning-rpc" "SOCKET": "lightning-rpc"

6611
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "mempool-backend", "name": "mempool-backend",
"version": "2.6.0-dev", "version": "2.5.0-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend", "description": "Bitcoin mempool visualizer and blockchain explorer backend",
"license": "GNU Affero General Public License v3.0", "license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space", "homepage": "https://mempool.space",
@@ -34,35 +34,35 @@
"prettier": "./node_modules/.bin/prettier --write \"src/**/*.{js,ts}\"" "prettier": "./node_modules/.bin/prettier --write \"src/**/*.{js,ts}\""
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.20.12",
"@mempool/electrum-client": "1.1.9", "@mempool/electrum-client": "^1.1.7",
"@types/node": "^18.15.3", "@types/node": "^16.18.11",
"axios": "~0.27.2", "axios": "~0.27.2",
"bitcoinjs-lib": "~6.1.0", "bitcoinjs-lib": "~6.1.0",
"crypto-js": "~4.1.1", "crypto-js": "~4.1.1",
"express": "~4.18.2", "express": "~4.18.2",
"maxmind": "~4.3.8", "maxmind": "~4.3.8",
"mysql2": "~3.2.0", "mysql2": "~2.3.3",
"node-worker-threads-pool": "~1.5.1", "node-worker-threads-pool": "~1.5.1",
"socks-proxy-agent": "~7.0.0", "socks-proxy-agent": "~7.0.0",
"typescript": "~4.7.4", "typescript": "~4.7.4",
"ws": "~8.13.0" "ws": "~8.11.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.20.7",
"@babel/code-frame": "^7.18.6", "@babel/code-frame": "^7.18.6",
"@types/compression": "^1.7.2", "@types/compression": "^1.7.2",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/express": "^4.17.15", "@types/express": "^4.17.15",
"@types/jest": "^29.5.0", "@types/jest": "^29.2.5",
"@types/ws": "~8.5.4", "@types/ws": "~8.5.4",
"@typescript-eslint/eslint-plugin": "^5.55.0", "@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.55.0", "@typescript-eslint/parser": "^5.48.1",
"eslint": "^8.36.0", "eslint": "^8.31.0",
"eslint-config-prettier": "^8.7.0", "eslint-config-prettier": "^8.5.0",
"jest": "^29.5.0", "jest": "^29.3.1",
"prettier": "^2.8.4", "prettier": "^2.8.2",
"ts-jest": "^29.0.5", "ts-jest": "^29.0.3",
"ts-node": "^10.9.1" "ts-node": "^10.9.1"
} }
} }

View File

@@ -28,15 +28,13 @@
"ADVANCED_GBT_AUDIT": "__MEMPOOL_ADVANCED_GBT_AUDIT__", "ADVANCED_GBT_AUDIT": "__MEMPOOL_ADVANCED_GBT_AUDIT__",
"ADVANCED_GBT_MEMPOOL": "__MEMPOOL_ADVANCED_GBT_MEMPOOL__", "ADVANCED_GBT_MEMPOOL": "__MEMPOOL_ADVANCED_GBT_MEMPOOL__",
"CPFP_INDEXING": "__MEMPOOL_CPFP_INDEXING__", "CPFP_INDEXING": "__MEMPOOL_CPFP_INDEXING__",
"MAX_BLOCKS_BULK_QUERY": "__MEMPOOL_MAX_BLOCKS_BULK_QUERY__", "MAX_BLOCKS_BULK_QUERY": "__MEMPOOL_MAX_BLOCKS_BULK_QUERY__"
"DISK_CACHE_BLOCK_INTERVAL": "__MEMPOOL_DISK_CACHE_BLOCK_INTERVAL__"
}, },
"CORE_RPC": { "CORE_RPC": {
"HOST": "__CORE_RPC_HOST__", "HOST": "__CORE_RPC_HOST__",
"PORT": 15, "PORT": 15,
"USERNAME": "__CORE_RPC_USERNAME__", "USERNAME": "__CORE_RPC_USERNAME__",
"PASSWORD": "__CORE_RPC_PASSWORD__", "PASSWORD": "__CORE_RPC_PASSWORD__"
"TIMEOUT": "__CORE_RPC_TIMEOUT__"
}, },
"ELECTRUM": { "ELECTRUM": {
"HOST": "__ELECTRUM_HOST__", "HOST": "__ELECTRUM_HOST__",
@@ -44,15 +42,13 @@
"TLS_ENABLED": true "TLS_ENABLED": true
}, },
"ESPLORA": { "ESPLORA": {
"REST_API_URL": "__ESPLORA_REST_API_URL__", "REST_API_URL": "__ESPLORA_REST_API_URL__"
"UNIX_SOCKET_PATH": "__ESPLORA_UNIX_SOCKET_PATH__"
}, },
"SECOND_CORE_RPC": { "SECOND_CORE_RPC": {
"HOST": "__SECOND_CORE_RPC_HOST__", "HOST": "__SECOND_CORE_RPC_HOST__",
"PORT": 17, "PORT": 17,
"USERNAME": "__SECOND_CORE_RPC_USERNAME__", "USERNAME": "__SECOND_CORE_RPC_USERNAME__",
"PASSWORD": "__SECOND_CORE_RPC_PASSWORD__", "PASSWORD": "__SECOND_CORE_RPC_PASSWORD__"
"TIMEOUT": "__SECOND_CORE_RPC_TIMEOUT__"
}, },
"DATABASE": { "DATABASE": {
"ENABLED": false, "ENABLED": false,
@@ -111,8 +107,7 @@
"LND": { "LND": {
"TLS_CERT_PATH": "", "TLS_CERT_PATH": "",
"MACAROON_PATH": "", "MACAROON_PATH": "",
"REST_API_URL": "https://localhost:8080", "REST_API_URL": "https://localhost:8080"
"TIMEOUT": 10000
}, },
"CLIGHTNING": { "CLIGHTNING": {
"SOCKET": "__CLIGHTNING_SOCKET__" "SOCKET": "__CLIGHTNING_SOCKET__"

View File

@@ -42,27 +42,24 @@ describe('Mempool Backend Config', () => {
ADVANCED_GBT_MEMPOOL: false, ADVANCED_GBT_MEMPOOL: false,
CPFP_INDEXING: false, CPFP_INDEXING: false,
MAX_BLOCKS_BULK_QUERY: 0, MAX_BLOCKS_BULK_QUERY: 0,
DISK_CACHE_BLOCK_INTERVAL: 6,
}); });
expect(config.ELECTRUM).toStrictEqual({ HOST: '127.0.0.1', PORT: 3306, TLS_ENABLED: true }); expect(config.ELECTRUM).toStrictEqual({ HOST: '127.0.0.1', PORT: 3306, TLS_ENABLED: true });
expect(config.ESPLORA).toStrictEqual({ REST_API_URL: 'http://127.0.0.1:3000', UNIX_SOCKET_PATH: null }); expect(config.ESPLORA).toStrictEqual({ REST_API_URL: 'http://127.0.0.1:3000' });
expect(config.CORE_RPC).toStrictEqual({ expect(config.CORE_RPC).toStrictEqual({
HOST: '127.0.0.1', HOST: '127.0.0.1',
PORT: 8332, PORT: 8332,
USERNAME: 'mempool', USERNAME: 'mempool',
PASSWORD: 'mempool', PASSWORD: 'mempool'
TIMEOUT: 60000
}); });
expect(config.SECOND_CORE_RPC).toStrictEqual({ expect(config.SECOND_CORE_RPC).toStrictEqual({
HOST: '127.0.0.1', HOST: '127.0.0.1',
PORT: 8332, PORT: 8332,
USERNAME: 'mempool', USERNAME: 'mempool',
PASSWORD: 'mempool', PASSWORD: 'mempool'
TIMEOUT: 60000
}); });
expect(config.DATABASE).toStrictEqual({ expect(config.DATABASE).toStrictEqual({
@@ -111,10 +108,10 @@ describe('Mempool Backend Config', () => {
}); });
expect(config.MAXMIND).toStrictEqual({ expect(config.MAXMIND).toStrictEqual({
ENABLED: false, ENABLED: true,
GEOLITE2_CITY: '/usr/local/share/GeoIP/GeoLite2-City.mmdb', GEOLITE2_CITY: './backend/GeoIP/GeoLite2-City.mmdb',
GEOLITE2_ASN: '/usr/local/share/GeoIP/GeoLite2-ASN.mmdb', GEOLITE2_ASN: './backend/GeoIP/GeoLite2-ASN.mmdb',
GEOIP2_ISP: '/usr/local/share/GeoIP/GeoIP2-ISP.mmdb' GEOIP2_ISP: ''
}); });
}); });
}); });

View File

@@ -1,5 +1,4 @@
import config from '../config'; import config from '../config';
import logger from '../logger';
import { TransactionExtended, MempoolBlockWithTransactions } from '../mempool.interfaces'; import { TransactionExtended, MempoolBlockWithTransactions } from '../mempool.interfaces';
const PROPAGATION_MARGIN = 180; // in seconds, time since a transaction is first seen after which it is assumed to have propagated to all miners const PROPAGATION_MARGIN = 180; // in seconds, time since a transaction is first seen after which it is assumed to have propagated to all miners
@@ -40,19 +39,17 @@ class Audit {
} else { } else {
isCensored[txid] = true; isCensored[txid] = true;
} }
displacedWeight += mempool[txid]?.weight || 0; displacedWeight += mempool[txid].weight;
} else { } else {
matchedWeight += mempool[txid]?.weight || 0; matchedWeight += mempool[txid].weight;
} }
projectedWeight += mempool[txid]?.weight || 0; projectedWeight += mempool[txid].weight;
inTemplate[txid] = true; inTemplate[txid] = true;
} }
if (transactions[0]) { displacedWeight += (4000 - transactions[0].weight);
displacedWeight += (4000 - transactions[0].weight); projectedWeight += transactions[0].weight;
projectedWeight += transactions[0].weight; matchedWeight += transactions[0].weight;
matchedWeight += transactions[0].weight;
}
// we can expect an honest miner to include 'displaced' transactions in place of recent arrivals and censored txs // we can expect an honest miner to include 'displaced' transactions in place of recent arrivals and censored txs
// these displaced transactions should occupy the first N weight units of the next projected block // these displaced transactions should occupy the first N weight units of the next projected block
@@ -62,24 +59,19 @@ class Audit {
let failures = 0; let failures = 0;
while (projectedBlocks[1] && index < projectedBlocks[1].transactionIds.length && failures < 500) { while (projectedBlocks[1] && index < projectedBlocks[1].transactionIds.length && failures < 500) {
const txid = projectedBlocks[1].transactionIds[index]; const txid = projectedBlocks[1].transactionIds[index];
const tx = mempool[txid]; const fits = (mempool[txid].weight - displacedWeightRemaining) < 4000;
if (tx) { const feeMatches = mempool[txid].effectiveFeePerVsize >= lastFeeRate;
const fits = (tx.weight - displacedWeightRemaining) < 4000; if (fits || feeMatches) {
const feeMatches = tx.effectiveFeePerVsize >= lastFeeRate; isDisplaced[txid] = true;
if (fits || feeMatches) { if (fits) {
isDisplaced[txid] = true; lastFeeRate = Math.min(lastFeeRate, mempool[txid].effectiveFeePerVsize);
if (fits) {
lastFeeRate = Math.min(lastFeeRate, tx.effectiveFeePerVsize);
}
if (tx.firstSeen == null || (now - (tx?.firstSeen || 0)) > PROPAGATION_MARGIN) {
displacedWeightRemaining -= tx.weight;
}
failures = 0;
} else {
failures++;
} }
if (mempool[txid].firstSeen == null || (now - (mempool[txid]?.firstSeen || 0)) > PROPAGATION_MARGIN) {
displacedWeightRemaining -= mempool[txid].weight;
}
failures = 0;
} else { } else {
logger.warn('projected transaction missing from mempool cache'); failures++;
} }
index++; index++;
} }
@@ -116,25 +108,20 @@ class Audit {
index = projectedBlocks[0].transactionIds.length - 1; index = projectedBlocks[0].transactionIds.length - 1;
while (index >= 0) { while (index >= 0) {
const txid = projectedBlocks[0].transactionIds[index]; const txid = projectedBlocks[0].transactionIds[index];
const tx = mempool[txid]; if (overflowWeightRemaining > 0) {
if (tx) { if (isCensored[txid]) {
if (overflowWeightRemaining > 0) { delete isCensored[txid];
if (isCensored[txid]) { }
delete isCensored[txid]; if (mempool[txid].effectiveFeePerVsize > maxOverflowRate) {
} maxOverflowRate = mempool[txid].effectiveFeePerVsize;
if (tx.effectiveFeePerVsize > maxOverflowRate) { rateThreshold = (Math.ceil(maxOverflowRate * 100) / 100) + 0.005;
maxOverflowRate = tx.effectiveFeePerVsize; }
rateThreshold = (Math.ceil(maxOverflowRate * 100) / 100) + 0.005; } else if (mempool[txid].effectiveFeePerVsize <= rateThreshold) { // tolerance of 0.01 sat/vb + rounding
} if (isCensored[txid]) {
} else if (tx.effectiveFeePerVsize <= rateThreshold) { // tolerance of 0.01 sat/vb + rounding delete isCensored[txid];
if (isCensored[txid]) {
delete isCensored[txid];
}
} }
overflowWeightRemaining -= (mempool[txid]?.weight || 0);
} else {
logger.warn('projected transaction missing from mempool cache');
} }
overflowWeightRemaining -= (mempool[txid]?.weight || 0);
index--; index--;
} }

View File

@@ -7,7 +7,7 @@ const nodeRpcCredentials: BitcoinRpcCredentials = {
port: config.CORE_RPC.PORT, port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME, user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD, pass: config.CORE_RPC.PASSWORD,
timeout: config.CORE_RPC.TIMEOUT, timeout: 60000,
}; };
export default new bitcoin.Client(nodeRpcCredentials); export default new bitcoin.Client(nodeRpcCredentials);

View File

@@ -7,7 +7,7 @@ const nodeRpcCredentials: BitcoinRpcCredentials = {
port: config.SECOND_CORE_RPC.PORT, port: config.SECOND_CORE_RPC.PORT,
user: config.SECOND_CORE_RPC.USERNAME, user: config.SECOND_CORE_RPC.USERNAME,
pass: config.SECOND_CORE_RPC.PASSWORD, pass: config.SECOND_CORE_RPC.PASSWORD,
timeout: config.SECOND_CORE_RPC.TIMEOUT, timeout: 60000,
}; };
export default new bitcoin.Client(nodeRpcCredentials); export default new bitcoin.Client(nodeRpcCredentials);

View File

@@ -16,7 +16,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
super(bitcoinClient); super(bitcoinClient);
const electrumConfig = { client: 'mempool-v2', version: '1.4' }; const electrumConfig = { client: 'mempool-v2', version: '1.4' };
const electrumPersistencePolicy = { retryPeriod: 1000, maxRetry: Number.MAX_SAFE_INTEGER, callback: null }; const electrumPersistencePolicy = { retryPeriod: 10000, maxRetry: 1000, callback: null };
const electrumCallbacks = { const electrumCallbacks = {
onConnect: (client, versionInfo) => { logger.info(`Connected to Electrum Server at ${config.ELECTRUM.HOST}:${config.ELECTRUM.PORT} (${JSON.stringify(versionInfo)})`); }, onConnect: (client, versionInfo) => { logger.info(`Connected to Electrum Server at ${config.ELECTRUM.HOST}:${config.ELECTRUM.PORT} (${JSON.stringify(versionInfo)})`); },

View File

@@ -5,14 +5,11 @@ import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { IEsploraApi } from './esplora-api.interface'; import { IEsploraApi } from './esplora-api.interface';
const axiosConnection = axios.create({ const axiosConnection = axios.create({
httpAgent: new http.Agent({ keepAlive: true, }) httpAgent: new http.Agent({ keepAlive: true })
}); });
class ElectrsApi implements AbstractBitcoinApi { class ElectrsApi implements AbstractBitcoinApi {
axiosConfig: AxiosRequestConfig = config.ESPLORA.UNIX_SOCKET_PATH ? { axiosConfig: AxiosRequestConfig = {
socketPath: config.ESPLORA.UNIX_SOCKET_PATH,
timeout: 10000,
} : {
timeout: 10000, timeout: 10000,
}; };

View File

@@ -2,7 +2,7 @@ import config from '../config';
import bitcoinApi, { bitcoinCoreApi } from './bitcoin/bitcoin-api-factory'; import bitcoinApi, { bitcoinCoreApi } from './bitcoin/bitcoin-api-factory';
import logger from '../logger'; import logger from '../logger';
import memPool from './mempool'; import memPool from './mempool';
import { BlockExtended, BlockExtension, BlockSummary, PoolTag, TransactionExtended, TransactionStripped, TransactionMinerInfo, CpfpSummary } from '../mempool.interfaces'; import { BlockExtended, BlockExtension, BlockSummary, PoolTag, TransactionExtended, TransactionStripped, TransactionMinerInfo } from '../mempool.interfaces';
import { Common } from './common'; import { Common } from './common';
import diskCache from './disk-cache'; import diskCache from './disk-cache';
import transactionUtils from './transaction-utils'; import transactionUtils from './transaction-utils';
@@ -200,15 +200,8 @@ class Blocks {
extras.segwitTotalWeight = 0; extras.segwitTotalWeight = 0;
} else { } else {
const stats: IBitcoinApi.BlockStats = await bitcoinClient.getBlockStats(block.id); const stats: IBitcoinApi.BlockStats = await bitcoinClient.getBlockStats(block.id);
let feeStats = { extras.medianFee = stats.feerate_percentiles[2]; // 50th percentiles
medianFee: stats.feerate_percentiles[2], // 50th percentiles extras.feeRange = [stats.minfeerate, stats.feerate_percentiles, stats.maxfeerate].flat();
feeRange: [stats.minfeerate, stats.feerate_percentiles, stats.maxfeerate].flat(),
};
if (transactions?.length > 1) {
feeStats = Common.calcEffectiveFeeStatistics(transactions);
}
extras.medianFee = feeStats.medianFee;
extras.feeRange = feeStats.feeRange;
extras.totalFees = stats.totalfee; extras.totalFees = stats.totalfee;
extras.avgFee = stats.avgfee; extras.avgFee = stats.avgfee;
extras.avgFeeRate = stats.avgfeerate; extras.avgFeeRate = stats.avgfeerate;
@@ -410,13 +403,12 @@ class Blocks {
try { try {
// Get all indexed block hash // Get all indexed block hash
const unindexedBlockHeights = await blocksRepository.$getCPFPUnindexedBlocks(); const unindexedBlockHeights = await blocksRepository.$getCPFPUnindexedBlocks();
logger.info(`Indexing cpfp data for ${unindexedBlockHeights.length} blocks`);
if (!unindexedBlockHeights?.length) { if (!unindexedBlockHeights?.length) {
return; return;
} }
logger.info(`Indexing cpfp data for ${unindexedBlockHeights.length} blocks`);
// Logging // Logging
let count = 0; let count = 0;
let countThisRun = 0; let countThisRun = 0;
@@ -566,7 +558,7 @@ class Blocks {
} }
while (this.currentBlockHeight < blockHeightTip) { while (this.currentBlockHeight < blockHeightTip) {
if (this.currentBlockHeight === 0) { if (this.currentBlockHeight < blockHeightTip - config.MEMPOOL.INITIAL_BLOCKS_AMOUNT) {
this.currentBlockHeight = blockHeightTip; this.currentBlockHeight = blockHeightTip;
} else { } else {
this.currentBlockHeight++; this.currentBlockHeight++;
@@ -579,8 +571,7 @@ class Blocks {
const block = BitcoinApi.convertBlock(verboseBlock); const block = BitcoinApi.convertBlock(verboseBlock);
const txIds: string[] = await bitcoinApi.$getTxIdsForBlock(blockHash); const txIds: string[] = await bitcoinApi.$getTxIdsForBlock(blockHash);
const transactions = await this.$getTransactionsExtended(blockHash, block.height, false); const transactions = await this.$getTransactionsExtended(blockHash, block.height, false);
const cpfpSummary: CpfpSummary = Common.calculateCpfp(block.height, transactions); const blockExtended: BlockExtended = await this.$getBlockExtended(block, transactions);
const blockExtended: BlockExtended = await this.$getBlockExtended(block, cpfpSummary.transactions);
const blockSummary: BlockSummary = this.summarizeBlock(verboseBlock); const blockSummary: BlockSummary = this.summarizeBlock(verboseBlock);
// start async callbacks // start async callbacks
@@ -590,10 +581,11 @@ class Blocks {
if (!fastForwarded) { if (!fastForwarded) {
const lastBlock = await blocksRepository.$getBlockByHeight(blockExtended.height - 1); const lastBlock = await blocksRepository.$getBlockByHeight(blockExtended.height - 1);
if (lastBlock !== null && blockExtended.previousblockhash !== lastBlock.id) { if (lastBlock !== null && blockExtended.previousblockhash !== lastBlock.id) {
logger.warn(`Chain divergence detected at block ${lastBlock.height}, re-indexing most recent data`, logger.tags.mining); logger.warn(`Chain divergence detected at block ${lastBlock.height}, re-indexing most recent data`);
// We assume there won't be a reorg with more than 10 block depth // We assume there won't be a reorg with more than 10 block depth
await BlocksRepository.$deleteBlocksFrom(lastBlock.height - 10); await BlocksRepository.$deleteBlocksFrom(lastBlock.height - 10);
await HashratesRepository.$deleteLastEntries(); await HashratesRepository.$deleteLastEntries();
await BlocksSummariesRepository.$deleteBlocksFrom(lastBlock.height - 10);
await cpfpRepository.$deleteClustersFrom(lastBlock.height - 10); await cpfpRepository.$deleteClustersFrom(lastBlock.height - 10);
for (let i = 10; i >= 0; --i) { for (let i = 10; i >= 0; --i) {
const newBlock = await this.$indexBlock(lastBlock.height - i); const newBlock = await this.$indexBlock(lastBlock.height - i);
@@ -604,7 +596,7 @@ class Blocks {
} }
await mining.$indexDifficultyAdjustments(); await mining.$indexDifficultyAdjustments();
await DifficultyAdjustmentsRepository.$deleteLastAdjustment(); await DifficultyAdjustmentsRepository.$deleteLastAdjustment();
logger.info(`Re-indexed 10 blocks and summaries. Also re-indexed the last difficulty adjustments. Will re-index latest hashrates in a few seconds.`, logger.tags.mining); logger.info(`Re-indexed 10 blocks and summaries. Also re-indexed the last difficulty adjustments. Will re-index latest hashrates in a few seconds.`);
indexer.reindex(); indexer.reindex();
} }
await blocksRepository.$saveBlockInDatabase(blockExtended); await blocksRepository.$saveBlockInDatabase(blockExtended);
@@ -616,7 +608,7 @@ class Blocks {
priceId: lastestPriceId, priceId: lastestPriceId,
}]); }]);
} else { } else {
logger.debug(`Cannot save block price for ${blockExtended.height} because the price updater hasnt completed yet. Trying again in 10 seconds.`, logger.tags.mining); logger.info(`Cannot save block price for ${blockExtended.height} because the price updater hasnt completed yet. Trying again in 10 seconds.`, logger.tags.mining);
setTimeout(() => { setTimeout(() => {
indexer.runSingleTask('blocksPrices'); indexer.runSingleTask('blocksPrices');
}, 10000); }, 10000);
@@ -627,7 +619,7 @@ class Blocks {
await this.$getStrippedBlockTransactions(blockExtended.id, true); await this.$getStrippedBlockTransactions(blockExtended.id, true);
} }
if (config.MEMPOOL.CPFP_INDEXING) { if (config.MEMPOOL.CPFP_INDEXING) {
this.$saveCpfp(blockExtended.id, this.currentBlockHeight, cpfpSummary); this.$indexCPFP(blockExtended.id, this.currentBlockHeight);
} }
} }
} }
@@ -659,7 +651,7 @@ class Blocks {
if (this.newBlockCallbacks.length) { if (this.newBlockCallbacks.length) {
this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions)); this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions));
} }
if (!memPool.hasPriority() && (block.height % config.MEMPOOL.DISK_CACHE_BLOCK_INTERVAL === 0)) { if (!memPool.hasPriority() && (block.height % 6 === 0)) {
diskCache.$saveCacheToDisk(); diskCache.$saveCacheToDisk();
} }
@@ -736,7 +728,7 @@ class Blocks {
// Index the response if needed // Index the response if needed
if (Common.blocksSummariesIndexingEnabled() === true) { if (Common.blocksSummariesIndexingEnabled() === true) {
await BlocksSummariesRepository.$saveTransactions(block.height, block.hash, summary.transactions); await BlocksSummariesRepository.$saveSummary({height: block.height, mined: summary});
} }
return summary.transactions; return summary.transactions;
@@ -852,7 +844,7 @@ class Blocks {
if (cleanBlock.fee_amt_percentiles === null) { if (cleanBlock.fee_amt_percentiles === null) {
const block = await bitcoinClient.getBlock(cleanBlock.hash, 2); const block = await bitcoinClient.getBlock(cleanBlock.hash, 2);
const summary = this.summarizeBlock(block); const summary = this.summarizeBlock(block);
await BlocksSummariesRepository.$saveTransactions(cleanBlock.height, cleanBlock.hash, summary.transactions); await BlocksSummariesRepository.$saveSummary({ height: block.height, mined: summary });
cleanBlock.fee_amt_percentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(cleanBlock.hash); cleanBlock.fee_amt_percentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(cleanBlock.hash);
} }
if (cleanBlock.fee_amt_percentiles !== null) { if (cleanBlock.fee_amt_percentiles !== null) {
@@ -921,20 +913,42 @@ class Blocks {
public async $indexCPFP(hash: string, height: number): Promise<void> { public async $indexCPFP(hash: string, height: number): Promise<void> {
const block = await bitcoinClient.getBlock(hash, 2); const block = await bitcoinClient.getBlock(hash, 2);
const transactions = block.tx.map(tx => { const transactions = block.tx.map(tx => {
tx.vsize = tx.weight / 4;
tx.fee *= 100_000_000; tx.fee *= 100_000_000;
return tx; return tx;
}); });
const summary = Common.calculateCpfp(height, transactions); const clusters: any[] = [];
await this.$saveCpfp(hash, height, summary); let cluster: TransactionStripped[] = [];
let ancestors: { [txid: string]: boolean } = {};
const effectiveFeeStats = Common.calcEffectiveFeeStatistics(summary.transactions); for (let i = transactions.length - 1; i >= 0; i--) {
await blocksRepository.$saveEffectiveFeeStats(hash, effectiveFeeStats); const tx = transactions[i];
} if (!ancestors[tx.txid]) {
let totalFee = 0;
public async $saveCpfp(hash: string, height: number, cpfpSummary: CpfpSummary): Promise<void> { let totalVSize = 0;
const result = await cpfpRepository.$batchSaveClusters(cpfpSummary.clusters); cluster.forEach(tx => {
totalFee += tx?.fee || 0;
totalVSize += tx.vsize;
});
const effectiveFeePerVsize = totalFee / totalVSize;
if (cluster.length > 1) {
clusters.push({
root: cluster[0].txid,
height,
txs: cluster.map(tx => { return { txid: tx.txid, weight: tx.vsize * 4, fee: tx.fee || 0 }; }),
effectiveFeePerVsize,
});
}
cluster = [];
ancestors = {};
}
cluster.push(tx);
tx.vin.forEach(vin => {
ancestors[vin.txid] = true;
});
}
const result = await cpfpRepository.$batchSaveClusters(clusters);
if (!result) { if (!result) {
await cpfpRepository.$insertProgressMarker(height); await cpfpRepository.$insertProgressMarker(height);
} }

View File

@@ -1,4 +1,4 @@
import { Ancestor, CpfpInfo, CpfpSummary, EffectiveFeeStats, MempoolBlockWithTransactions, TransactionExtended, TransactionStripped } from '../mempool.interfaces'; import { CpfpInfo, MempoolBlockWithTransactions, TransactionExtended, TransactionStripped } from '../mempool.interfaces';
import config from '../config'; import config from '../config';
import { NodeSocket } from '../repositories/NodesSocketsRepository'; import { NodeSocket } from '../repositories/NodesSocketsRepository';
import { isIP } from 'net'; import { isIP } from 'net';
@@ -345,99 +345,4 @@ export class Common {
}; };
} }
} }
static calculateCpfp(height: number, transactions: TransactionExtended[]): CpfpSummary {
const clusters: { root: string, height: number, txs: Ancestor[], effectiveFeePerVsize: number }[] = [];
let cluster: TransactionExtended[] = [];
let ancestors: { [txid: string]: boolean } = {};
const txMap = {};
for (let i = transactions.length - 1; i >= 0; i--) {
const tx = transactions[i];
txMap[tx.txid] = tx;
if (!ancestors[tx.txid]) {
let totalFee = 0;
let totalVSize = 0;
cluster.forEach(tx => {
totalFee += tx?.fee || 0;
totalVSize += (tx.weight / 4);
});
const effectiveFeePerVsize = totalFee / totalVSize;
if (cluster.length > 1) {
clusters.push({
root: cluster[0].txid,
height,
txs: cluster.map(tx => { return { txid: tx.txid, weight: tx.weight, fee: tx.fee || 0 }; }),
effectiveFeePerVsize,
});
}
cluster.forEach(tx => {
txMap[tx.txid].effectiveFeePerVsize = effectiveFeePerVsize;
});
cluster = [];
ancestors = {};
}
cluster.push(tx);
tx.vin.forEach(vin => {
ancestors[vin.txid] = true;
});
}
return {
transactions,
clusters,
};
}
static calcEffectiveFeeStatistics(transactions: { weight: number, fee: number, effectiveFeePerVsize?: number, txid: string }[]): EffectiveFeeStats {
const sortedTxs = transactions.map(tx => { return { txid: tx.txid, weight: tx.weight, rate: tx.effectiveFeePerVsize || ((tx.fee || 0) / (tx.weight / 4)) }; }).sort((a, b) => a.rate - b.rate);
let weightCount = 0;
let medianFee = 0;
let medianWeight = 0;
// calculate the "medianFee" as the average fee rate of the middle 10000 weight units of transactions
const leftBound = 1995000;
const rightBound = 2005000;
for (let i = 0; i < sortedTxs.length && weightCount < rightBound; i++) {
const left = weightCount;
const right = weightCount + sortedTxs[i].weight;
if (right > leftBound) {
const weight = Math.min(right, rightBound) - Math.max(left, leftBound);
medianFee += (sortedTxs[i].rate * (weight / 4) );
medianWeight += weight;
}
weightCount += sortedTxs[i].weight;
}
const medianFeeRate = medianWeight ? (medianFee / (medianWeight / 4)) : 0;
// minimum effective fee heuristic:
// lowest of
// a) the 1st percentile of effective fee rates
// b) the minimum effective fee rate in the last 2% of transactions (in block order)
const minFee = Math.min(
Common.getNthPercentile(1, sortedTxs).rate,
transactions.slice(-transactions.length / 50).reduce((min, tx) => { return Math.min(min, tx.effectiveFeePerVsize || ((tx.fee || 0) / (tx.weight / 4))); }, Infinity)
);
// maximum effective fee heuristic:
// highest of
// a) the 99th percentile of effective fee rates
// b) the maximum effective fee rate in the first 2% of transactions (in block order)
const maxFee = Math.max(
Common.getNthPercentile(99, sortedTxs).rate,
transactions.slice(0, transactions.length / 50).reduce((max, tx) => { return Math.max(max, tx.effectiveFeePerVsize || ((tx.fee || 0) / (tx.weight / 4))); }, 0)
);
return {
medianFee: medianFeeRate,
feeRange: [
minFee,
[10,25,50,75,90].map(n => Common.getNthPercentile(n, sortedTxs).rate),
maxFee,
].flat(),
};
}
static getNthPercentile(n: number, sortedDistribution: any[]): any {
return sortedDistribution[Math.floor((sortedDistribution.length - 1) * (n / 100))];
}
} }

View File

@@ -497,7 +497,6 @@ class DatabaseMigration {
this.uniqueLog(logger.notice, this.blocksTruncatedMessage); this.uniqueLog(logger.notice, this.blocksTruncatedMessage);
await this.$executeQuery('DELETE FROM `pools`'); await this.$executeQuery('DELETE FROM `pools`');
await this.$executeQuery('ALTER TABLE pools AUTO_INCREMENT = 1'); await this.$executeQuery('ALTER TABLE pools AUTO_INCREMENT = 1');
await this.$executeQuery(`UPDATE state SET string = NULL WHERE name = 'pools_json_sha'`);
this.uniqueLog(logger.notice, '`pools` table has been truncated`'); this.uniqueLog(logger.notice, '`pools` table has been truncated`');
await this.updateToSchemaVersion(56); await this.updateToSchemaVersion(56);
} }

View File

@@ -24,11 +24,12 @@ export function calcDifficultyAdjustment(
network: string, network: string,
latestBlockTimestamp: number, latestBlockTimestamp: number,
): DifficultyAdjustment { ): DifficultyAdjustment {
const ESTIMATE_LAG_BLOCKS = 146; // For first 7.2% of epoch, don't estimate.
const EPOCH_BLOCK_LENGTH = 2016; // Bitcoin mainnet const EPOCH_BLOCK_LENGTH = 2016; // Bitcoin mainnet
const BLOCK_SECONDS_TARGET = 600; // Bitcoin mainnet const BLOCK_SECONDS_TARGET = 600; // Bitcoin mainnet
const TESTNET_MAX_BLOCK_SECONDS = 1200; // Bitcoin testnet const TESTNET_MAX_BLOCK_SECONDS = 1200; // Bitcoin testnet
const diffSeconds = Math.max(0, nowSeconds - DATime); const diffSeconds = nowSeconds - DATime;
const blocksInEpoch = (blockHeight >= 0) ? blockHeight % EPOCH_BLOCK_LENGTH : 0; const blocksInEpoch = (blockHeight >= 0) ? blockHeight % EPOCH_BLOCK_LENGTH : 0;
const progressPercent = (blockHeight >= 0) ? blocksInEpoch / EPOCH_BLOCK_LENGTH * 100 : 100; const progressPercent = (blockHeight >= 0) ? blocksInEpoch / EPOCH_BLOCK_LENGTH * 100 : 100;
const remainingBlocks = EPOCH_BLOCK_LENGTH - blocksInEpoch; const remainingBlocks = EPOCH_BLOCK_LENGTH - blocksInEpoch;
@@ -36,16 +37,18 @@ export function calcDifficultyAdjustment(
const expectedBlocks = diffSeconds / BLOCK_SECONDS_TARGET; const expectedBlocks = diffSeconds / BLOCK_SECONDS_TARGET;
let difficultyChange = 0; let difficultyChange = 0;
let timeAvgSecs = blocksInEpoch ? diffSeconds / blocksInEpoch : BLOCK_SECONDS_TARGET; let timeAvgSecs = diffSeconds / blocksInEpoch;
// Only calculate the estimate once we have 7.2% of blocks in current epoch
difficultyChange = (BLOCK_SECONDS_TARGET / timeAvgSecs - 1) * 100; if (blocksInEpoch >= ESTIMATE_LAG_BLOCKS) {
// Max increase is x4 (+300%) difficultyChange = (BLOCK_SECONDS_TARGET / timeAvgSecs - 1) * 100;
if (difficultyChange > 300) { // Max increase is x4 (+300%)
difficultyChange = 300; if (difficultyChange > 300) {
} difficultyChange = 300;
// Max decrease is /4 (-75%) }
if (difficultyChange < -75) { // Max decrease is /4 (-75%)
difficultyChange = -75; if (difficultyChange < -75) {
difficultyChange = -75;
}
} }
// Testnet difficulty is set to 1 after 20 minutes of no blocks, // Testnet difficulty is set to 1 after 20 minutes of no blocks,

View File

@@ -19,16 +19,20 @@ class DiskCache {
private isWritingCache = false; private isWritingCache = false;
constructor() { constructor() {
if (!cluster.isPrimary) { if (!cluster.isMaster) {
return; return;
} }
process.on('SIGINT', (e) => { process.on('SIGINT', (e) => {
this.$saveCacheToDisk(true); this.saveCacheToDiskSync();
process.exit(0); process.exit(2);
});
process.on('SIGTERM', (e) => {
this.saveCacheToDiskSync();
process.exit(2);
}); });
} }
async $saveCacheToDisk(sync: boolean = false): Promise<void> { async $saveCacheToDisk(): Promise<void> {
if (!cluster.isPrimary) { if (!cluster.isPrimary) {
return; return;
} }
@@ -37,61 +41,81 @@ class DiskCache {
return; return;
} }
try { try {
logger.debug(`Writing mempool and blocks data to disk cache (${ sync ? 'sync' : 'async' })...`); logger.debug('Writing mempool and blocks data to disk cache (async)...');
this.isWritingCache = true; this.isWritingCache = true;
const mempool = memPool.getMempool(); const mempool = memPool.getMempool();
const mempoolArray: TransactionExtended[] = []; const mempoolArray: TransactionExtended[] = [];
for (const tx in mempool) { for (const tx in mempool) {
if (mempool[tx] && !mempool[tx].deleteAfter) { mempoolArray.push(mempool[tx]);
mempoolArray.push(mempool[tx]);
}
} }
Common.shuffleArray(mempoolArray); Common.shuffleArray(mempoolArray);
const chunkSize = Math.floor(mempoolArray.length / DiskCache.CHUNK_FILES); const chunkSize = Math.floor(mempoolArray.length / DiskCache.CHUNK_FILES);
if (sync) { await fsPromises.writeFile(DiskCache.FILE_NAME, JSON.stringify({
fs.writeFileSync(DiskCache.TMP_FILE_NAME, JSON.stringify({ network: config.MEMPOOL.NETWORK,
network: config.MEMPOOL.NETWORK, cacheSchemaVersion: this.cacheSchemaVersion,
cacheSchemaVersion: this.cacheSchemaVersion, blocks: blocks.getBlocks(),
blocks: blocks.getBlocks(), blockSummaries: blocks.getBlockSummaries(),
blockSummaries: blocks.getBlockSummaries(), mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize),
}), { flag: 'w' });
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) {
await fsPromises.writeFile(DiskCache.FILE_NAMES.replace('{number}', i.toString()), JSON.stringify({
mempool: {}, mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize), mempoolArray: mempoolArray.splice(0, chunkSize),
}), { flag: 'w' }); }), { flag: 'w' });
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { }
fs.writeFileSync(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), JSON.stringify({ logger.debug('Mempool and blocks data saved to disk cache');
mempool: {}, this.isWritingCache = false;
mempoolArray: mempoolArray.splice(0, chunkSize), } catch (e) {
}), { flag: 'w' }); logger.warn('Error writing to cache file: ' + (e instanceof Error ? e.message : e));
} this.isWritingCache = false;
}
}
fs.renameSync(DiskCache.TMP_FILE_NAME, DiskCache.FILE_NAME); saveCacheToDiskSync(): void {
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { if (!cluster.isPrimary) {
fs.renameSync(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), DiskCache.FILE_NAMES.replace('{number}', i.toString())); return;
} }
} else { if (this.isWritingCache) {
await fsPromises.writeFile(DiskCache.TMP_FILE_NAME, JSON.stringify({ logger.debug('Saving cache already in progress. Skipping.');
network: config.MEMPOOL.NETWORK, return;
cacheSchemaVersion: this.cacheSchemaVersion, }
blocks: blocks.getBlocks(), try {
blockSummaries: blocks.getBlockSummaries(), logger.debug('Writing mempool and blocks data to disk cache (sync)...');
this.isWritingCache = true;
const mempool = memPool.getMempool();
const mempoolArray: TransactionExtended[] = [];
for (const tx in mempool) {
mempoolArray.push(mempool[tx]);
}
Common.shuffleArray(mempoolArray);
const chunkSize = Math.floor(mempoolArray.length / DiskCache.CHUNK_FILES);
fs.writeFileSync(DiskCache.TMP_FILE_NAME, JSON.stringify({
network: config.MEMPOOL.NETWORK,
cacheSchemaVersion: this.cacheSchemaVersion,
blocks: blocks.getBlocks(),
blockSummaries: blocks.getBlockSummaries(),
mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize),
}), { flag: 'w' });
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) {
fs.writeFileSync(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), JSON.stringify({
mempool: {}, mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize), mempoolArray: mempoolArray.splice(0, chunkSize),
}), { flag: 'w' }); }), { flag: 'w' });
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { }
await fsPromises.writeFile(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), JSON.stringify({
mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize),
}), { flag: 'w' });
}
await fsPromises.rename(DiskCache.TMP_FILE_NAME, DiskCache.FILE_NAME); fs.renameSync(DiskCache.TMP_FILE_NAME, DiskCache.FILE_NAME);
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { for (let i = 1; i < DiskCache.CHUNK_FILES; i++) {
await fsPromises.rename(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), DiskCache.FILE_NAMES.replace('{number}', i.toString())); fs.renameSync(DiskCache.TMP_FILE_NAMES.replace('{number}', i.toString()), DiskCache.FILE_NAMES.replace('{number}', i.toString()));
}
} }
logger.debug('Mempool and blocks data saved to disk cache'); logger.debug('Mempool and blocks data saved to disk cache');
@@ -164,7 +188,7 @@ class DiskCache {
} }
} }
} catch (e) { } catch (e) {
logger.err('Error parsing ' + fileName + '. Skipping. Reason: ' + (e instanceof Error ? e.message : e)); logger.info('Error parsing ' + fileName + '. Skipping. Reason: ' + (e instanceof Error ? e.message : e));
} }
} }

View File

@@ -4,29 +4,21 @@ import * as fs from 'fs';
import { AbstractLightningApi } from '../lightning-api-abstract-factory'; import { AbstractLightningApi } from '../lightning-api-abstract-factory';
import { ILightningApi } from '../lightning-api.interface'; import { ILightningApi } from '../lightning-api.interface';
import config from '../../../config'; import config from '../../../config';
import logger from '../../../logger';
class LndApi implements AbstractLightningApi { class LndApi implements AbstractLightningApi {
axiosConfig: AxiosRequestConfig = {}; axiosConfig: AxiosRequestConfig = {};
constructor() { constructor() {
if (!config.LIGHTNING.ENABLED) { if (config.LIGHTNING.ENABLED) {
return;
}
try {
this.axiosConfig = { this.axiosConfig = {
headers: { headers: {
'Grpc-Metadata-macaroon': fs.readFileSync(config.LND.MACAROON_PATH).toString('hex'), 'Grpc-Metadata-macaroon': fs.readFileSync(config.LND.MACAROON_PATH).toString('hex')
}, },
httpsAgent: new Agent({ httpsAgent: new Agent({
ca: fs.readFileSync(config.LND.TLS_CERT_PATH) ca: fs.readFileSync(config.LND.TLS_CERT_PATH)
}), }),
timeout: config.LND.TIMEOUT timeout: 10000
}; };
} catch (e) {
config.LIGHTNING.ENABLED = false;
logger.updateNetwork();
logger.err(`Could not initialize LND Macaroon/TLS Cert. Disabling LIGHTNING. ` + (e instanceof Error ? e.message : e));
} }
} }

View File

@@ -59,7 +59,7 @@ class MempoolBlocks {
// Loop through and traverse all ancestors and sum up all the sizes + fees // Loop through and traverse all ancestors and sum up all the sizes + fees
// Pass down size + fee to all unconfirmed children // Pass down size + fee to all unconfirmed children
let sizes = 0; let sizes = 0;
memPoolArray.forEach((tx) => { memPoolArray.forEach((tx, i) => {
sizes += tx.weight; sizes += tx.weight;
if (sizes > 4000000 * 8) { if (sizes > 4000000 * 8) {
return; return;
@@ -74,7 +74,7 @@ class MempoolBlocks {
const time = end - start; const time = end - start;
logger.debug('Mempool blocks calculated in ' + time / 1000 + ' seconds'); logger.debug('Mempool blocks calculated in ' + time / 1000 + ' seconds');
const blocks = this.calculateMempoolBlocks(memPoolArray); const blocks = this.calculateMempoolBlocks(memPoolArray, this.mempoolBlocks);
if (saveResults) { if (saveResults) {
const deltas = this.calculateMempoolDeltas(this.mempoolBlocks, blocks); const deltas = this.calculateMempoolDeltas(this.mempoolBlocks, blocks);
@@ -85,23 +85,26 @@ class MempoolBlocks {
return blocks; return blocks;
} }
private calculateMempoolBlocks(transactionsSorted: TransactionExtended[]): MempoolBlockWithTransactions[] { private calculateMempoolBlocks(transactionsSorted: TransactionExtended[], prevBlocks: MempoolBlockWithTransactions[]): MempoolBlockWithTransactions[] {
const mempoolBlocks: MempoolBlockWithTransactions[] = []; const mempoolBlocks: MempoolBlockWithTransactions[] = [];
let blockWeight = 0; let blockWeight = 0;
let blockSize = 0;
let transactions: TransactionExtended[] = []; let transactions: TransactionExtended[] = [];
transactionsSorted.forEach((tx) => { transactionsSorted.forEach((tx) => {
if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS
|| mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) { || mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) {
blockWeight += tx.weight; blockWeight += tx.weight;
blockSize += tx.size;
transactions.push(tx); transactions.push(tx);
} else { } else {
mempoolBlocks.push(this.dataToMempoolBlocks(transactions)); mempoolBlocks.push(this.dataToMempoolBlocks(transactions, mempoolBlocks.length));
blockWeight = tx.weight; blockWeight = tx.weight;
blockSize = tx.size;
transactions = [tx]; transactions = [tx];
} }
}); });
if (transactions.length) { if (transactions.length) {
mempoolBlocks.push(this.dataToMempoolBlocks(transactions)); mempoolBlocks.push(this.dataToMempoolBlocks(transactions, mempoolBlocks.length));
} }
return mempoolBlocks; return mempoolBlocks;
@@ -148,7 +151,7 @@ class MempoolBlocks {
// prepare a stripped down version of the mempool with only the minimum necessary data // prepare a stripped down version of the mempool with only the minimum necessary data
// to reduce the overhead of passing this data to the worker thread // to reduce the overhead of passing this data to the worker thread
const strippedMempool: { [txid: string]: ThreadTransaction } = {}; const strippedMempool: { [txid: string]: ThreadTransaction } = {};
Object.values(newMempool).filter(tx => !tx.deleteAfter).forEach(entry => { Object.values(newMempool).forEach(entry => {
strippedMempool[entry.txid] = { strippedMempool[entry.txid] = {
txid: entry.txid, txid: entry.txid,
fee: entry.fee, fee: entry.fee,
@@ -183,14 +186,7 @@ class MempoolBlocks {
this.txSelectionWorker?.once('error', reject); this.txSelectionWorker?.once('error', reject);
}); });
this.txSelectionWorker.postMessage({ type: 'set', mempool: strippedMempool }); this.txSelectionWorker.postMessage({ type: 'set', mempool: strippedMempool });
let { blocks, clusters } = await workerResultPromise; const { blocks, clusters } = await workerResultPromise;
// filter out stale transactions
const unfilteredCount = blocks.reduce((total, block) => { return total + block.length; }, 0);
blocks = blocks.map(block => block.filter(tx => (tx.txid && tx.txid in newMempool)));
const filteredCount = blocks.reduce((total, block) => { return total + block.length; }, 0);
if (filteredCount < unfilteredCount) {
logger.warn(`tx selection worker thread returned ${unfilteredCount - filteredCount} stale transactions from makeBlockTemplates`);
}
// clean up thread error listener // clean up thread error listener
this.txSelectionWorker?.removeListener('error', threadErrorListener); this.txSelectionWorker?.removeListener('error', threadErrorListener);
@@ -232,14 +228,7 @@ class MempoolBlocks {
this.txSelectionWorker?.once('error', reject); this.txSelectionWorker?.once('error', reject);
}); });
this.txSelectionWorker.postMessage({ type: 'update', added: addedStripped, removed }); this.txSelectionWorker.postMessage({ type: 'update', added: addedStripped, removed });
let { blocks, clusters } = await workerResultPromise; const { blocks, clusters } = await workerResultPromise;
// filter out stale transactions
const unfilteredCount = blocks.reduce((total, block) => { return total + block.length; }, 0);
blocks = blocks.map(block => block.filter(tx => (tx.txid && tx.txid in newMempool)));
const filteredCount = blocks.reduce((total, block) => { return total + block.length; }, 0);
if (filteredCount < unfilteredCount) {
logger.warn(`tx selection worker thread returned ${unfilteredCount - filteredCount} stale transactions from updateBlockTemplates`);
}
// clean up thread error listener // clean up thread error listener
this.txSelectionWorker?.removeListener('error', threadErrorListener); this.txSelectionWorker?.removeListener('error', threadErrorListener);
@@ -254,7 +243,7 @@ class MempoolBlocks {
// update this thread's mempool with the results // update this thread's mempool with the results
blocks.forEach(block => { blocks.forEach(block => {
block.forEach(tx => { block.forEach(tx => {
if (tx.txid && tx.txid in mempool) { if (tx.txid in mempool) {
if (tx.effectiveFeePerVsize != null) { if (tx.effectiveFeePerVsize != null) {
mempool[tx.txid].effectiveFeePerVsize = tx.effectiveFeePerVsize; mempool[tx.txid].effectiveFeePerVsize = tx.effectiveFeePerVsize;
} }
@@ -264,10 +253,6 @@ class MempoolBlocks {
const cluster = clusters[tx.cpfpRoot]; const cluster = clusters[tx.cpfpRoot];
let matched = false; let matched = false;
cluster.forEach(txid => { cluster.forEach(txid => {
if (!txid || !mempool[txid]) {
logger.warn('projected transaction ancestor missing from mempool cache');
return;
}
if (txid === tx.txid) { if (txid === tx.txid) {
matched = true; matched = true;
} else { } else {
@@ -288,17 +273,15 @@ class MempoolBlocks {
mempool[tx.txid].bestDescendant = null; mempool[tx.txid].bestDescendant = null;
} }
mempool[tx.txid].cpfpChecked = tx.cpfpChecked; mempool[tx.txid].cpfpChecked = tx.cpfpChecked;
} else {
logger.warn('projected transaction missing from mempool cache');
} }
}); });
}); });
// unpack the condensed blocks into proper mempool blocks // unpack the condensed blocks into proper mempool blocks
const mempoolBlocks = blocks.map((transactions) => { const mempoolBlocks = blocks.map((transactions, blockIndex) => {
return this.dataToMempoolBlocks(transactions.map(tx => { return this.dataToMempoolBlocks(transactions.map(tx => {
return mempool[tx.txid] || null; return mempool[tx.txid] || null;
}).filter(tx => !!tx)); }).filter(tx => !!tx), blockIndex);
}); });
if (saveResults) { if (saveResults) {
@@ -310,7 +293,7 @@ class MempoolBlocks {
return mempoolBlocks; return mempoolBlocks;
} }
private dataToMempoolBlocks(transactions: TransactionExtended[]): MempoolBlockWithTransactions { private dataToMempoolBlocks(transactions: TransactionExtended[], blocksIndex: number): MempoolBlockWithTransactions {
let totalSize = 0; let totalSize = 0;
let totalWeight = 0; let totalWeight = 0;
const fitTransactions: TransactionExtended[] = []; const fitTransactions: TransactionExtended[] = [];
@@ -321,14 +304,22 @@ class MempoolBlocks {
fitTransactions.push(tx); fitTransactions.push(tx);
} }
}); });
const feeStats = Common.calcEffectiveFeeStatistics(transactions); let rangeLength = 4;
if (blocksIndex === 0) {
rangeLength = 8;
}
if (transactions.length > 4000) {
rangeLength = 6;
} else if (transactions.length > 10000) {
rangeLength = 8;
}
return { return {
blockSize: totalSize, blockSize: totalSize,
blockVSize: totalWeight / 4, blockVSize: totalWeight / 4,
nTx: transactions.length, nTx: transactions.length,
totalFees: transactions.reduce((acc, cur) => acc + cur.fee, 0), totalFees: transactions.reduce((acc, cur) => acc + cur.fee, 0),
medianFee: feeStats.medianFee, // Common.percentile(transactions.map((tx) => tx.effectiveFeePerVsize), config.MEMPOOL.RECOMMENDED_FEE_PERCENTILE), medianFee: Common.percentile(transactions.map((tx) => tx.effectiveFeePerVsize), config.MEMPOOL.RECOMMENDED_FEE_PERCENTILE),
feeRange: feeStats.feeRange, //Common.getFeesInRange(transactions, rangeLength), feeRange: Common.getFeesInRange(transactions, rangeLength),
transactionIds: transactions.map((tx) => tx.txid), transactionIds: transactions.map((tx) => tx.txid),
transactions: fitTransactions.map((tx) => Common.stripTransaction(tx)), transactions: fitTransactions.map((tx) => Common.stripTransaction(tx)),
}; };

View File

@@ -38,6 +38,7 @@ class Mempool {
constructor() { constructor() {
setInterval(this.updateTxPerSecond.bind(this), 1000); setInterval(this.updateTxPerSecond.bind(this), 1000);
setInterval(this.deleteExpiredTransactions.bind(this), 20000);
} }
/** /**
@@ -255,7 +256,7 @@ class Mempool {
} }
} }
public deleteExpiredTransactions() { private deleteExpiredTransactions() {
const now = new Date().getTime(); const now = new Date().getTime();
for (const tx in this.mempoolCache) { for (const tx in this.mempoolCache) {
const lazyDeleteAt = this.mempoolCache[tx].deleteAfter; const lazyDeleteAt = this.mempoolCache[tx].deleteAfter;

View File

@@ -452,7 +452,7 @@ class Mining {
const elapsedSeconds = Math.max(1, Math.round((new Date().getTime() / 1000) - timer)); const elapsedSeconds = Math.max(1, Math.round((new Date().getTime() / 1000) - timer));
if (elapsedSeconds > 5) { if (elapsedSeconds > 5) {
const progress = Math.round(totalBlockChecked / blocks.length * 100); const progress = Math.round(totalBlockChecked / blocks.length * 100);
logger.debug(`Indexing difficulty adjustment at block #${block.height} | Progress: ${progress}%`, logger.tags.mining); logger.info(`Indexing difficulty adjustment at block #${block.height} | Progress: ${progress}%`, logger.tags.mining);
timer = new Date().getTime() / 1000; timer = new Date().getTime() / 1000;
} }
} }
@@ -558,10 +558,8 @@ class Mining {
currentBlockHeight -= 10000; currentBlockHeight -= 10000;
} }
if (totalIndexed > 0) { if (totalIndexed) {
logger.info(`Indexing missing coinstatsindex data completed. Indexed ${totalIndexed}`, logger.tags.mining); logger.info(`Indexing missing coinstatsindex data completed`, logger.tags.mining);
} else {
logger.debug(`Indexing missing coinstatsindex data completed. Indexed 0.`, logger.tags.mining);
} }
} }

View File

@@ -211,7 +211,6 @@ class WebsocketHandler {
if (!_blocks) { if (!_blocks) {
_blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT); _blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT);
} }
const da = difficultyAdjustment.getDifficultyAdjustment();
return { return {
'mempoolInfo': memPool.getMempoolInfo(), 'mempoolInfo': memPool.getMempoolInfo(),
'vBytesPerSecond': memPool.getVBytesPerSecond(), 'vBytesPerSecond': memPool.getVBytesPerSecond(),
@@ -221,7 +220,7 @@ class WebsocketHandler {
'transactions': memPool.getLatestTransactions(), 'transactions': memPool.getLatestTransactions(),
'backendInfo': backendInfo.getBackendInfo(), 'backendInfo': backendInfo.getBackendInfo(),
'loadingIndicators': loadingIndicators.getLoadingIndicators(), 'loadingIndicators': loadingIndicators.getLoadingIndicators(),
'da': da?.previousTime ? da : undefined, 'da': difficultyAdjustment.getDifficultyAdjustment(),
'fees': feeApi.getRecommendedFee(), 'fees': feeApi.getRecommendedFee(),
...this.extraInitProperties ...this.extraInitProperties
}; };
@@ -279,9 +278,7 @@ class WebsocketHandler {
response['mempoolInfo'] = mempoolInfo; response['mempoolInfo'] = mempoolInfo;
response['vBytesPerSecond'] = vBytesPerSecond; response['vBytesPerSecond'] = vBytesPerSecond;
response['transactions'] = newTransactions.slice(0, 6).map((tx) => Common.stripTransaction(tx)); response['transactions'] = newTransactions.slice(0, 6).map((tx) => Common.stripTransaction(tx));
if (da?.previousTime) { response['da'] = da;
response['da'] = da;
}
response['fees'] = recommendedFees; response['fees'] = recommendedFees;
} }
@@ -508,7 +505,7 @@ class WebsocketHandler {
const response = { const response = {
'block': block, 'block': block,
'mempoolInfo': memPool.getMempoolInfo(), 'mempoolInfo': memPool.getMempoolInfo(),
'da': da?.previousTime ? da : undefined, 'da': da,
'fees': fees, 'fees': fees,
}; };

View File

@@ -33,11 +33,9 @@ interface IConfig {
ADVANCED_GBT_MEMPOOL: boolean; ADVANCED_GBT_MEMPOOL: boolean;
CPFP_INDEXING: boolean; CPFP_INDEXING: boolean;
MAX_BLOCKS_BULK_QUERY: number; MAX_BLOCKS_BULK_QUERY: number;
DISK_CACHE_BLOCK_INTERVAL: number;
}; };
ESPLORA: { ESPLORA: {
REST_API_URL: string; REST_API_URL: string;
UNIX_SOCKET_PATH: string | void | null;
}; };
LIGHTNING: { LIGHTNING: {
ENABLED: boolean; ENABLED: boolean;
@@ -53,7 +51,6 @@ interface IConfig {
TLS_CERT_PATH: string; TLS_CERT_PATH: string;
MACAROON_PATH: string; MACAROON_PATH: string;
REST_API_URL: string; REST_API_URL: string;
TIMEOUT: number;
}; };
CLIGHTNING: { CLIGHTNING: {
SOCKET: string; SOCKET: string;
@@ -68,14 +65,12 @@ interface IConfig {
PORT: number; PORT: number;
USERNAME: string; USERNAME: string;
PASSWORD: string; PASSWORD: string;
TIMEOUT: number;
}; };
SECOND_CORE_RPC: { SECOND_CORE_RPC: {
HOST: string; HOST: string;
PORT: number; PORT: number;
USERNAME: string; USERNAME: string;
PASSWORD: string; PASSWORD: string;
TIMEOUT: number;
}; };
DATABASE: { DATABASE: {
ENABLED: boolean; ENABLED: boolean;
@@ -160,11 +155,9 @@ const defaults: IConfig = {
'ADVANCED_GBT_MEMPOOL': false, 'ADVANCED_GBT_MEMPOOL': false,
'CPFP_INDEXING': false, 'CPFP_INDEXING': false,
'MAX_BLOCKS_BULK_QUERY': 0, 'MAX_BLOCKS_BULK_QUERY': 0,
'DISK_CACHE_BLOCK_INTERVAL': 6,
}, },
'ESPLORA': { 'ESPLORA': {
'REST_API_URL': 'http://127.0.0.1:3000', 'REST_API_URL': 'http://127.0.0.1:3000',
'UNIX_SOCKET_PATH': null,
}, },
'ELECTRUM': { 'ELECTRUM': {
'HOST': '127.0.0.1', 'HOST': '127.0.0.1',
@@ -175,15 +168,13 @@ const defaults: IConfig = {
'HOST': '127.0.0.1', 'HOST': '127.0.0.1',
'PORT': 8332, 'PORT': 8332,
'USERNAME': 'mempool', 'USERNAME': 'mempool',
'PASSWORD': 'mempool', 'PASSWORD': 'mempool'
'TIMEOUT': 60000,
}, },
'SECOND_CORE_RPC': { 'SECOND_CORE_RPC': {
'HOST': '127.0.0.1', 'HOST': '127.0.0.1',
'PORT': 8332, 'PORT': 8332,
'USERNAME': 'mempool', 'USERNAME': 'mempool',
'PASSWORD': 'mempool', 'PASSWORD': 'mempool'
'TIMEOUT': 60000,
}, },
'DATABASE': { 'DATABASE': {
'ENABLED': true, 'ENABLED': true,
@@ -223,7 +214,6 @@ const defaults: IConfig = {
'TLS_CERT_PATH': '', 'TLS_CERT_PATH': '',
'MACAROON_PATH': '', 'MACAROON_PATH': '',
'REST_API_URL': 'https://localhost:8080', 'REST_API_URL': 'https://localhost:8080',
'TIMEOUT': 10000,
}, },
'CLIGHTNING': { 'CLIGHTNING': {
'SOCKET': '', 'SOCKET': '',

View File

@@ -178,7 +178,6 @@ class Server {
logger.debug(msg); logger.debug(msg);
} }
} }
memPool.deleteExpiredTransactions();
await blocks.$updateBlocks(); await blocks.$updateBlocks();
await memPool.$updateMempool(); await memPool.$updateMempool();
indexer.$run(); indexer.$run();
@@ -216,11 +215,11 @@ class Server {
await lightningStatsUpdater.$startService(); await lightningStatsUpdater.$startService();
await forensicsService.$startService(); await forensicsService.$startService();
} catch(e) { } catch(e) {
logger.err(`Exception in $runLightningBackend. Restarting in 1 minute. Reason: ${(e instanceof Error ? e.message : e)}`); logger.err(`Nodejs lightning backend crashed. Restarting in 1 minute. Reason: ${(e instanceof Error ? e.message : e)}`);
await Common.sleep$(1000 * 60); await Common.sleep$(1000 * 60);
this.$runLightningBackend(); this.$runLightningBackend();
}; };
} }
setUpWebsocketHandling(): void { setUpWebsocketHandling(): void {
if (this.wss) { if (this.wss) {
@@ -276,7 +275,7 @@ class Server {
if (!this.warnedHeapCritical && this.maxHeapSize > warnThreshold) { if (!this.warnedHeapCritical && this.maxHeapSize > warnThreshold) {
this.warnedHeapCritical = true; this.warnedHeapCritical = true;
logger.warn(`Used ${(this.maxHeapSize / stats.heap_size_limit * 100).toFixed(2)}% of heap limit (${formatBytes(this.maxHeapSize, byteUnits, true)} / ${formatBytes(stats.heap_size_limit, byteUnits)})!`); logger.warn(`Used ${(this.maxHeapSize / stats.heap_size_limit).toFixed(2)}% of heap limit (${formatBytes(this.maxHeapSize, byteUnits, true)} / ${formatBytes(stats.heap_size_limit, byteUnits)})!`);
} }
if (this.lastHeapLogTime === null || (now - this.lastHeapLogTime) > (this.heapLogInterval * 1000)) { if (this.lastHeapLogTime === null || (now - this.lastHeapLogTime) > (this.heapLogInterval * 1000)) {
logger.debug(`Memory usage: ${formatBytes(this.maxHeapSize, byteUnits)} / ${formatBytes(stats.heap_size_limit, byteUnits)}`); logger.debug(`Memory usage: ${formatBytes(this.maxHeapSize, byteUnits)} / ${formatBytes(stats.heap_size_limit, byteUnits)}`);

View File

@@ -69,10 +69,6 @@ class Logger {
this.network = this.getNetwork(); this.network = this.getNetwork();
} }
public updateNetwork(): void {
this.network = this.getNetwork();
}
private addprio(prio): void { private addprio(prio): void {
this[prio] = (function(_this) { this[prio] = (function(_this) {
return function(msg, tag?: string) { return function(msg, tag?: string) {

View File

@@ -214,16 +214,6 @@ export interface MempoolStats {
tx_count: number; tx_count: number;
} }
export interface EffectiveFeeStats {
medianFee: number; // median effective fee rate
feeRange: number[]; // 2nd, 10th, 25th, 50th, 75th, 90th, 98th percentiles
}
export interface CpfpSummary {
transactions: TransactionExtended[];
clusters: { root: string, height: number, txs: Ancestor[], effectiveFeePerVsize: number }[];
}
export interface Statistic { export interface Statistic {
id?: number; id?: number;
added: string; added: string;
@@ -319,11 +309,9 @@ export interface IDifficultyAdjustment {
remainingBlocks: number; remainingBlocks: number;
remainingTime: number; remainingTime: number;
previousRetarget: number; previousRetarget: number;
previousTime: number;
nextRetargetHeight: number; nextRetargetHeight: number;
timeAvg: number; timeAvg: number;
timeOffset: number; timeOffset: number;
expectedBlocks: number;
} }
export interface IndexedDifficultyAdjustment { export interface IndexedDifficultyAdjustment {

View File

@@ -1,4 +1,4 @@
import { BlockExtended, BlockExtension, BlockPrice, EffectiveFeeStats } from '../mempool.interfaces'; import { BlockExtended, BlockExtension, BlockPrice } from '../mempool.interfaces';
import DB from '../database'; import DB from '../database';
import logger from '../logger'; import logger from '../logger';
import { Common } from '../api/common'; import { Common } from '../api/common';
@@ -466,6 +466,30 @@ class BlocksRepository {
} }
} }
/**
* Get one block by hash
*/
public async $getBlockByHash(hash: string): Promise<object | null> {
try {
const query = `
SELECT ${BLOCK_DB_FIELDS}
FROM blocks
JOIN pools ON blocks.pool_id = pools.id
WHERE hash = ?;
`;
const [rows]: any[] = await DB.query(query, [hash]);
if (rows.length <= 0) {
return null;
}
return await this.formatDbBlockIntoExtendedBlock(rows[0]);
} catch (e) {
logger.err(`Cannot get indexed block ${hash}. Reason: ` + (e instanceof Error ? e.message : e));
throw e;
}
}
/** /**
* Return blocks difficulty * Return blocks difficulty
*/ */
@@ -575,6 +599,7 @@ class BlocksRepository {
if (blocks[idx].previous_block_hash !== blocks[idx - 1].hash) { if (blocks[idx].previous_block_hash !== blocks[idx - 1].hash) {
logger.warn(`Chain divergence detected at block ${blocks[idx - 1].height}`); logger.warn(`Chain divergence detected at block ${blocks[idx - 1].height}`);
await this.$deleteBlocksFrom(blocks[idx - 1].height); await this.$deleteBlocksFrom(blocks[idx - 1].height);
await BlocksSummariesRepository.$deleteBlocksFrom(blocks[idx - 1].height);
await HashratesRepository.$deleteHashratesFromTimestamp(blocks[idx - 1].timestamp - 604800); await HashratesRepository.$deleteHashratesFromTimestamp(blocks[idx - 1].timestamp - 604800);
await DifficultyAdjustmentsRepository.$deleteAdjustementsFromHeight(blocks[idx - 1].height); await DifficultyAdjustmentsRepository.$deleteAdjustementsFromHeight(blocks[idx - 1].height);
return false; return false;
@@ -594,7 +619,7 @@ class BlocksRepository {
* Delete blocks from the database from blockHeight * Delete blocks from the database from blockHeight
*/ */
public async $deleteBlocksFrom(blockHeight: number) { public async $deleteBlocksFrom(blockHeight: number) {
logger.info(`Delete newer blocks from height ${blockHeight} from the database`, logger.tags.mining); logger.info(`Delete newer blocks from height ${blockHeight} from the database`);
try { try {
await DB.query(`DELETE FROM blocks where height >= ${blockHeight}`); await DB.query(`DELETE FROM blocks where height >= ${blockHeight}`);
@@ -883,25 +908,6 @@ class BlocksRepository {
} }
} }
/**
* Save indexed effective fee statistics
*
* @param id
* @param feeStats
*/
public async $saveEffectiveFeeStats(id: string, feeStats: EffectiveFeeStats): Promise<void> {
try {
await DB.query(`
UPDATE blocks SET median_fee = ?, fee_span = ?
WHERE hash = ?`,
[feeStats.medianFee, JSON.stringify(feeStats.feeRange), id]
);
} catch (e) {
logger.err(`Cannot update block fee stats. Reason: ` + (e instanceof Error ? e.message : e));
throw e;
}
}
/** /**
* Convert a mysql row block into a BlockExtended. Note that you * Convert a mysql row block into a BlockExtended. Note that you
* must provide the correct field into dbBlk object param * must provide the correct field into dbBlk object param
@@ -972,7 +978,6 @@ class BlocksRepository {
} }
// If we're missing block summary related field, check if we can populate them on the fly now // If we're missing block summary related field, check if we can populate them on the fly now
// This is for example triggered upon re-org
if (Common.blocksSummariesIndexingEnabled() && if (Common.blocksSummariesIndexingEnabled() &&
(extras.medianFeeAmt === null || extras.feePercentiles === null)) (extras.medianFeeAmt === null || extras.feePercentiles === null))
{ {
@@ -980,7 +985,7 @@ class BlocksRepository {
if (extras.feePercentiles === null) { if (extras.feePercentiles === null) {
const block = await bitcoinClient.getBlock(dbBlk.id, 2); const block = await bitcoinClient.getBlock(dbBlk.id, 2);
const summary = blocks.summarizeBlock(block); const summary = blocks.summarizeBlock(block);
await BlocksSummariesRepository.$saveTransactions(dbBlk.height, dbBlk.hash, summary.transactions); await BlocksSummariesRepository.$saveSummary({ height: block.height, mined: summary });
extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(dbBlk.id); extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(dbBlk.id);
} }
if (extras.feePercentiles !== null) { if (extras.feePercentiles !== null) {

View File

@@ -1,6 +1,6 @@
import DB from '../database'; import DB from '../database';
import logger from '../logger'; import logger from '../logger';
import { BlockSummary, TransactionStripped } from '../mempool.interfaces'; import { BlockSummary } from '../mempool.interfaces';
class BlocksSummariesRepository { class BlocksSummariesRepository {
public async $getByBlockId(id: string): Promise<BlockSummary | undefined> { public async $getByBlockId(id: string): Promise<BlockSummary | undefined> {
@@ -17,7 +17,7 @@ class BlocksSummariesRepository {
return undefined; return undefined;
} }
public async $saveSummary(params: { height: number, mined?: BlockSummary}): Promise<void> { public async $saveSummary(params: { height: number, mined?: BlockSummary}) {
const blockId = params.mined?.id; const blockId = params.mined?.id;
try { try {
const transactions = JSON.stringify(params.mined?.transactions || []); const transactions = JSON.stringify(params.mined?.transactions || []);
@@ -37,20 +37,6 @@ class BlocksSummariesRepository {
} }
} }
public async $saveTransactions(blockHeight: number, blockId: string, transactions: TransactionStripped[]): Promise<void> {
try {
const transactionsStr = JSON.stringify(transactions);
await DB.query(`
INSERT INTO blocks_summaries
SET height = ?, transactions = ?, id = ?
ON DUPLICATE KEY UPDATE transactions = ?`,
[blockHeight, transactionsStr, blockId, transactionsStr]);
} catch (e: any) {
logger.debug(`Cannot save block summary transactions for ${blockId}. Reason: ${e instanceof Error ? e.message : e}`);
throw e;
}
}
public async $saveTemplate(params: { height: number, template: BlockSummary}) { public async $saveTemplate(params: { height: number, template: BlockSummary}) {
const blockId = params.template?.id; const blockId = params.template?.id;
try { try {
@@ -82,6 +68,19 @@ class BlocksSummariesRepository {
return []; return [];
} }
/**
* Delete blocks from the database from blockHeight
*/
public async $deleteBlocksFrom(blockHeight: number) {
logger.info(`Delete newer blocks summary from height ${blockHeight} from the database`);
try {
await DB.query(`DELETE FROM blocks_summaries where height >= ${blockHeight}`);
} catch (e) {
logger.err('Cannot delete indexed blocks summaries. Reason: ' + (e instanceof Error ? e.message : e));
}
}
/** /**
* Get the fee percentiles if the block has already been indexed, [] otherwise * Get the fee percentiles if the block has already been indexed, [] otherwise
* *

View File

@@ -48,7 +48,7 @@ class CpfpRepository {
} }
} }
public async $batchSaveClusters(clusters: { root: string, height: number, txs: Ancestor[], effectiveFeePerVsize: number }[]): Promise<boolean> { public async $batchSaveClusters(clusters: { root: string, height: number, txs: any, effectiveFeePerVsize: number}[]): Promise<boolean> {
try { try {
const clusterValues: any[] = []; const clusterValues: any[] = [];
const txs: any[] = []; const txs: any[] = [];

View File

@@ -220,7 +220,7 @@ class HashratesRepository {
* Delete hashrates from the database from timestamp * Delete hashrates from the database from timestamp
*/ */
public async $deleteHashratesFromTimestamp(timestamp: number) { public async $deleteHashratesFromTimestamp(timestamp: number) {
logger.info(`Delete newer hashrates from timestamp ${new Date(timestamp * 1000).toUTCString()} from the database`, logger.tags.mining); logger.info(`Delete newer hashrates from timestamp ${new Date(timestamp * 1000).toUTCString()} from the database`);
try { try {
await DB.query(`DELETE FROM hashrates WHERE hashrate_timestamp >= FROM_UNIXTIME(?)`, [timestamp]); await DB.query(`DELETE FROM hashrates WHERE hashrate_timestamp >= FROM_UNIXTIME(?)`, [timestamp]);

View File

@@ -160,7 +160,7 @@ class PricesRepository {
// Compute fiat exchange rates // Compute fiat exchange rates
let latestPrice = rates[0] as ApiPrice; let latestPrice = rates[0] as ApiPrice;
if (!latestPrice || latestPrice.USD === -1) { if (latestPrice.USD === -1) {
latestPrice = priceUpdater.getEmptyPricesObj(); latestPrice = priceUpdater.getEmptyPricesObj();
} }

View File

@@ -27,7 +27,7 @@ class ForensicsService {
private async $runTasks(): Promise<void> { private async $runTasks(): Promise<void> {
try { try {
logger.debug(`Running forensics scans`); logger.info(`Running forensics scans`);
if (config.MEMPOOL.BACKEND === 'esplora') { if (config.MEMPOOL.BACKEND === 'esplora') {
await this.$runClosedChannelsForensics(false); await this.$runClosedChannelsForensics(false);
@@ -73,7 +73,7 @@ class ForensicsService {
let progress = 0; let progress = 0;
try { try {
logger.debug(`Started running closed channel forensics...`); logger.info(`Started running closed channel forensics...`);
let channels; let channels;
if (onlyNewChannels) { if (onlyNewChannels) {
channels = await channelsApi.$getClosedChannelsWithoutReason(); channels = await channelsApi.$getClosedChannelsWithoutReason();
@@ -156,7 +156,7 @@ class ForensicsService {
this.loggerTimer = new Date().getTime() / 1000; this.loggerTimer = new Date().getTime() / 1000;
} }
} }
logger.debug(`Closed channels forensics scan complete.`); logger.info(`Closed channels forensics scan complete.`);
} catch (e) { } catch (e) {
logger.err('$runClosedChannelsForensics() error: ' + (e instanceof Error ? e.message : e)); logger.err('$runClosedChannelsForensics() error: ' + (e instanceof Error ? e.message : e));
} }
@@ -217,7 +217,7 @@ class ForensicsService {
let progress = 0; let progress = 0;
try { try {
logger.debug(`Started running open channel forensics...`); logger.info(`Started running open channel forensics...`);
const channels = await channelsApi.$getChannelsWithoutSourceChecked(); const channels = await channelsApi.$getChannelsWithoutSourceChecked();
for (const openChannel of channels) { for (const openChannel of channels) {
@@ -266,7 +266,7 @@ class ForensicsService {
} }
} }
logger.debug(`Open channels forensics scan complete.`); logger.info(`Open channels forensics scan complete.`);
} catch (e) { } catch (e) {
logger.err('$runOpenedChannelsForensics() error: ' + (e instanceof Error ? e.message : e)); logger.err('$runOpenedChannelsForensics() error: ' + (e instanceof Error ? e.message : e));
} finally { } finally {

View File

@@ -283,7 +283,7 @@ class NetworkSyncService {
} else { } else {
log += ` for the first time`; log += ` for the first time`;
} }
logger.debug(`${log}`, logger.tags.ln); logger.info(`${log}`, logger.tags.ln);
const channels = await channelsApi.$getChannelsByStatus([0, 1]); const channels = await channelsApi.$getChannelsByStatus([0, 1]);
for (const channel of channels) { for (const channel of channels) {

View File

@@ -22,15 +22,12 @@ class LightningStatsUpdater {
* Update the latest entry for each node every config.LIGHTNING.STATS_REFRESH_INTERVAL seconds * Update the latest entry for each node every config.LIGHTNING.STATS_REFRESH_INTERVAL seconds
*/ */
private async $logStatsDaily(): Promise<void> { private async $logStatsDaily(): Promise<void> {
try { const date = new Date();
const date = new Date(); Common.setDateMidnight(date);
Common.setDateMidnight(date); const networkGraph = await lightningApi.$getNetworkGraph();
const networkGraph = await lightningApi.$getNetworkGraph(); await LightningStatsImporter.computeNetworkStats(date.getTime() / 1000, networkGraph);
await LightningStatsImporter.computeNetworkStats(date.getTime() / 1000, networkGraph);
logger.debug(`Updated latest network stats`, logger.tags.ln); logger.debug(`Updated latest network stats`, logger.tags.ln);
} catch (e) {
logger.err(`Exception in $logStatsDaily. Reason: ${(e instanceof Error ? e.message : e)}`);
}
} }
} }

View File

@@ -15,20 +15,16 @@ class LightningStatsImporter {
topologiesFolder = config.LIGHTNING.TOPOLOGY_FOLDER; topologiesFolder = config.LIGHTNING.TOPOLOGY_FOLDER;
async $run(): Promise<void> { async $run(): Promise<void> {
try { const [channels]: any[] = await DB.query('SELECT short_id from channels;');
const [channels]: any[] = await DB.query('SELECT short_id from channels;'); logger.info(`Caching funding txs for currently existing channels`, logger.tags.ln);
logger.info(`Caching funding txs for currently existing channels`, logger.tags.ln); await fundingTxFetcher.$fetchChannelsFundingTxs(channels.map(channel => channel.short_id));
await fundingTxFetcher.$fetchChannelsFundingTxs(channels.map(channel => channel.short_id));
if (config.MEMPOOL.NETWORK !== 'mainnet' || config.DATABASE.ENABLED === false) { if (config.MEMPOOL.NETWORK !== 'mainnet' || config.DATABASE.ENABLED === false) {
return; return;
}
await this.$importHistoricalLightningStats();
await this.$cleanupIncorrectSnapshot();
} catch (e) {
logger.err(`Exception in LightningStatsImporter::$run(). ${e}`);
} }
await this.$importHistoricalLightningStats();
await this.$cleanupIncorrectSnapshot();
} }
/** /**

View File

@@ -62,7 +62,7 @@ class PoolsUpdater {
if (this.currentSha === null) { if (this.currentSha === null) {
logger.info(`Downloading pools-v2.json for the first time from ${this.poolsUrl} over ${network}`, logger.tags.mining); logger.info(`Downloading pools-v2.json for the first time from ${this.poolsUrl} over ${network}`, logger.tags.mining);
} else { } else {
logger.warn(`pools-v2.json is outdated, fetching latest from ${this.poolsUrl} over ${network}`, logger.tags.mining); logger.warn(`pools-v2.json is outdated, fetch latest from ${this.poolsUrl} over ${network}`, logger.tags.mining);
} }
const poolsJson = await this.query(this.poolsUrl); const poolsJson = await this.query(this.poolsUrl);
if (poolsJson === undefined) { if (poolsJson === undefined) {

View File

@@ -222,7 +222,7 @@ class PriceUpdater {
private async $insertMissingRecentPrices(type: 'hour' | 'day'): Promise<void> { private async $insertMissingRecentPrices(type: 'hour' | 'day'): Promise<void> {
const existingPriceTimes = await PricesRepository.$getPricesTimes(); const existingPriceTimes = await PricesRepository.$getPricesTimes();
logger.debug(`Fetching ${type === 'day' ? 'dai' : 'hour'}ly price history from exchanges and saving missing ones into the database`, logger.tags.mining); logger.info(`Fetching ${type === 'day' ? 'dai' : 'hour'}ly price history from exchanges and saving missing ones into the database`, logger.tags.mining);
const historicalPrices: PriceHistory[] = []; const historicalPrices: PriceHistory[] = [];

View File

@@ -5,7 +5,6 @@
"types": ["node", "jest"], "types": ["node", "jest"],
"lib": ["es2019", "dom"], "lib": ["es2019", "dom"],
"strict": true, "strict": true,
"skipLibCheck": true,
"noImplicitAny": false, "noImplicitAny": false,
"sourceMap": false, "sourceMap": false,
"outDir": "dist", "outDir": "dist",

View File

@@ -6,8 +6,6 @@ If you are looking to use these Docker images to deploy your own instance of Mem
See a video guide of this installation method by k3tan [on BitcoinTV.com](https://bitcointv.com/w/8fpAx6rf5CQ16mMhospwjg). See a video guide of this installation method by k3tan [on BitcoinTV.com](https://bitcointv.com/w/8fpAx6rf5CQ16mMhospwjg).
**We only provide support for this installation method to <a href="https://mempool.space/enterprise">Enterprise sponsors</a>.**
Jump to a section in this doc: Jump to a section in this doc:
- [Configure with Bitcoin Core Only](#configure-with-bitcoin-core-only) - [Configure with Bitcoin Core Only](#configure-with-bitcoin-core-only)
- [Configure with Bitcoin Core + Electrum Server](#configure-with-bitcoin-core--electrum-server) - [Configure with Bitcoin Core + Electrum Server](#configure-with-bitcoin-core--electrum-server)
@@ -36,7 +34,6 @@ If you want to use different credentials, specify them in the `docker-compose.ym
CORE_RPC_PORT: "8332" CORE_RPC_PORT: "8332"
CORE_RPC_USERNAME: "customuser" CORE_RPC_USERNAME: "customuser"
CORE_RPC_PASSWORD: "custompassword" CORE_RPC_PASSWORD: "custompassword"
CORE_RPC_TIMEOUT: "60000"
``` ```
The IP address in the example above refers to Docker's default gateway IP address so that the container can hit the `bitcoind` instance running on the host machine. If your setup is different, update it accordingly. The IP address in the example above refers to Docker's default gateway IP address so that the container can hit the `bitcoind` instance running on the host machine. If your setup is different, update it accordingly.
@@ -115,7 +112,6 @@ Below we list all settings from `mempool-config.json` and the corresponding over
"ADVANCED_GBT_MEMPOOL": false, "ADVANCED_GBT_MEMPOOL": false,
"CPFP_INDEXING": false, "CPFP_INDEXING": false,
"MAX_BLOCKS_BULK_QUERY": 0, "MAX_BLOCKS_BULK_QUERY": 0,
"DISK_CACHE_BLOCK_INTERVAL": 6
}, },
``` ```
@@ -147,7 +143,6 @@ Corresponding `docker-compose.yml` overrides:
MEMPOOL_ADVANCED_GBT_MEMPOOL: "" MEMPOOL_ADVANCED_GBT_MEMPOOL: ""
MEMPOOL_CPFP_INDEXING: "" MEMPOOL_CPFP_INDEXING: ""
MAX_BLOCKS_BULK_QUERY: "" MAX_BLOCKS_BULK_QUERY: ""
DISK_CACHE_BLOCK_INTERVAL: ""
... ...
``` ```
@@ -163,8 +158,7 @@ Corresponding `docker-compose.yml` overrides:
"HOST": "127.0.0.1", "HOST": "127.0.0.1",
"PORT": 8332, "PORT": 8332,
"USERNAME": "mempool", "USERNAME": "mempool",
"PASSWORD": "mempool", "PASSWORD": "mempool"
"TIMEOUT": 60000
}, },
``` ```
@@ -176,7 +170,6 @@ Corresponding `docker-compose.yml` overrides:
CORE_RPC_PORT: "" CORE_RPC_PORT: ""
CORE_RPC_USERNAME: "" CORE_RPC_USERNAME: ""
CORE_RPC_PASSWORD: "" CORE_RPC_PASSWORD: ""
CORE_RPC_TIMEOUT: 60000
... ...
``` ```
@@ -206,8 +199,7 @@ Corresponding `docker-compose.yml` overrides:
`mempool-config.json`: `mempool-config.json`:
```json ```json
"ESPLORA": { "ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3000", "REST_API_URL": "http://127.0.0.1:3000"
"UNIX_SOCKET_PATH": "/tmp/esplora-socket"
}, },
``` ```
@@ -216,7 +208,6 @@ Corresponding `docker-compose.yml` overrides:
api: api:
environment: environment:
ESPLORA_REST_API_URL: "" ESPLORA_REST_API_URL: ""
ESPLORA_UNIX_SOCKET_PATH: ""
... ...
``` ```
@@ -228,8 +219,7 @@ Corresponding `docker-compose.yml` overrides:
"HOST": "127.0.0.1", "HOST": "127.0.0.1",
"PORT": 8332, "PORT": 8332,
"USERNAME": "mempool", "USERNAME": "mempool",
"PASSWORD": "mempool", "PASSWORD": "mempool"
"TIMEOUT": 60000
}, },
``` ```
@@ -241,7 +231,6 @@ Corresponding `docker-compose.yml` overrides:
SECOND_CORE_RPC_PORT: "" SECOND_CORE_RPC_PORT: ""
SECOND_CORE_RPC_USERNAME: "" SECOND_CORE_RPC_USERNAME: ""
SECOND_CORE_RPC_PASSWORD: "" SECOND_CORE_RPC_PASSWORD: ""
SECOND_CORE_RPC_TIMEOUT: ""
... ...
``` ```
@@ -414,7 +403,6 @@ Corresponding `docker-compose.yml` overrides:
"TLS_CERT_PATH": "" "TLS_CERT_PATH": ""
"MACAROON_PATH": "" "MACAROON_PATH": ""
"REST_API_URL": "https://localhost:8080" "REST_API_URL": "https://localhost:8080"
"TIMEOUT": 10000
} }
``` ```
@@ -425,7 +413,6 @@ Corresponding `docker-compose.yml` overrides:
LND_TLS_CERT_PATH: "" LND_TLS_CERT_PATH: ""
LND_MACAROON_PATH: "" LND_MACAROON_PATH: ""
LND_REST_API_URL: "https://localhost:8080" LND_REST_API_URL: "https://localhost:8080"
LND_TIMEOUT: 10000
... ...
``` ```
@@ -463,8 +450,8 @@ Corresponding `docker-compose.yml` overrides:
api: api:
environment: environment:
MAXMIND_ENABLED: true, MAXMIND_ENABLED: true,
MAXMIND_GEOLITE2_CITY: "/backend/GeoIP/GeoLite2-City.mmdb", MAXMIND_GEOLITE2_CITY: "./backend/GeoIP/GeoLite2-City.mmdb",
MAXMIND_GEOLITE2_ASN": "/backend/GeoIP/GeoLite2-ASN.mmdb", MAXMIND_GEOLITE2_ASN": "./backend/GeoIP/GeoLite2-ASN.mmdb",
MAXMIND_GEOIP2_ISP": "/backend/GeoIP/GeoIP2-ISP.mmdb" MAXMIND_GEOIP2_ISP": "./backend/GeoIP/GeoIP2-ISP.mmdb"
... ...
``` ```

View File

@@ -17,7 +17,6 @@ WORKDIR /backend
RUN chown 1000:1000 ./ RUN chown 1000:1000 ./
COPY --from=builder --chown=1000:1000 /build/package ./package/ COPY --from=builder --chown=1000:1000 /build/package ./package/
COPY --from=builder --chown=1000:1000 /build/GeoIP ./GeoIP/
COPY --from=builder --chown=1000:1000 /build/mempool-config.json /build/start.sh /build/wait-for-it.sh ./ COPY --from=builder --chown=1000:1000 /build/mempool-config.json /build/start.sh /build/wait-for-it.sh ./
USER 1000 USER 1000

View File

@@ -26,15 +26,13 @@
"ADVANCED_GBT_AUDIT": __MEMPOOL_ADVANCED_GBT_AUDIT__, "ADVANCED_GBT_AUDIT": __MEMPOOL_ADVANCED_GBT_AUDIT__,
"ADVANCED_GBT_MEMPOOL": __MEMPOOL_ADVANCED_GBT_MEMPOOL__, "ADVANCED_GBT_MEMPOOL": __MEMPOOL_ADVANCED_GBT_MEMPOOL__,
"CPFP_INDEXING": __MEMPOOL_CPFP_INDEXING__, "CPFP_INDEXING": __MEMPOOL_CPFP_INDEXING__,
"MAX_BLOCKS_BULK_QUERY": __MEMPOOL_MAX_BLOCKS_BULK_QUERY__, "MAX_BLOCKS_BULK_QUERY": __MEMPOOL_MAX_BLOCKS_BULK_QUERY__
"DISK_CACHE_BLOCK_INTERVAL": __MEMPOOL_DISK_CACHE_BLOCK_INTERVAL__
}, },
"CORE_RPC": { "CORE_RPC": {
"HOST": "__CORE_RPC_HOST__", "HOST": "__CORE_RPC_HOST__",
"PORT": __CORE_RPC_PORT__, "PORT": __CORE_RPC_PORT__,
"USERNAME": "__CORE_RPC_USERNAME__", "USERNAME": "__CORE_RPC_USERNAME__",
"PASSWORD": "__CORE_RPC_PASSWORD__", "PASSWORD": "__CORE_RPC_PASSWORD__"
"TIMEOUT": __CORE_RPC_TIMEOUT__
}, },
"ELECTRUM": { "ELECTRUM": {
"HOST": "__ELECTRUM_HOST__", "HOST": "__ELECTRUM_HOST__",
@@ -42,15 +40,13 @@
"TLS_ENABLED": __ELECTRUM_TLS_ENABLED__ "TLS_ENABLED": __ELECTRUM_TLS_ENABLED__
}, },
"ESPLORA": { "ESPLORA": {
"REST_API_URL": "__ESPLORA_REST_API_URL__", "REST_API_URL": "__ESPLORA_REST_API_URL__"
"UNIX_SOCKET_PATH": "__ESPLORA_UNIX_SOCKET_PATH__"
}, },
"SECOND_CORE_RPC": { "SECOND_CORE_RPC": {
"HOST": "__SECOND_CORE_RPC_HOST__", "HOST": "__SECOND_CORE_RPC_HOST__",
"PORT": __SECOND_CORE_RPC_PORT__, "PORT": __SECOND_CORE_RPC_PORT__,
"USERNAME": "__SECOND_CORE_RPC_USERNAME__", "USERNAME": "__SECOND_CORE_RPC_USERNAME__",
"PASSWORD": "__SECOND_CORE_RPC_PASSWORD__", "PASSWORD": "__SECOND_CORE_RPC_PASSWORD__"
"TIMEOUT": __SECOND_CORE_RPC_TIMEOUT__
}, },
"DATABASE": { "DATABASE": {
"ENABLED": __DATABASE_ENABLED__, "ENABLED": __DATABASE_ENABLED__,
@@ -87,8 +83,7 @@
"LND": { "LND": {
"TLS_CERT_PATH": "__LND_TLS_CERT_PATH__", "TLS_CERT_PATH": "__LND_TLS_CERT_PATH__",
"MACAROON_PATH": "__LND_MACAROON_PATH__", "MACAROON_PATH": "__LND_MACAROON_PATH__",
"REST_API_URL": "__LND_REST_API_URL__", "REST_API_URL": "__LND_REST_API_URL__"
"TIMEOUT": "__LND_TIMEOUT__"
}, },
"CLIGHTNING": { "CLIGHTNING": {
"SOCKET": "__CLIGHTNING_SOCKET__" "SOCKET": "__CLIGHTNING_SOCKET__"
@@ -114,7 +109,7 @@
"BISQ_ONION": "__EXTERNAL_DATA_SERVER_BISQ_ONION__" "BISQ_ONION": "__EXTERNAL_DATA_SERVER_BISQ_ONION__"
}, },
"MAXMIND": { "MAXMIND": {
"ENABLED": __MAXMIND_ENABLED__, "ENABLED": "__MAXMIND_ENABLED__",
"GEOLITE2_CITY": "__MAXMIND_GEOLITE2_CITY__", "GEOLITE2_CITY": "__MAXMIND_GEOLITE2_CITY__",
"GEOLITE2_ASN": "__MAXMIND_GEOLITE2_ASN__", "GEOLITE2_ASN": "__MAXMIND_GEOLITE2_ASN__",
"GEOIP2_ISP": "__MAXMIND_GEOIP2_ISP__" "GEOIP2_ISP": "__MAXMIND_GEOIP2_ISP__"

View File

@@ -30,14 +30,12 @@ __MEMPOOL_ADVANCED_GBT_AUDIT__=${MEMPOOL_ADVANCED_GBT_AUDIT:=false}
__MEMPOOL_ADVANCED_GBT_MEMPOOL__=${MEMPOOL_ADVANCED_GBT_MEMPOOL:=false} __MEMPOOL_ADVANCED_GBT_MEMPOOL__=${MEMPOOL_ADVANCED_GBT_MEMPOOL:=false}
__MEMPOOL_CPFP_INDEXING__=${MEMPOOL_CPFP_INDEXING:=false} __MEMPOOL_CPFP_INDEXING__=${MEMPOOL_CPFP_INDEXING:=false}
__MEMPOOL_MAX_BLOCKS_BULK_QUERY__=${MEMPOOL_MAX_BLOCKS_BULK_QUERY:=0} __MEMPOOL_MAX_BLOCKS_BULK_QUERY__=${MEMPOOL_MAX_BLOCKS_BULK_QUERY:=0}
__MEMPOOL_DISK_CACHE_BLOCK_INTERVAL__=${MEMPOOL_DISK_CACHE_BLOCK_INTERVAL:=6}
# CORE_RPC # CORE_RPC
__CORE_RPC_HOST__=${CORE_RPC_HOST:=127.0.0.1} __CORE_RPC_HOST__=${CORE_RPC_HOST:=127.0.0.1}
__CORE_RPC_PORT__=${CORE_RPC_PORT:=8332} __CORE_RPC_PORT__=${CORE_RPC_PORT:=8332}
__CORE_RPC_USERNAME__=${CORE_RPC_USERNAME:=mempool} __CORE_RPC_USERNAME__=${CORE_RPC_USERNAME:=mempool}
__CORE_RPC_PASSWORD__=${CORE_RPC_PASSWORD:=mempool} __CORE_RPC_PASSWORD__=${CORE_RPC_PASSWORD:=mempool}
__CORE_RPC_TIMEOUT__=${CORE_RPC_TIMEOUT:=60000}
# ELECTRUM # ELECTRUM
__ELECTRUM_HOST__=${ELECTRUM_HOST:=127.0.0.1} __ELECTRUM_HOST__=${ELECTRUM_HOST:=127.0.0.1}
@@ -46,14 +44,12 @@ __ELECTRUM_TLS_ENABLED__=${ELECTRUM_TLS_ENABLED:=false}
# ESPLORA # ESPLORA
__ESPLORA_REST_API_URL__=${ESPLORA_REST_API_URL:=http://127.0.0.1:3000} __ESPLORA_REST_API_URL__=${ESPLORA_REST_API_URL:=http://127.0.0.1:3000}
__ESPLORA_UNIX_SOCKET_PATH__=${ESPLORA_UNIX_SOCKET_PATH:=null}
# SECOND_CORE_RPC # SECOND_CORE_RPC
__SECOND_CORE_RPC_HOST__=${SECOND_CORE_RPC_HOST:=127.0.0.1} __SECOND_CORE_RPC_HOST__=${SECOND_CORE_RPC_HOST:=127.0.0.1}
__SECOND_CORE_RPC_PORT__=${SECOND_CORE_RPC_PORT:=8332} __SECOND_CORE_RPC_PORT__=${SECOND_CORE_RPC_PORT:=8332}
__SECOND_CORE_RPC_USERNAME__=${SECOND_CORE_RPC_USERNAME:=mempool} __SECOND_CORE_RPC_USERNAME__=${SECOND_CORE_RPC_USERNAME:=mempool}
__SECOND_CORE_RPC_PASSWORD__=${SECOND_CORE_RPC_PASSWORD:=mempool} __SECOND_CORE_RPC_PASSWORD__=${SECOND_CORE_RPC_PASSWORD:=mempool}
__SECOND_CORE_RPC_TIMEOUT__=${SECOND_CORE_RPC_TIMEOUT:=60000}
# DATABASE # DATABASE
__DATABASE_ENABLED__=${DATABASE_ENABLED:=true} __DATABASE_ENABLED__=${DATABASE_ENABLED:=true}
@@ -111,15 +107,14 @@ __LIGHTNING_LOGGER_UPDATE_INTERVAL__=${LIGHTNING_LOGGER_UPDATE_INTERVAL:=30}
__LND_TLS_CERT_PATH__=${LND_TLS_CERT_PATH:=""} __LND_TLS_CERT_PATH__=${LND_TLS_CERT_PATH:=""}
__LND_MACAROON_PATH__=${LND_MACAROON_PATH:=""} __LND_MACAROON_PATH__=${LND_MACAROON_PATH:=""}
__LND_REST_API_URL__=${LND_REST_API_URL:="https://localhost:8080"} __LND_REST_API_URL__=${LND_REST_API_URL:="https://localhost:8080"}
__LND_TIMEOUT__=${LND_TIMEOUT:=10000}
# CLN # CLN
__CLIGHTNING_SOCKET__=${CLIGHTNING_SOCKET:=""} __CLIGHTNING_SOCKET__=${CLIGHTNING_SOCKET:=""}
# MAXMIND # MAXMIND
__MAXMIND_ENABLED__=${MAXMIND_ENABLED:=true} __MAXMIND_ENABLED__=${MAXMIND_ENABLED:=true}
__MAXMIND_GEOLITE2_CITY__=${MAXMIND_GEOLITE2_CITY:="/backend/GeoIP/GeoLite2-City.mmdb"} __MAXMIND_GEOLITE2_CITY__=${MAXMIND_GEOLITE2_CITY:="./backend/GeoIP/GeoLite2-City.mmdb"}
__MAXMIND_GEOLITE2_ASN__=${MAXMIND_GEOLITE2_ASN:="/backend/GeoIP/GeoLite2-ASN.mmdb"} __MAXMIND_GEOLITE2_ASN__=${MAXMIND_GEOLITE2_ASN:="./backend/GeoIP/GeoLite2-ASN.mmdb"}
__MAXMIND_GEOIP2_ISP__=${MAXMIND_GEOIP2_ISP:=""} __MAXMIND_GEOIP2_ISP__=${MAXMIND_GEOIP2_ISP:=""}
@@ -154,26 +149,22 @@ sed -i "s!__MEMPOOL_ADVANCED_GBT_MEMPOOL__!${__MEMPOOL_ADVANCED_GBT_MEMPOOL__}!g
sed -i "s!__MEMPOOL_ADVANCED_GBT_AUDIT__!${__MEMPOOL_ADVANCED_GBT_AUDIT__}!g" mempool-config.json sed -i "s!__MEMPOOL_ADVANCED_GBT_AUDIT__!${__MEMPOOL_ADVANCED_GBT_AUDIT__}!g" mempool-config.json
sed -i "s!__MEMPOOL_CPFP_INDEXING__!${__MEMPOOL_CPFP_INDEXING__}!g" mempool-config.json sed -i "s!__MEMPOOL_CPFP_INDEXING__!${__MEMPOOL_CPFP_INDEXING__}!g" mempool-config.json
sed -i "s!__MEMPOOL_MAX_BLOCKS_BULK_QUERY__!${__MEMPOOL_MAX_BLOCKS_BULK_QUERY__}!g" mempool-config.json sed -i "s!__MEMPOOL_MAX_BLOCKS_BULK_QUERY__!${__MEMPOOL_MAX_BLOCKS_BULK_QUERY__}!g" mempool-config.json
sed -i "s!__MEMPOOL_DISK_CACHE_BLOCK_INTERVAL__!${__MEMPOOL_DISK_CACHE_BLOCK_INTERVAL__}!g" mempool-config.json
sed -i "s/__CORE_RPC_HOST__/${__CORE_RPC_HOST__}/g" mempool-config.json sed -i "s/__CORE_RPC_HOST__/${__CORE_RPC_HOST__}/g" mempool-config.json
sed -i "s/__CORE_RPC_PORT__/${__CORE_RPC_PORT__}/g" mempool-config.json sed -i "s/__CORE_RPC_PORT__/${__CORE_RPC_PORT__}/g" mempool-config.json
sed -i "s/__CORE_RPC_USERNAME__/${__CORE_RPC_USERNAME__}/g" mempool-config.json sed -i "s/__CORE_RPC_USERNAME__/${__CORE_RPC_USERNAME__}/g" mempool-config.json
sed -i "s/__CORE_RPC_PASSWORD__/${__CORE_RPC_PASSWORD__}/g" mempool-config.json sed -i "s/__CORE_RPC_PASSWORD__/${__CORE_RPC_PASSWORD__}/g" mempool-config.json
sed -i "s/__CORE_RPC_TIMEOUT__/${__CORE_RPC_TIMEOUT__}/g" mempool-config.json
sed -i "s/__ELECTRUM_HOST__/${__ELECTRUM_HOST__}/g" mempool-config.json sed -i "s/__ELECTRUM_HOST__/${__ELECTRUM_HOST__}/g" mempool-config.json
sed -i "s/__ELECTRUM_PORT__/${__ELECTRUM_PORT__}/g" mempool-config.json sed -i "s/__ELECTRUM_PORT__/${__ELECTRUM_PORT__}/g" mempool-config.json
sed -i "s/__ELECTRUM_TLS_ENABLED__/${__ELECTRUM_TLS_ENABLED__}/g" mempool-config.json sed -i "s/__ELECTRUM_TLS_ENABLED__/${__ELECTRUM_TLS_ENABLED__}/g" mempool-config.json
sed -i "s!__ESPLORA_REST_API_URL__!${__ESPLORA_REST_API_URL__}!g" mempool-config.json sed -i "s!__ESPLORA_REST_API_URL__!${__ESPLORA_REST_API_URL__}!g" mempool-config.json
sed -i "s!__ESPLORA_UNIX_SOCKET_PATH__!${__ESPLORA_UNIX_SOCKET_PATH__}!g" mempool-config.json
sed -i "s/__SECOND_CORE_RPC_HOST__/${__SECOND_CORE_RPC_HOST__}/g" mempool-config.json sed -i "s/__SECOND_CORE_RPC_HOST__/${__SECOND_CORE_RPC_HOST__}/g" mempool-config.json
sed -i "s/__SECOND_CORE_RPC_PORT__/${__SECOND_CORE_RPC_PORT__}/g" mempool-config.json sed -i "s/__SECOND_CORE_RPC_PORT__/${__SECOND_CORE_RPC_PORT__}/g" mempool-config.json
sed -i "s/__SECOND_CORE_RPC_USERNAME__/${__SECOND_CORE_RPC_USERNAME__}/g" mempool-config.json sed -i "s/__SECOND_CORE_RPC_USERNAME__/${__SECOND_CORE_RPC_USERNAME__}/g" mempool-config.json
sed -i "s/__SECOND_CORE_RPC_PASSWORD__/${__SECOND_CORE_RPC_PASSWORD__}/g" mempool-config.json sed -i "s/__SECOND_CORE_RPC_PASSWORD__/${__SECOND_CORE_RPC_PASSWORD__}/g" mempool-config.json
sed -i "s/__SECOND_CORE_RPC_TIMEOUT__/${__SECOND_CORE_RPC_TIMEOUT__}/g" mempool-config.json
sed -i "s/__DATABASE_ENABLED__/${__DATABASE_ENABLED__}/g" mempool-config.json sed -i "s/__DATABASE_ENABLED__/${__DATABASE_ENABLED__}/g" mempool-config.json
sed -i "s/__DATABASE_HOST__/${__DATABASE_HOST__}/g" mempool-config.json sed -i "s/__DATABASE_HOST__/${__DATABASE_HOST__}/g" mempool-config.json
@@ -225,7 +216,6 @@ sed -i "s!__LIGHTNING_LOGGER_UPDATE_INTERVAL__!${__LIGHTNING_LOGGER_UPDATE_INTER
sed -i "s!__LND_TLS_CERT_PATH__!${__LND_TLS_CERT_PATH__}!g" mempool-config.json sed -i "s!__LND_TLS_CERT_PATH__!${__LND_TLS_CERT_PATH__}!g" mempool-config.json
sed -i "s!__LND_MACAROON_PATH__!${__LND_MACAROON_PATH__}!g" mempool-config.json sed -i "s!__LND_MACAROON_PATH__!${__LND_MACAROON_PATH__}!g" mempool-config.json
sed -i "s!__LND_REST_API_URL__!${__LND_REST_API_URL__}!g" mempool-config.json sed -i "s!__LND_REST_API_URL__!${__LND_REST_API_URL__}!g" mempool-config.json
sed -i "s!__LND_TIMEOUT__!${__LND_TIMEOUT__}!g" mempool-config.json
# CLN # CLN
sed -i "s!__CLIGHTNING_SOCKET__!${__CLIGHTNING_SOCKET__}!g" mempool-config.json sed -i "s!__CLIGHTNING_SOCKET__!${__CLIGHTNING_SOCKET__}!g" mempool-config.json

View File

@@ -10,10 +10,6 @@ cp /etc/nginx/nginx.conf /patch/nginx.conf
sed -i "s/__MEMPOOL_FRONTEND_HTTP_PORT__/${__MEMPOOL_FRONTEND_HTTP_PORT__}/g" /patch/nginx.conf sed -i "s/__MEMPOOL_FRONTEND_HTTP_PORT__/${__MEMPOOL_FRONTEND_HTTP_PORT__}/g" /patch/nginx.conf
cat /patch/nginx.conf > /etc/nginx/nginx.conf cat /patch/nginx.conf > /etc/nginx/nginx.conf
if [ "${LIGHTNING_DETECTED_PORT}" != "" ];then
export LIGHTNING=true
fi
# Runtime overrides - read env vars defined in docker compose # Runtime overrides - read env vars defined in docker compose
__TESTNET_ENABLED__=${TESTNET_ENABLED:=false} __TESTNET_ENABLED__=${TESTNET_ENABLED:=false}

View File

@@ -4,7 +4,6 @@
cp ./docker/backend/* ./backend/ cp ./docker/backend/* ./backend/
#geoip-data #geoip-data
mkdir -p ./backend/GeoIP/
wget -O ./backend/GeoIP/GeoLite2-City.mmdb https://raw.githubusercontent.com/mempool/geoip-data/master/GeoLite2-City.mmdb wget -O ./backend/GeoIP/GeoLite2-City.mmdb https://raw.githubusercontent.com/mempool/geoip-data/master/GeoLite2-City.mmdb
wget -O ./backend/GeoIP/GeoLite2-ASN.mmdb https://raw.githubusercontent.com/mempool/geoip-data/master/GeoLite2-ASN.mmdb wget -O ./backend/GeoIP/GeoLite2-ASN.mmdb https://raw.githubusercontent.com/mempool/geoip-data/master/GeoLite2-ASN.mmdb

View File

@@ -106,7 +106,6 @@ https://www.transifex.com/mempool/mempool/dashboard/
* Arabic @baro0k * Arabic @baro0k
* Czech @pixelmade2 * Czech @pixelmade2
* Danish @pierrevendelboe
* German @Emzy * German @Emzy
* English (default) * English (default)
* Spanish @maxhodler @bisqes * Spanish @maxhodler @bisqes
@@ -114,7 +113,6 @@ https://www.transifex.com/mempool/mempool/dashboard/
* French @Bayernatoor * French @Bayernatoor
* Korean @kcalvinalvinn @sogoagain * Korean @kcalvinalvinn @sogoagain
* Italian @HodlBits * Italian @HodlBits
* Lithuanian @eimze21
* Hebrew @rapidlab309 * Hebrew @rapidlab309
* Georgian @wyd_idk * Georgian @wyd_idk
* Hungarian @btcdragonlord * Hungarian @btcdragonlord

View File

@@ -158,10 +158,10 @@ describe('Liquid', () => {
it('show empty unblinded TX', () => { it('show empty unblinded TX', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=`); cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('.table-tx-vin tr:nth-child(1)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vin tr:nth-child(1)').should('have.class', '');
cy.get('.table-tx-vin tr:nth-child(1) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vin tr:nth-child(1) .amount').should('contain.text', 'Confidential');
cy.get('.table-tx-vout tr:nth-child(1)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr:nth-child(1)').should('have.class', '');
cy.get('.table-tx-vout tr:nth-child(2)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr:nth-child(2)').should('have.class', '');
cy.get('.table-tx-vout tr:nth-child(1) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vout tr:nth-child(1) .amount').should('contain.text', 'Confidential');
cy.get('.table-tx-vout tr:nth-child(2) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vout tr:nth-child(2) .amount').should('contain.text', 'Confidential');
}); });
@@ -169,8 +169,8 @@ describe('Liquid', () => {
it('show invalid unblinded TX hex', () => { it('show invalid unblinded TX hex', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=123`); cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=123`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('.table-tx-vin tr').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vin tr').should('have.class', '');
cy.get('.table-tx-vout tr').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr').should('have.class', '');
cy.get('.error-unblinded').contains('Error: Invalid blinding data (invalid hex)'); cy.get('.error-unblinded').contains('Error: Invalid blinding data (invalid hex)');
}); });

View File

@@ -109,10 +109,10 @@ describe('Liquid Testnet', () => {
it('show empty unblinded TX', () => { it('show empty unblinded TX', () => {
cy.visit(`${basePath}/tx/c3d908ab77891e4c569b0df71aae90f4720b157019ebb20db176f4f9c4d626b8#blinded=`); cy.visit(`${basePath}/tx/c3d908ab77891e4c569b0df71aae90f4720b157019ebb20db176f4f9c4d626b8#blinded=`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('.table-tx-vin tr:nth-child(1)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vin tr:nth-child(1)').should('have.class', '');
cy.get('.table-tx-vin tr:nth-child(1) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vin tr:nth-child(1) .amount').should('contain.text', 'Confidential');
cy.get('.table-tx-vout tr:nth-child(1)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr:nth-child(1)').should('have.class', '');
cy.get('.table-tx-vout tr:nth-child(2)').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr:nth-child(2)').should('have.class', '');
cy.get('.table-tx-vout tr:nth-child(1) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vout tr:nth-child(1) .amount').should('contain.text', 'Confidential');
cy.get('.table-tx-vout tr:nth-child(2) .amount').should('contain.text', 'Confidential'); cy.get('.table-tx-vout tr:nth-child(2) .amount').should('contain.text', 'Confidential');
}); });
@@ -120,8 +120,8 @@ describe('Liquid Testnet', () => {
it('show invalid unblinded TX hex', () => { it('show invalid unblinded TX hex', () => {
cy.visit(`${basePath}/tx/2477f220eef1d03f8ffa4a2861c275d155c3562adf0d79523aeeb0c59ee611ba#blinded=5000`); cy.visit(`${basePath}/tx/2477f220eef1d03f8ffa4a2861c275d155c3562adf0d79523aeeb0c59ee611ba#blinded=5000`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('.table-tx-vin tr').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vin tr').should('have.class', '');
cy.get('.table-tx-vout tr').should('have.class', 'ng-star-inserted'); cy.get('.table-tx-vout tr').should('have.class', '');
cy.get('.error-unblinded').contains('Error: Invalid blinding data (invalid hex)'); cy.get('.error-unblinded').contains('Error: Invalid blinding data (invalid hex)');
}); });

View File

@@ -127,7 +127,7 @@ describe('Mainnet', () => {
cy.get('.search-box-container > .form-control').type('S').then(() => { cy.get('.search-box-container > .form-control').type('S').then(() => {
cy.wait('@search-1wizS'); cy.wait('@search-1wizS');
cy.get('app-search-results button.dropdown-item').should('have.length', 6); cy.get('app-search-results button.dropdown-item').should('have.length', 5);
}); });
cy.get('.search-box-container > .form-control').type('A').then(() => { cy.get('.search-box-container > .form-control').type('A').then(() => {

View File

@@ -1,12 +1,12 @@
{ {
"name": "mempool-frontend", "name": "mempool-frontend",
"version": "2.6.0-dev", "version": "2.5.0-dev",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mempool-frontend", "name": "mempool-frontend",
"version": "2.6.0-dev", "version": "2.5.0-dev",
"license": "GNU Affero General Public License v3.0", "license": "GNU Affero General Public License v3.0",
"dependencies": { "dependencies": {
"@angular-devkit/build-angular": "^14.2.10", "@angular-devkit/build-angular": "^14.2.10",

View File

@@ -1,6 +1,6 @@
{ {
"name": "mempool-frontend", "name": "mempool-frontend",
"version": "2.6.0-dev", "version": "2.5.0-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend", "description": "Bitcoin mempool visualizer and blockchain explorer backend",
"license": "GNU Affero General Public License v3.0", "license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space", "homepage": "https://mempool.space",

View File

@@ -201,12 +201,12 @@
<span>Umbrel</span> <span>Umbrel</span>
</a> </a>
<a href="https://github.com/rootzoll/raspiblitz" target="_blank" title="RaspiBlitz"> <a href="https://github.com/rootzoll/raspiblitz" target="_blank" title="RaspiBlitz">
<img class="image" src="/resources/profile/raspiblitz.svg" /> <img class="image" src="/resources/profile/raspiblitz.jpg" />
<span>RaspiBlitz</span> <span>RaspiBlitz</span>
</a> </a>
<a href="https://github.com/mynodebtc/mynode" target="_blank" title="myNode"> <a href="https://github.com/mynodebtc/mynode" target="_blank" title="MyNode">
<img class="image" src="/resources/profile/mynodebtc.png" /> <img class="image" src="/resources/profile/mynodebtc.jpg" />
<span>myNode</span> <span>MyNode</span>
</a> </a>
<a href="https://github.com/RoninDojo/RoninDojo" target="_blank" title="RoninDojo"> <a href="https://github.com/RoninDojo/RoninDojo" target="_blank" title="RoninDojo">
<img class="image" src="/resources/profile/ronindojo.png" /> <img class="image" src="/resources/profile/ronindojo.png" />
@@ -253,7 +253,7 @@
<span>Sparrow</span> <span>Sparrow</span>
</a> </a>
<a href="https://github.com/ACINQ/phoenix" target="_blank" title="Phoenix Wallet by ACINQ"> <a href="https://github.com/ACINQ/phoenix" target="_blank" title="Phoenix Wallet by ACINQ">
<img class="image not-rounded" src="/resources/profile/phoenix.svg" /> <img class="image" src="/resources/profile/phoenix.jpg" />
<span>Phoenix</span> <span>Phoenix</span>
</a> </a>
<a href="https://github.com/lnbits/lnbits-legend" target="_blank" title="LNbits"> <a href="https://github.com/lnbits/lnbits-legend" target="_blank" title="LNbits">

View File

@@ -23,7 +23,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
@Input() unavailable: boolean = false; @Input() unavailable: boolean = false;
@Input() auditHighlighting: boolean = false; @Input() auditHighlighting: boolean = false;
@Input() blockConversion: Price; @Input() blockConversion: Price;
@Output() txClickEvent = new EventEmitter<{ tx: TransactionStripped, keyModifier: boolean}>(); @Output() txClickEvent = new EventEmitter<TransactionStripped>();
@Output() txHoverEvent = new EventEmitter<string>(); @Output() txHoverEvent = new EventEmitter<string>();
@Output() readyEvent = new EventEmitter(); @Output() readyEvent = new EventEmitter();
@@ -326,9 +326,7 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
if (event.target === this.canvas.nativeElement && event.pointerType === 'touch') { if (event.target === this.canvas.nativeElement && event.pointerType === 'touch') {
this.setPreviewTx(event.offsetX, event.offsetY, true); this.setPreviewTx(event.offsetX, event.offsetY, true);
} else if (event.target === this.canvas.nativeElement) { } else if (event.target === this.canvas.nativeElement) {
const keyMod = event.shiftKey || event.ctrlKey || event.metaKey; this.onTxClick(event.offsetX, event.offsetY);
const middleClick = event.which === 2 || event.button === 1;
this.onTxClick(event.offsetX, event.offsetY, keyMod || middleClick);
} }
} }
@@ -411,12 +409,12 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
} }
} }
onTxClick(cssX: number, cssY: number, keyModifier: boolean = false) { onTxClick(cssX: number, cssY: number) {
const x = cssX * window.devicePixelRatio; const x = cssX * window.devicePixelRatio;
const y = cssY * window.devicePixelRatio; const y = cssY * window.devicePixelRatio;
const selected = this.scene.getTxAt({ x, y }); const selected = this.scene.getTxAt({ x, y });
if (selected && selected.txid) { if (selected && selected.txid) {
this.txClickEvent.emit({ tx: selected, keyModifier }); this.txClickEvent.emit(selected);
} }
} }

View File

@@ -612,13 +612,9 @@ export class BlockComponent implements OnInit, OnDestroy {
}); });
} }
onTxClick(event: { tx: TransactionStripped, keyModifier: boolean }): void { onTxClick(event: TransactionStripped): void {
const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.tx.txid}`); const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.txid}`);
if (!event.keyModifier) { this.router.navigate([url]);
this.router.navigate([url]);
} else {
window.open(url, '_blank');
}
} }
onTxHover(txid: string): void { onTxHover(txid: string): void {

View File

@@ -25,7 +25,7 @@
</ng-template> </ng-template>
<div [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-fee-span'" class="fee-span" <div [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-fee-span'" class="fee-span"
*ngIf="block?.extras?.feeRange; else emptyfeespan"> *ngIf="block?.extras?.feeRange; else emptyfeespan">
{{ block?.extras?.feeRange?.[0] | number:feeRounding }} - {{ {{ block?.extras?.feeRange?.[1] | number:feeRounding }} - {{
block?.extras?.feeRange[block?.extras?.feeRange?.length - 1] | number:feeRounding }} <ng-container block?.extras?.feeRange[block?.extras?.feeRange?.length - 1] | number:feeRounding }} <ng-container
i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container> i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
</div> </div>

View File

@@ -26,7 +26,7 @@
</thead> </thead>
<tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''"> <tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''">
<tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock"> <tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
<td class="height text-left" [class]="widget ? 'widget' : ''"> <td class="text-left" [class]="widget ? 'widget' : ''">
<a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a> <a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a>
</td> </td>
<td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"> <td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
@@ -89,6 +89,7 @@
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"> <td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<img width="1" height="25" style="opacity: 0">
<span class="skeleton-loader" style="max-width: 125px"></span> <span class="skeleton-loader" style="max-width: 125px"></span>
</td> </td>
<td class="timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'"> <td class="timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
@@ -97,7 +98,7 @@
<td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'"> <td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<span class="skeleton-loader" style="max-width: 125px"></span> <span class="skeleton-loader" style="max-width: 125px"></span>
</td> </td>
<td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"> <td *ngIf="auditAvailable" class="health text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"> <td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">

View File

@@ -51,12 +51,7 @@ tr, td, th {
.pool.widget { .pool.widget {
width: 40%; width: 40%;
padding-left: 24px; padding-left: 24px;
@media (min-width: 768px) AND (max-width: 926px) { @media (max-width: 376px) {
padding-left: 0px;
width: 60%;
}
@media (max-width: 430px) {
padding-left: 0px;
width: 60%; width: 60%;
} }
} }
@@ -64,10 +59,6 @@ tr, td, th {
display: inline-block; display: inline-block;
vertical-align: text-top; vertical-align: text-top;
padding-left: 10px; padding-left: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 160px;
} }
.height { .height {
@@ -78,12 +69,6 @@ tr, td, th {
@media (max-width: 576px) { @media (max-width: 576px) {
width: 10%; width: 10%;
} }
@media (min-width: 768px) AND (max-width: 926px) {
width: 30%;
}
@media (max-width: 430px) {
width: 30%;
}
} }
.height.legacy { .height.legacy {
width: 15%; width: 15%;
@@ -107,7 +92,7 @@ tr, td, th {
.mined { .mined {
width: 13%; width: 13%;
@media (max-width: 730px) { @media (max-width: 576px) {
display: none; display: none;
} }
} }
@@ -153,7 +138,7 @@ tr, td, th {
.fees { .fees {
width: 8%; width: 8%;
@media (max-width: 820px) { @media (max-width: 650px) {
display: none; display: none;
} }
} }
@@ -178,16 +163,6 @@ tr, td, th {
width: 30%; width: 30%;
padding-right: 0; padding-right: 0;
} }
@media (min-width: 768px) AND (max-width: 926px) {
overflow: hidden;
text-overflow: ellipsis;
max-width: 90px;
}
@media (max-width: 430px) {
overflow: hidden;
text-overflow: ellipsis;
max-width: 90px;
}
} }
.size { .size {
@@ -214,10 +189,10 @@ tr, td, th {
.health { .health {
width: 10%; width: 10%;
@media (max-width: 1105px) { @media (max-width: 1000px) {
width: 13%; width: 13%;
} }
@media (max-width: 560px) { @media (max-width: 950px) {
display: none; display: none;
} }
@@ -227,7 +202,7 @@ tr, td, th {
} }
.health.widget { .health.widget {
width: 25%; width: 25%;
@media (max-width: 1105px) { @media (max-width: 1000px) {
display: none; display: none;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
@@ -267,4 +242,4 @@ tr, td, th {
vertical-align: middle; vertical-align: middle;
max-width: 50vw; max-width: 50vw;
text-align: left; text-align: left;
} }

View File

@@ -2,18 +2,17 @@
<table class="table latest-adjustments"> <table class="table latest-adjustments">
<thead> <thead>
<tr> <tr>
<th class="" i18n="block.height">Height</th> <th class="d-none d-md-block" i18n="block.height">Height</th>
<th class="date text-left" i18n="mining.adjusted">Adjusted</th> <th i18n="mining.adjusted" class="text-left">Adjusted</th>
<th class="text-right" i18n="mining.difficulty">Difficulty</th> <th i18n="mining.difficulty" class="text-right">Difficulty</th>
<th class="text-right" i18n="mining.change">Change</th> <th i18n="mining.change" class="text-right">Change</th>
</tr> </tr>
</thead> </thead>
<tbody *ngIf="(hashrateObservable$ | async) as data"> <tbody *ngIf="(hashrateObservable$ | async) as data">
<tr *ngFor="let diffChange of data"> <tr *ngFor="let diffChange of data">
<td class=""> <td class="d-none d-md-block"><a [routerLink]="['/block' | relativeUrl, diffChange.height]">{{ diffChange.height
<a [routerLink]="['/block' | relativeUrl, diffChange.height]">{{ diffChange.height }}</a> }}</a></td>
</td> <td class="text-left">
<td class="date text-left">
<app-time kind="since" [time]="diffChange.timestamp" [fastRender]="true"></app-time> <app-time kind="since" [time]="diffChange.timestamp" [fastRender]="true"></app-time>
</td> </td>
<td class="text-right">{{ diffChange.difficultyShorten }}</td> <td class="text-right">{{ diffChange.difficultyShorten }}</td>
@@ -24,8 +23,8 @@
</tbody> </tbody>
<tbody *ngIf="isLoading"> <tbody *ngIf="isLoading">
<tr *ngFor="let item of [1,2,3,4,5,6]"> <tr *ngFor="let item of [1,2,3,4,5,6]">
<td class=""><span class="skeleton-loader"></span></td> <td class="d-none d-md-block w-75"><span class="skeleton-loader"></span></td>
<td class="date text-left"><span class="skeleton-loader w-75"></span></td> <td class="text-left"><span class="skeleton-loader w-75"></span></td>
<td class="text-right"><span class="skeleton-loader w-75"></span></td> <td class="text-right"><span class="skeleton-loader w-75"></span></td>
<td class="text-right"><span class="skeleton-loader w-75"></span></td> <td class="text-right"><span class="skeleton-loader w-75"></span></td>
</tr> </tr>

View File

@@ -17,12 +17,3 @@
} }
} }
} }
.date {
@media (min-width: 767px) AND (max-width: 991px) {
display: none;
}
@media (max-width: 500px) {
display: none;
}
}

View File

@@ -47,8 +47,7 @@
</div> </div>
</div> </div>
<div class="item" *ngIf="showHalving"> <div class="item" *ngIf="showHalving">
<h5 class="card-title" i18n="difficulty-box.next-halving" i18n-ngbTooltip="difficulty-box.next-halving" <h5 class="card-title" i18n="difficulty-box.next-halving">Next Halving</h5>
ngbTooltip="Next Halving" placement="bottom" #averagefee [disableTooltip]="!isEllipsisActive(averagefee)">Next Halving</h5>
<div class="card-text"> <div class="card-text">
<ng-container *ngTemplateOutlet="epochData.blocksUntilHalving === 1 ? blocksSingular : blocksPlural; context: {$implicit: epochData.blocksUntilHalving }"></ng-container> <ng-container *ngTemplateOutlet="epochData.blocksUntilHalving === 1 ? blocksSingular : blocksPlural; context: {$implicit: epochData.blocksUntilHalving }"></ng-container>
<ng-template #blocksPlural let-i i18n="shared.blocks">{{ i }} <span class="shared-block">blocks</span></ng-template> <ng-template #blocksPlural let-i i18n="shared.blocks">{{ i }} <span class="shared-block">blocks</span></ng-template>
@@ -78,7 +77,7 @@
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<h5 class="card-title" i18n="difficulty-box.next-halving">Next Halving</h5> <h5 class="card-title" i18n="difficulty-box.current-period">Current Period</h5>
<div class="card-text"> <div class="card-text">
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>

View File

@@ -10,7 +10,6 @@
.item { .item {
padding: 0 5px; padding: 0 5px;
width: 100%; width: 100%;
max-width: 150px;
&:nth-child(1) { &:nth-child(1) {
display: none; display: none;
@media (min-width: 485px) { @media (min-width: 485px) {
@@ -86,9 +85,6 @@
.card-title { .card-title {
color: #4a68b9; color: #4a68b9;
font-size: 1rem; font-size: 1rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.progress { .progress {
@@ -156,5 +152,4 @@
.symbol { .symbol {
font-size: 13px; font-size: 13px;
white-space: nowrap;
} }

View File

@@ -83,8 +83,4 @@ export class DifficultyMiningComponent implements OnInit {
}) })
); );
} }
isEllipsisActive(e): boolean {
return (e.offsetWidth < e.scrollWidth);
}
} }

View File

@@ -42,7 +42,7 @@
<div class="symbol" i18n="difficulty-box.average-block-time">Average block time</div> <div class="symbol" i18n="difficulty-box.average-block-time">Average block time</div>
</div> </div>
<div class="item"> <div class="item">
<div *ngIf="epochData.remainingBlocks < 1870; else recentlyAdjusted" class="card-text bigger" [ngStyle]="{'color': epochData.colorAdjustments}"> <div *ngIf="epochData.remainingBlocks < 1870; else recentlyAdjusted" class="card-text" [ngStyle]="{'color': epochData.colorAdjustments}">
<span *ngIf="epochData.change > 0; else arrowDownDifficulty" > <span *ngIf="epochData.change > 0; else arrowDownDifficulty" >
<fa-icon class="retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon> <fa-icon class="retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon>
</span> </span>

View File

@@ -30,14 +30,9 @@
} }
} }
.card-text { .card-text {
font-size: 18px; font-size: 20px;
margin: auto; margin: auto;
position: relative; position: relative;
margin-bottom: 0.2rem;
&.bigger {
font-size: 20px;
margin-bottom: 0;
}
} }
} }
@@ -165,7 +160,6 @@
.symbol { .symbol {
font-size: 13px; font-size: 13px;
white-space: nowrap;
} }
.epoch-progress { .epoch-progress {

View File

@@ -90,8 +90,6 @@
</nav> </nav>
</header> </header>
<app-testnet-alert *ngIf="network.val === 'liquidtestnet'"></app-testnet-alert>
<br /> <br />
<router-outlet></router-outlet> <router-outlet></router-outlet>

View File

@@ -62,8 +62,6 @@
</nav> </nav>
</header> </header>
<app-testnet-alert *ngIf="network.val === 'testnet' || network.val === 'signet'"></app-testnet-alert>
<br /> <br />
<router-outlet></router-outlet> <router-outlet></router-outlet>

View File

@@ -192,4 +192,4 @@ nav {
margin: 33px 0px 0px -19px; margin: 33px 0px 0px -19px;
font-size: 7px; font-size: 7px;
} }
} }

View File

@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { Env, StateService } from '../../services/state.service'; import { Env, StateService } from '../../services/state.service';
import { Observable, merge, of } from 'rxjs'; import { Observable, merge, of } from 'rxjs';
import { LanguageService } from '../../services/language.service'; import { LanguageService } from '../../services/language.service';

View File

@@ -107,12 +107,8 @@ export class MempoolBlockOverviewComponent implements OnInit, OnDestroy, OnChang
this.isLoading$.next(false); this.isLoading$.next(false);
} }
onTxClick(event: { tx: TransactionStripped, keyModifier: boolean }): void { onTxClick(event: TransactionStripped): void {
const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.tx.txid}`); const url = new RelativeUrlPipe(this.stateService).transform(`/tx/${event.txid}`);
if (!event.keyModifier) { this.router.navigate([url]);
this.router.navigate([url]);
} else {
window.open(url, '_blank');
}
} }
} }

View File

@@ -32,7 +32,7 @@
</div> </div>
<div class="card-header" *ngIf="!widget"> <div class="card-header" *ngIf="!widget">
<div class="d-flex d-md-table-cell align-items-baseline"> <div class="d-flex d-md-block align-items-baseline">
<span i18n="mining.pools">Pools Ranking</span> <span i18n="mining.pools">Pools Ranking</span>
<button class="btn p-0 pl-2" style="margin: 0 0 4px 0px" (click)="onSaveChart()"> <button class="btn p-0 pl-2" style="margin: 0 0 4px 0px" (click)="onSaveChart()">
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon> <fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
@@ -87,19 +87,19 @@
<table *ngIf="widget === false" class="table table-borderless text-center pools-table"> <table *ngIf="widget === false" class="table table-borderless text-center pools-table">
<thead> <thead>
<tr> <tr>
<th class="d-none d-md-table-cell" i18n="mining.rank">Rank</th> <th class="d-none d-md-block" i18n="mining.rank">Rank</th>
<th class=""></th> <th class=""></th>
<th class="" i18n="mining.pool-name">Pool</th> <th class="" i18n="mining.pool-name">Pool</th>
<th class="" *ngIf="this.miningWindowPreference === '24h'" i18n="mining.hashrate">Hashrate</th> <th class="" *ngIf="this.miningWindowPreference === '24h'" i18n="mining.hashrate">Hashrate</th>
<th class="" i18n="master-page.blocks">Blocks</th> <th class="" i18n="master-page.blocks">Blocks</th>
<th *ngIf="auditAvailable" class="health text-right widget" i18n="latest-blocks.avg_health" <th *ngIf="auditAvailable" class="health text-right widget" i18n="latest-blocks.avg_health"
i18n-ngbTooltip="latest-blocks.avg_health" ngbTooltip="Avg Health" placement="bottom" #health [disableTooltip]="!isEllipsisActive(health)">Avg Health</th> i18n-ngbTooltip="latest-blocks.avg_health" ngbTooltip="Avg Health" placement="bottom" #health [disableTooltip]="!isEllipsisActive(health)">Avg Health</th>
<th class="d-none d-md-table-cell" i18n="mining.empty-blocks">Empty blocks</th> <th class="d-none d-md-block" i18n="mining.empty-blocks">Empty blocks</th>
</tr> </tr>
</thead> </thead>
<tbody [attr.data-cy]="'pools-table'" *ngIf="(miningStatsObservable$ | async) as miningStats"> <tbody [attr.data-cy]="'pools-table'" *ngIf="(miningStatsObservable$ | async) as miningStats">
<tr *ngFor="let pool of miningStats.pools"> <tr *ngFor="let pool of miningStats.pools">
<td class="d-none d-md-table-cell">{{ pool.rank }}</td> <td class="d-none d-md-block">{{ pool.rank }}</td>
<td class="text-right"> <td class="text-right">
<img width="25" height="25" src="{{ pool.logo }}" [alt]="pool.name + ' mining pool logo'" onError="this.src = '/resources/mining-pools/default.svg'"> <img width="25" height="25" src="{{ pool.logo }}" [alt]="pool.name + ' mining pool logo'" onError="this.src = '/resources/mining-pools/default.svg'">
</td> </td>
@@ -107,7 +107,7 @@
<td class="" *ngIf="this.miningWindowPreference === '24h'">{{ pool.lastEstimatedHashrate }} {{ <td class="" *ngIf="this.miningWindowPreference === '24h'">{{ pool.lastEstimatedHashrate }} {{
miningStats.miningUnits.hashrateUnit }}</td> miningStats.miningUnits.hashrateUnit }}</td>
<td class="d-flex justify-content-center"> <td class="d-flex justify-content-center">
{{ pool.blockCount }}<span class="d-none d-md-table-cell">&nbsp;({{ pool.share }}%)</span> {{ pool.blockCount }}<span class="d-none d-md-block">&nbsp;({{ pool.share }}%)</span>
</td> </td>
<td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"> <td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<a <a
@@ -121,16 +121,16 @@
<span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span> <span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span>
</ng-template> </ng-template>
</td> </td>
<td class="d-none d-md-table-cell">{{ pool.emptyBlocks }} ({{ pool.emptyBlockRatio }}%)</td> <td class="d-none d-md-block">{{ pool.emptyBlocks }} ({{ pool.emptyBlockRatio }}%)</td>
</tr> </tr>
<tr style="border-top: 1px solid #555"> <tr style="border-top: 1px solid #555">
<td class="d-none d-md-table-cell"></td> <td class="d-none d-md-block"></td>
<td class="text-right"></td> <td class="text-right"></td>
<td class=""><b i18n="mining.all-miners">All miners</b></td> <td class=""><b i18n="mining.all-miners">All miners</b></td>
<td class="" *ngIf="this.miningWindowPreference === '24h'"><b>{{ miningStats.lastEstimatedHashrate}} {{ <td class="" *ngIf="this.miningWindowPreference === '24h'"><b>{{ miningStats.lastEstimatedHashrate}} {{
miningStats.miningUnits.hashrateUnit }}</b></td> miningStats.miningUnits.hashrateUnit }}</b></td>
<td class=""><b>{{ miningStats.blockCount }}</b></td> <td class=""><b>{{ miningStats.blockCount }}</b></td>
<td class="d-none d-md-table-cell"><b>{{ miningStats.totalEmptyBlock }} ({{ miningStats.totalEmptyBlockRatio <td class="d-none d-md-block"><b>{{ miningStats.totalEmptyBlock }} ({{ miningStats.totalEmptyBlockRatio
}}%)</b></td> }}%)</b></td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -94,13 +94,13 @@
<tr> <tr>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.reward">Reward</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.reward">Reward</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.hashrate">Hashrate (24h)</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.hashrate">Hashrate (24h)</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="latest-blocks.avg_health" *ngIf="auditAvailable">Avg Health</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="latest-blocks.avg_health">Avg Health</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<td class="text-center"><app-amount [satoshis]="poolStats.totalReward" digitsInfo="1.0-0" [noFiat]="true"></app-amount></td> <td class="text-center"><app-amount [satoshis]="poolStats.totalReward" digitsInfo="1.0-0" [noFiat]="true"></app-amount></td>
<td class="text-center">{{ poolStats.estimatedHashrate | amountShortener : 1 : 'H/s' }}</td> <td class="text-center">{{ poolStats.estimatedHashrate | amountShortener : 1 : 'H/s' }}</td>
<td class="text-center" *ngIf="auditAvailable; else emptyTd"><span class="health-badge badge" [class.badge-success]="poolStats.avgBlockHealth >= 99" <td class="text-center"><span class="health-badge badge" [class.badge-success]="poolStats.avgBlockHealth >= 99"
[class.badge-warning]="poolStats.avgBlockHealth >= 75 && poolStats.avgBlockHealth < 99" [class.badge-danger]="poolStats.avgBlockHealth < 75" [class.badge-warning]="poolStats.avgBlockHealth >= 75 && poolStats.avgBlockHealth < 99" [class.badge-danger]="poolStats.avgBlockHealth < 75"
*ngIf="poolStats.avgBlockHealth != null; else nullHealth">{{ poolStats.avgBlockHealth }}%</span> *ngIf="poolStats.avgBlockHealth != null; else nullHealth">{{ poolStats.avgBlockHealth }}%</span>
<ng-template #nullHealth> <ng-template #nullHealth>
@@ -119,13 +119,13 @@
<tr> <tr>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.reward">Reward</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.reward">Reward</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.hashrate">Hashrate (24h)</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.hashrate">Hashrate (24h)</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="latest-blocks.avg_health" *ngIf="auditAvailable">Avg Health</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="latest-blocks.avg_health">Avg Health</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<td class="text-center"><app-amount [satoshis]="poolStats.totalReward" digitsInfo="1.0-0" [noFiat]="true"></app-amount></td> <td class="text-center"><app-amount [satoshis]="poolStats.totalReward" digitsInfo="1.0-0" [noFiat]="true"></app-amount></td>
<td class="text-center">{{ poolStats.estimatedHashrate | amountShortener : 1 : 'H/s' }}</td> <td class="text-center">{{ poolStats.estimatedHashrate | amountShortener : 1 : 'H/s' }}</td>
<td *ngIf="auditAvailable; else emptyTd" class="text-center"><span class="health-badge badge" [class.badge-success]="poolStats.avgBlockHealth >= 99" <td class="text-center"><span class="health-badge badge" [class.badge-success]="poolStats.avgBlockHealth >= 99"
[class.badge-warning]="poolStats.avgBlockHealth >= 75 && poolStats.avgBlockHealth < 99" [class.badge-danger]="poolStats.avgBlockHealth < 75" [class.badge-warning]="poolStats.avgBlockHealth >= 75 && poolStats.avgBlockHealth < 99" [class.badge-danger]="poolStats.avgBlockHealth < 75"
*ngIf="poolStats.avgBlockHealth != null; else nullHealth">{{ poolStats.avgBlockHealth }}%</span> *ngIf="poolStats.avgBlockHealth != null; else nullHealth">{{ poolStats.avgBlockHealth }}%</span>
<ng-template #nullHealth> <ng-template #nullHealth>
@@ -384,7 +384,7 @@
<tr> <tr>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.total-reward">Reward</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.total-reward">Reward</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.estimated">Hashrate (24h)</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.estimated">Hashrate (24h)</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.luck" *ngIf="auditAvailable">Avg Health</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.luck">Avg Health</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -394,7 +394,7 @@
<td class="text-center"> <td class="text-center">
<div class="skeleton-loader data"></div> <div class="skeleton-loader data"></div>
</td> </td>
<td class="text-center" *ngIf="auditAvailable"> <td class="text-center">
<div class="skeleton-loader data"></div> <div class="skeleton-loader data"></div>
</td> </td>
</tbody> </tbody>
@@ -409,7 +409,7 @@
<tr> <tr>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.total-reward">Reward</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.total-reward">Reward</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.estimated">Hashrate (24h)</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.estimated">Hashrate (24h)</th>
<th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.luck" *ngIf="auditAvailable">Avg Health</th> <th scope="col" class="block-count-title text-center" style="width: 33%" i18n="mining.luck">Avg Health</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -419,7 +419,7 @@
<td class="text-center"> <td class="text-center">
<div class="skeleton-loader data"></div> <div class="skeleton-loader data"></div>
</td> </td>
<td class="text-center" *ngIf="auditAvailable"> <td class="text-center">
<div class="skeleton-loader data"></div> <div class="skeleton-loader data"></div>
</td> </td>
</tbody> </tbody>
@@ -485,8 +485,4 @@
</div> </div>
</div> </div>
</div> </div>
</ng-template>
<ng-template #emptyTd>
<td class="text-center"></td>
</ng-template> </ng-template>

View File

@@ -50,14 +50,14 @@
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<h5 class="card-title" i18n="mining.fees-per-block">Avg Block Fees</h5> <h5 class="card-title" i18n="mining.rewards-per-tx">Reward Per Tx</h5>
<div class="card-text"> <div class="card-text">
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<h5 class="card-title" i18n="mining.average-fee">Avg Tx Fee</h5> <h5 class="card-title" i18n="mining.average-fee">Reward Per Tx</h5>
<div class="card-text"> <div class="card-text">
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>
<div class="skeleton-loader"></div> <div class="skeleton-loader"></div>

View File

@@ -8,7 +8,10 @@
</div> </div>
<div *ngIf="network !== 'liquid' && network !== 'liquidtestnet'" class="features"> <div *ngIf="network !== 'liquid' && network !== 'liquidtestnet'" class="features">
<app-tx-features [tx]="tx"></app-tx-features> <app-tx-features [tx]="tx"></app-tx-features>
<span *ngIf="cpfpInfo && (cpfpInfo?.bestDescendant || cpfpInfo?.descendants?.length || cpfpInfo?.ancestors?.length)" class="badge badge-primary ml-1 mr-1"> <span *ngIf="cpfpInfo && (cpfpInfo.bestDescendant || cpfpInfo.descendants.length)" class="badge badge-primary mr-1">
CPFP
</span>
<span *ngIf="cpfpInfo && !cpfpInfo.bestDescendant && !cpfpInfo.descendants.length && cpfpInfo.ancestors.length" class="badge badge-info mr-1">
CPFP CPFP
</span> </span>
</div> </div>

View File

@@ -1,5 +1,3 @@
<div infiniteScroll [alwaysCallback]="true" [infiniteScrollDistance]="2" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="onScroll()">
<ng-container *ngFor="let tx of transactions; let i = index; trackBy: trackByFn"> <ng-container *ngFor="let tx of transactions; let i = index; trackBy: trackByFn">
<div *ngIf="!transactionPage" class="header-bg box tx-page-container"> <div *ngIf="!transactionPage" class="header-bg box tx-page-container">
<a class="tx-link" [routerLink]="['/tx/' | relativeUrl, tx.txid]"> <a class="tx-link" [routerLink]="['/tx/' | relativeUrl, tx.txid]">
@@ -13,7 +11,7 @@
</div> </div>
</div> </div>
<div class="header-bg box" [attr.data-cy]="'tx-' + i"> <div class="header-bg box" infiniteScroll [alwaysCallback]="true" [infiniteScrollDistance]="2" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [attr.data-cy]="'tx-' + i">
<div *ngIf="errorUnblinded" class="error-unblinded">{{ errorUnblinded }}</div> <div *ngIf="errorUnblinded" class="error-unblinded">{{ errorUnblinded }}</div>
<div class="row"> <div class="row">
@@ -323,8 +321,6 @@
</ng-container> </ng-container>
</div>
<ng-template #assetBox let-item> <ng-template #assetBox let-item>
{{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }} {{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }}
<br /> <br />

View File

@@ -182,7 +182,14 @@ export class TransactionsListComponent implements OnInit, OnChanges {
} }
onScroll(): void { onScroll(): void {
this.loadMore.emit(); const scrollHeight = document.body.scrollHeight;
const scrollTop = document.documentElement.scrollTop;
if (scrollHeight > 0){
const percentageScrolled = scrollTop * 100 / scrollHeight;
if (percentageScrolled > 70){
this.loadMore.emit();
}
}
} }
haveBlindedOutputValues(tx: Transaction): boolean { haveBlindedOutputValues(tx: Transaction): boolean {

View File

@@ -29,7 +29,7 @@
<ng-template #pegout> <ng-template #pegout>
<ng-container *ngIf="line.pegout; else normal"> <ng-container *ngIf="line.pegout; else normal">
<p *ngIf="!isConnector">Peg Out</p> <p *ngIf="!isConnector">Peg Out</p>
<p *ngIf="line.displayValue != null"><app-amount [satoshis]="line.displayValue"></app-amount></p> <p *ngIf="line.value != null"><app-amount [satoshis]="line.value"></app-amount></p>
<p class="address"> <p class="address">
<app-truncate [text]="line.pegout"></app-truncate> <app-truncate [text]="line.pegout"></app-truncate>
</p> </p>
@@ -55,18 +55,18 @@
<p *ngSwitchCase="'output'"><span i18n="transaction.input">Input</span>&nbsp; #{{ line.vin + 1 }}</p> <p *ngSwitchCase="'output'"><span i18n="transaction.input">Input</span>&nbsp; #{{ line.vin + 1 }}</p>
</ng-container> </ng-container>
</ng-container> </ng-container>
<p *ngIf="line.displayValue == null && line.confidential" i18n="shared.confidential">Confidential</p> <p *ngIf="line.value == null && line.confidential" i18n="shared.confidential">Confidential</p>
<p *ngIf="line.displayValue != null"> <p *ngIf="line.value != null">
<ng-template [ngIf]="line.asset && line.asset !== nativeAssetId" [ngIfElse]="defaultOutput"> <ng-template [ngIf]="line.asset && line.asset !== nativeAssetId" [ngIfElse]="defaultOutput">
<div *ngIf="assetsMinimal && assetsMinimal[line.asset] else assetNotFound"> <div *ngIf="assetsMinimal && assetsMinimal[line.asset] else assetNotFound">
<ng-container *ngTemplateOutlet="assetBox; context:{ $implicit: line }"></ng-container> <ng-container *ngTemplateOutlet="assetBox; context:{ $implicit: line }"></ng-container>
</div> </div>
<ng-template #assetNotFound> <ng-template #assetNotFound>
{{ line.displayValue }} <span class="symbol">{{ line.asset | slice : 0 : 7 }}</span> {{ line.value }} <span class="symbol">{{ line.asset | slice : 0 : 7 }}</span>
</ng-template> </ng-template>
</ng-template> </ng-template>
<ng-template #defaultOutput> <ng-template #defaultOutput>
<app-amount [blockConversion]="blockConversion" [satoshis]="line.displayValue"></app-amount> <app-amount [blockConversion]="blockConversion" [satoshis]="line.value"></app-amount>
</ng-template> </ng-template>
</p> </p>
<p *ngIf="line.type !== 'fee' && line.address" class="address"> <p *ngIf="line.type !== 'fee' && line.address" class="address">
@@ -76,5 +76,5 @@
</div> </div>
<ng-template #assetBox let-item> <ng-template #assetBox let-item>
{{ item.displayValue / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} <span class="symbol">{{ assetsMinimal[item.asset][1] }}</span> {{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} <span class="symbol">{{ assetsMinimal[item.asset][1] }}</span>
</ng-template> </ng-template>

View File

@@ -7,7 +7,6 @@ import { environment } from '../../../environments/environment';
interface Xput { interface Xput {
type: 'input' | 'output' | 'fee'; type: 'input' | 'output' | 'fee';
value?: number; value?: number;
displayValue?: number;
index?: number; index?: number;
txid?: string; txid?: string;
vin?: number; vin?: number;

View File

@@ -1,13 +1,12 @@
import { Component, OnInit, Input, OnChanges, HostListener, Inject, LOCALE_ID } from '@angular/core'; import { Component, OnInit, Input, OnChanges, HostListener, Inject, LOCALE_ID } from '@angular/core';
import { StateService } from '../../services/state.service'; import { StateService } from '../../services/state.service';
import { Outspend, Transaction, Vin, Vout } from '../../interfaces/electrs.interface'; import { Outspend, Transaction } from '../../interfaces/electrs.interface';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { ReplaySubject, merge, Subscription, of } from 'rxjs'; import { ReplaySubject, merge, Subscription, of } from 'rxjs';
import { tap, switchMap } from 'rxjs/operators'; import { tap, switchMap } from 'rxjs/operators';
import { ApiService } from '../../services/api.service'; import { ApiService } from '../../services/api.service';
import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe'; import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe';
import { AssetsService } from '../../services/assets.service'; import { AssetsService } from '../../services/assets.service';
import { environment } from '../../../environments/environment';
interface SvgLine { interface SvgLine {
path: string; path: string;
@@ -21,7 +20,6 @@ interface SvgLine {
interface Xput { interface Xput {
type: 'input' | 'output' | 'fee'; type: 'input' | 'output' | 'fee';
value?: number; value?: number;
displayValue?: number;
index?: number; index?: number;
txid?: string; txid?: string;
vin?: number; vin?: number;
@@ -76,7 +74,6 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
zeroValueThickness = 20; zeroValueThickness = 20;
hasLine: boolean; hasLine: boolean;
assetsMinimal: any; assetsMinimal: any;
nativeAssetId = this.stateService.network === 'liquidtestnet' ? environment.nativeTestAssetId : environment.nativeAssetId;
outspendsSubscription: Subscription; outspendsSubscription: Subscription;
refreshOutspends$: ReplaySubject<string> = new ReplaySubject(); refreshOutspends$: ReplaySubject<string> = new ReplaySubject();
@@ -170,8 +167,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
let voutWithFee = this.tx.vout.map((v, i) => { let voutWithFee = this.tx.vout.map((v, i) => {
return { return {
type: v.scriptpubkey_type === 'fee' ? 'fee' : 'output', type: v.scriptpubkey_type === 'fee' ? 'fee' : 'output',
value: this.getOutputValue(v), value: v?.value,
displayValue: v?.value,
address: v?.scriptpubkey_address || v?.scriptpubkey_type?.toUpperCase(), address: v?.scriptpubkey_address || v?.scriptpubkey_type?.toUpperCase(),
index: i, index: i,
pegout: v?.pegout?.scriptpubkey_address, pegout: v?.pegout?.scriptpubkey_address,
@@ -189,8 +185,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
let truncatedInputs = this.tx.vin.map((v, i) => { let truncatedInputs = this.tx.vin.map((v, i) => {
return { return {
type: 'input', type: 'input',
value: (v?.is_coinbase && !totalValue ? 0 : this.getInputValue(v)), value: v?.prevout?.value || (v?.is_coinbase && !totalValue ? 0 : undefined),
displayValue: v?.prevout?.value,
txid: v.txid, txid: v.txid,
vout: v.vout, vout: v.vout,
address: v?.prevout?.scriptpubkey_address || v?.prevout?.scriptpubkey_type?.toUpperCase(), address: v?.prevout?.scriptpubkey_address || v?.prevout?.scriptpubkey_type?.toUpperCase(),
@@ -234,14 +229,14 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
} }
calcTotalValue(tx: Transaction): number { calcTotalValue(tx: Transaction): number {
let totalOutput = this.tx.vout.reduce((acc, v) => (this.getOutputValue(v) || 0) + acc, 0); const totalOutput = this.tx.vout.reduce((acc, v) => (v.value == null ? 0 : v.value) + acc, 0);
// simple sum of outputs + fee for bitcoin // simple sum of outputs + fee for bitcoin
if (!this.isLiquid) { if (!this.isLiquid) {
return this.tx.fee ? totalOutput + this.tx.fee : totalOutput; return this.tx.fee ? totalOutput + this.tx.fee : totalOutput;
} else { } else {
const totalInput = this.tx.vin.reduce((acc, v) => (this.getInputValue(v) || 0) + acc, 0); const totalInput = this.tx.vin.reduce((acc, v) => (v?.prevout?.value == null ? 0 : v.prevout.value) + acc, 0);
const confidentialInputCount = this.tx.vin.reduce((acc, v) => acc + (this.isUnknownInputValue(v) ? 1 : 0), 0); const confidentialInputCount = this.tx.vin.reduce((acc, v) => acc + (v?.prevout?.value == null ? 1 : 0), 0);
const confidentialOutputCount = this.tx.vout.reduce((acc, v) => acc + (this.isUnknownOutputValue(v) ? 1 : 0), 0); const confidentialOutputCount = this.tx.vout.reduce((acc, v) => acc + (v.value == null ? 1 : 0), 0);
// if there are unknowns on both sides, the total is indeterminate, so we'll just fudge it // if there are unknowns on both sides, the total is indeterminate, so we'll just fudge it
if (confidentialInputCount && confidentialOutputCount) { if (confidentialInputCount && confidentialOutputCount) {
@@ -461,34 +456,6 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
} }
} }
getOutputValue(v: Vout): number | void {
if (!v) {
return null;
} else if (this.isLiquid && v.asset !== this.nativeAssetId) {
return null;
} else {
return v.value;
}
}
getInputValue(v: Vin): number | void {
if (!v?.prevout) {
return null;
} else if (this.isLiquid && v.prevout.asset !== this.nativeAssetId) {
return null;
} else {
return v.prevout.value;
}
}
isUnknownInputValue(v: Vin): boolean {
return v?.prevout?.value == null || this.isLiquid && v?.prevout?.asset !== this.nativeAssetId;
}
isUnknownOutputValue(v: Vout): boolean {
return v?.value == null || this.isLiquid && v?.asset !== this.nativeAssetId;
}
@HostListener('pointermove', ['$event']) @HostListener('pointermove', ['$event'])
onPointerMove(event) { onPointerMove(event) {
if (this.dir === 'rtl') { if (this.dir === 'rtl') {

View File

@@ -8863,7 +8863,7 @@ export const faqData = [
type: "endpoint", type: "endpoint",
category: "advanced", category: "advanced",
showConditions: bitcoinNetworks, showConditions: bitcoinNetworks,
fragment: "how-big-is-mempool-used-by-mempool-space", fragment: "how-big-is-mempool-used-by-mempool.space",
title: "How big is the mempool used by mempool.space?", title: "How big is the mempool used by mempool.space?",
options: { officialOnly: true }, options: { officialOnly: true },
}, },

View File

@@ -207,7 +207,7 @@
<p>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.</p><p>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".</p><p>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.</p> <p>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.</p><p>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".</p><p>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.</p>
</ng-template> </ng-template>
<ng-template type="how-big-is-mempool-used-by-mempool-space"> <ng-template type="how-big-is-mempool-used-by-mempool.space">
<p>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).</p> <p>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).</p>
<p>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.</p> <p>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.</p>
<p>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.</p> <p>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.</p>

View File

@@ -1,4 +1,4 @@
<span [class]="colorClass" *ngIf="blockConversion; else noblockconversion"> <span class="green-color" *ngIf="blockConversion; else noblockconversion">
{{ {{
( (
(blockConversion.price[currency] > -1 ? blockConversion.price[currency] : null) ?? (blockConversion.price[currency] > -1 ? blockConversion.price[currency] : null) ??
@@ -8,7 +8,7 @@
</span> </span>
<ng-template #noblockconversion> <ng-template #noblockconversion>
<span [class]="colorClass" *ngIf="(conversions$ | async) as conversions"> <span class="green-color" *ngIf="(conversions$ | async) as conversions">
{{ (conversions[currency] > -1 ? conversions[currency] : 0) * value / 100000000 | fiatCurrency : digitsInfo : currency }} {{ (conversions[currency] > -1 ? conversions[currency] : 0) * value / 100000000 | fiatCurrency : digitsInfo : currency }}
</span> </span>
</ng-template> </ng-template>

View File

@@ -0,0 +1,3 @@
.green-color {
color: #3bcc49;
}

View File

@@ -6,7 +6,7 @@ import { StateService } from '../services/state.service';
@Component({ @Component({
selector: 'app-fiat', selector: 'app-fiat',
templateUrl: './fiat.component.html', templateUrl: './fiat.component.html',
styleUrls: [], styleUrls: ['./fiat.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class FiatComponent implements OnInit, OnDestroy { export class FiatComponent implements OnInit, OnDestroy {
@@ -17,7 +17,6 @@ export class FiatComponent implements OnInit, OnDestroy {
@Input() value: number; @Input() value: number;
@Input() digitsInfo = '1.2-2'; @Input() digitsInfo = '1.2-2';
@Input() blockConversion: Price; @Input() blockConversion: Price;
@Input() colorClass = 'green-color';
constructor( constructor(
private stateService: StateService, private stateService: StateService,

View File

@@ -2,6 +2,6 @@
<h2 i18n="lightning.node-fee-distribution">Fee distribution</h2> <h2 i18n="lightning.node-fee-distribution">Fee distribution</h2>
<div class="chart" echarts [initOpts]="chartInitOptions" [options]="chartOptions" (chartInit)="onChartInit($event)"></div> <div class="chart" echarts [initOpts]="chartInitOptions" [options]="chartOptions" (chartInit)="onChartInit($event)"></div>
<div class="text-center loadingGraphs" *ngIf="isLoading"> <div class="text-center loadingGraphs" *ngIf="isLoading">
<div class="spinner-border text-light"></div> <div class="spinner-border text-light"></div>d
</div> </div>
</div> </div>

View File

@@ -101,15 +101,8 @@ export class NodeFeeChartComponent implements OnInit {
} }
prepareChartOptions(outgoingData, incomingData): void { prepareChartOptions(outgoingData, incomingData): void {
let sum = outgoingData.reduce((accumulator, object) => {
return accumulator + object.count;
}, 0);
sum += incomingData.reduce((accumulator, object) => {
return accumulator + object.count;
}, 0);
let title: object; let title: object;
if (sum === 0) { if (outgoingData.length === 0) {
title = { title = {
textStyle: { textStyle: {
color: 'grey', color: 'grey',
@@ -122,7 +115,7 @@ export class NodeFeeChartComponent implements OnInit {
} }
this.chartOptions = { this.chartOptions = {
title: sum === 0 ? title : undefined, title: outgoingData.length === 0 ? title : undefined,
animation: false, animation: false,
grid: { grid: {
top: 30, top: 30,
@@ -158,7 +151,7 @@ export class NodeFeeChartComponent implements OnInit {
`; `;
} }
}, },
xAxis: sum === 0 ? undefined : { xAxis: outgoingData.length === 0 ? undefined : {
type: 'category', type: 'category',
axisLine: { onZero: true }, axisLine: { onZero: true },
axisLabel: { axisLabel: {
@@ -170,7 +163,7 @@ export class NodeFeeChartComponent implements OnInit {
}, },
data: outgoingData.map(bucket => bucket.label) data: outgoingData.map(bucket => bucket.label)
}, },
legend: sum === 0 ? undefined : { legend: outgoingData.length === 0 ? undefined : {
padding: 10, padding: 10,
data: [ data: [
{ {
@@ -191,7 +184,7 @@ export class NodeFeeChartComponent implements OnInit {
}, },
], ],
}, },
yAxis: sum === 0 ? undefined : [ yAxis: outgoingData.length === 0 ? undefined : [
{ {
type: 'value', type: 'value',
axisLabel: { axisLabel: {
@@ -209,7 +202,7 @@ export class NodeFeeChartComponent implements OnInit {
}, },
}, },
], ],
series: sum === 0 ? undefined : [ series: outgoingData.length === 0 ? undefined : [
{ {
zlevel: 0, zlevel: 0,
name: $localize`Outgoing Fees`, name: $localize`Outgoing Fees`,

View File

@@ -75,13 +75,13 @@ export class NodeStatisticsChartComponent implements OnInit {
prepareChartOptions(data) { prepareChartOptions(data) {
let title: object; let title: object;
if (data.channels.length < 2) { if (data.channels.length === 0) {
title = { title = {
textStyle: { textStyle: {
color: 'grey', color: 'grey',
fontSize: 15 fontSize: 15
}, },
text: $localize`No data to display yet. Try again later.`, text: `Loading`,
left: 'center', left: 'center',
top: 'center' top: 'center'
}; };
@@ -135,14 +135,14 @@ export class NodeStatisticsChartComponent implements OnInit {
return tooltip; return tooltip;
} }
}, },
xAxis: data.channels.length < 2 ? undefined : { xAxis: data.channels.length === 0 ? undefined : {
type: 'time', type: 'time',
splitNumber: this.isMobile() ? 5 : 10, splitNumber: this.isMobile() ? 5 : 10,
axisLabel: { axisLabel: {
hideOverlap: true, hideOverlap: true,
} }
}, },
legend: data.channels.length < 2 ? undefined : { legend: data.channels.length === 0 ? undefined : {
padding: 10, padding: 10,
data: [ data: [
{ {
@@ -167,7 +167,7 @@ export class NodeStatisticsChartComponent implements OnInit {
'Capacity': true, 'Capacity': true,
} }
}, },
yAxis: data.channels.length < 2 ? undefined : [ yAxis: data.channels.length === 0 ? undefined : [
{ {
type: 'value', type: 'value',
axisLabel: { axisLabel: {
@@ -198,7 +198,7 @@ export class NodeStatisticsChartComponent implements OnInit {
} }
} }
], ],
series: data.channels.length < 2 ? [] : [ series: data.channels.length === 0 ? [] : [
{ {
zlevel: 1, zlevel: 1,
name: $localize`:@@807cf11e6ac1cde912496f764c176bdfdd6b7e19:Channels`, name: $localize`:@@807cf11e6ac1cde912496f764c176bdfdd6b7e19:Channels`,

View File

@@ -12,7 +12,7 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md table-col"> <div class="col-md">
<a class="subtitle" [routerLink]="['/lightning/node' | relativeUrl, node.public_key]">{{ node.public_key }}</a> <a class="subtitle" [routerLink]="['/lightning/node' | relativeUrl, node.public_key]">{{ node.public_key }}</a>
<table class="table table-borderless table-striped"> <table class="table table-borderless table-striped">
<tbody> <tbody>

View File

@@ -18,10 +18,6 @@
} }
} }
.table-col {
max-width: calc(100% - 470px);
}
.map-col { .map-col {
flex-grow: 0; flex-grow: 0;
flex-shrink: 0; flex-shrink: 0;

View File

@@ -133,10 +133,3 @@
top: 450px; top: 450px;
} }
} }
.indexing-message {
position: absolute;
width: 100%;
text-align: center;
margin-top: 100px;
}

View File

@@ -204,33 +204,24 @@ export class NodesChannelsMap implements OnInit {
prepareChartOptions(nodes, channels) { prepareChartOptions(nodes, channels) {
let title: object; let title: object;
if (channels.length === 0) { if (channels.length === 0 && !this.placeholder) {
if (!this.placeholder) { this.chartOptions = null;
this.isLoading = false; return;
title = { }
textStyle: {
color: 'white', // empty map fallback
fontSize: 18 if (channels.length === 0 && this.placeholder) {
}, title = {
text: $localize`No data to display yet. Try again later.`, textStyle: {
left: 'center', color: 'white',
top: 'center' fontSize: 18
}; },
this.zoom = 1.5; text: $localize`No geolocation data available`,
this.center = [0, 20]; left: 'center',
} else { // used for Node and Channel preview components top: 'center'
title = { };
textStyle: { this.zoom = 1.5;
color: 'white', this.center = [0, 20];
fontSize: 18
},
text: $localize`No geolocation data available`,
left: 'center',
top: 'center'
};
this.zoom = 1.5;
this.center = [0, 20];
}
} }
this.chartOptions = { this.chartOptions = {

View File

@@ -38,7 +38,7 @@
</small> </small>
</div> </div>
<div *ngIf="!indexingInProgress else indexing" [class]="!widget ? 'bottom-padding' : 'pb-0'" class="container pb-lg-0"> <div [class]="!widget ? 'bottom-padding' : 'pb-0'" class="container pb-lg-0">
<div [class]="widget ? 'chart-widget' : 'chart'" echarts [initOpts]="chartInitOptions" [options]="chartOptions" <div [class]="widget ? 'chart-widget' : 'chart'" echarts [initOpts]="chartInitOptions" [options]="chartOptions"
(chartInit)="onChartInit($event)"> (chartInit)="onChartInit($event)">
</div> </div>
@@ -99,7 +99,3 @@
</div> </div>
</div> </div>
</ng-template> </ng-template>
<ng-template #indexing>
<div class="indexing-message" i18n="lightning.indexing-in-progress">Indexing in progress</div>
</ng-template>

View File

@@ -167,14 +167,4 @@
padding-left: 105px; padding-left: 105px;
padding-right: 105px; padding-right: 105px;
} }
} }
.indexing-message {
font-size: 15px;
color: grey;
font-weight: bold;
width: 100%;
padding-top: 100px;
text-align: center;
height: 240px;
}

View File

@@ -29,7 +29,6 @@ export class NodesPerISPChartComponent implements OnInit {
sortBy = 'capacity'; sortBy = 'capacity';
showUnknown = false; showUnknown = false;
chartInstance = undefined; chartInstance = undefined;
indexingInProgress = false;
@HostBinding('attr.dir') dir = 'ltr'; @HostBinding('attr.dir') dir = 'ltr';
@@ -89,8 +88,6 @@ export class NodesPerISPChartComponent implements OnInit {
this.prepareChartOptions(data.ispRanking); this.prepareChartOptions(data.ispRanking);
this.indexingInProgress = !data.ispRanking.length;
return { return {
taggedISP: data.ispRanking.length, taggedISP: data.ispRanking.length,
clearnetCapacity: data.clearnetCapacity, clearnetCapacity: data.clearnetCapacity,

View File

@@ -12,22 +12,20 @@ export class StorageService {
setDefaultValueIfNeeded(key: string, defaultValue: string) { setDefaultValueIfNeeded(key: string, defaultValue: string) {
const graphWindowPreference: string = this.getValue(key); const graphWindowPreference: string = this.getValue(key);
const fragment = window.location.hash.replace('#', '');
if (graphWindowPreference === null) { // First visit to mempool.space if (graphWindowPreference === null) { // First visit to mempool.space
if (window.location.pathname.includes('graphs') && key === 'graphWindowPreference' || if (this.router.url.includes('graphs') && key === 'graphWindowPreference' ||
window.location.pathname.includes('pools') && key === 'miningWindowPreference' this.router.url.includes('pools') && key === 'miningWindowPreference'
) { ) {
this.setValue(key, fragment ? fragment : defaultValue); this.setValue(key, this.route.snapshot.fragment ? this.route.snapshot.fragment : defaultValue);
} else { } else {
this.setValue(key, defaultValue); this.setValue(key, defaultValue);
} }
} else if (window.location.pathname.includes('graphs') && key === 'graphWindowPreference' || } else if (this.router.url.includes('graphs') && key === 'graphWindowPreference' ||
window.location.pathname.includes('pools') && key === 'miningWindowPreference' this.router.url.includes('pools') && key === 'miningWindowPreference'
) { ) {
// Visit a different graphs#fragment from last visit // Visit a different graphs#fragment from last visit
if (fragment !== null && graphWindowPreference !== fragment) { if (this.route.snapshot.fragment !== null && graphWindowPreference !== this.route.snapshot.fragment) {
this.setValue(key, fragment); this.setValue(key, this.route.snapshot.fragment);
} }
} }
} }

View File

@@ -1,8 +0,0 @@
<div class="container p-lg-0 pb-0" style="max-width: 100%; margin-top: 7px" *ngIf="storageService.getValue('hideWarning') !== 'hidden'">
<div class="alert alert-danger mb-0 text-center">
<div class="message-container" i18n="warning-testnet">This is a test network. Coins have no value.</div>
<button type="button" class="close" (click)="dismissWarning()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>

View File

@@ -1,31 +0,0 @@
.alert-danger {
color: #fff;
background-color: #b71c1c;
border-color: #b71c1c;
padding: 0.5rem 1.25rem;
margin: 0px 10px 0px 10px;
display: flex;
justify-content: center;
}
.message-container {
display: flex;
margin-left: auto;
}
.close {
display: flex;
color: #fff;
align-items: center;
}
button {
display: flex;
margin-left: auto;
}
span {
position: relative;
top: -2px;
}

View File

@@ -1,20 +0,0 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { StorageService } from '../../../services/storage.service';
@Component({
selector: 'app-testnet-alert',
templateUrl: './testnet-alert.component.html',
styleUrls: ['./testnet-alert.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TestnetAlertComponent {
constructor(
public storageService: StorageService,
) { }
dismissWarning(): void {
this.storageService.setValue('hideWarning', 'hidden');
}
}

View File

@@ -84,7 +84,6 @@ import { SearchResultsComponent } from '../components/search-form/search-results
import { TimestampComponent } from './components/timestamp/timestamp.component'; import { TimestampComponent } from './components/timestamp/timestamp.component';
import { ToggleComponent } from './components/toggle/toggle.component'; import { ToggleComponent } from './components/toggle/toggle.component';
import { GeolocationComponent } from '../shared/components/geolocation/geolocation.component'; import { GeolocationComponent } from '../shared/components/geolocation/geolocation.component';
import { TestnetAlertComponent } from './components/testnet-alert/testnet-alert.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
@@ -163,7 +162,6 @@ import { TestnetAlertComponent } from './components/testnet-alert/testnet-alert.
TimestampComponent, TimestampComponent,
ToggleComponent, ToggleComponent,
GeolocationComponent, GeolocationComponent,
TestnetAlertComponent,
], ],
imports: [ imports: [
CommonModule, CommonModule,

View File

@@ -3203,7 +3203,6 @@
</trans-unit> </trans-unit>
<trans-unit id="0c65c3ee0ce537e507e0b053b479012e5803d2cf" datatype="html"> <trans-unit id="0c65c3ee0ce537e507e0b053b479012e5803d2cf" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks expected</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks expected</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/> الكتل المتوقعة </target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">13</context> <context context-type="linenumber">13</context>
@@ -3212,7 +3211,6 @@
</trans-unit> </trans-unit>
<trans-unit id="ec9f27d00a7778cd1cfe1806105d2ca3314fa506" datatype="html"> <trans-unit id="ec9f27d00a7778cd1cfe1806105d2ca3314fa506" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block expected</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block expected</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>الكتله المتوقعه </target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">14</context> <context context-type="linenumber">14</context>
@@ -3221,7 +3219,6 @@
</trans-unit> </trans-unit>
<trans-unit id="b89cb92adf0a831d4a263ecdba02139abbda02ae" datatype="html"> <trans-unit id="b89cb92adf0a831d4a263ecdba02139abbda02ae" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks mined</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks mined</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>الكتل المعدنه </target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">18</context> <context context-type="linenumber">18</context>
@@ -3230,7 +3227,6 @@
</trans-unit> </trans-unit>
<trans-unit id="4f7e823fd45c6def13a3f15f678888c7fe254fa5" datatype="html"> <trans-unit id="4f7e823fd45c6def13a3f15f678888c7fe254fa5" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block mined</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block mined</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>الكتله المعدنه</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">19</context> <context context-type="linenumber">19</context>
@@ -3239,7 +3235,6 @@
</trans-unit> </trans-unit>
<trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html"> <trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>الكتل المتبقية</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">24</context> <context context-type="linenumber">24</context>
@@ -3248,7 +3243,6 @@
</trans-unit> </trans-unit>
<trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html"> <trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>الكتلة المتبقية</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">25</context> <context context-type="linenumber">25</context>
@@ -3257,7 +3251,6 @@
</trans-unit> </trans-unit>
<trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html"> <trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>كتل قادمه</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">29</context> <context context-type="linenumber">29</context>
@@ -3266,7 +3259,6 @@
</trans-unit> </trans-unit>
<trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html"> <trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>كتله قادمه</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">30</context> <context context-type="linenumber">30</context>
@@ -3275,7 +3267,6 @@
</trans-unit> </trans-unit>
<trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html"> <trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>كتل وراء</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">34</context> <context context-type="linenumber">34</context>
@@ -3284,7 +3275,6 @@
</trans-unit> </trans-unit>
<trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html"> <trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source>
<target><x id="INTERPOLATION" equiv-text="{{ i }}"/>كتله وراء</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">35</context> <context context-type="linenumber">35</context>
@@ -3293,7 +3283,6 @@
</trans-unit> </trans-unit>
<trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html"> <trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html">
<source>Average block time</source> <source>Average block time</source>
<target>متوسط وقت الكتل</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context>
<context context-type="linenumber">42,45</context> <context context-type="linenumber">42,45</context>
@@ -3995,7 +3984,6 @@
</trans-unit> </trans-unit>
<trans-unit id="312539377512157124" datatype="html"> <trans-unit id="312539377512157124" datatype="html">
<source><x id="INTERPOLATION" equiv-text="i"/> blocks</source> <source><x id="INTERPOLATION" equiv-text="i"/> blocks</source>
<target><x id="INTERPOLATION" equiv-text="i"/>كتل</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context> <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context>
<context context-type="linenumber">165,163</context> <context context-type="linenumber">165,163</context>
@@ -4015,7 +4003,6 @@
</trans-unit> </trans-unit>
<trans-unit id="3666195172774554282" datatype="html"> <trans-unit id="3666195172774554282" datatype="html">
<source>Other (<x id="PH" equiv-text="percentage"/>)</source> <source>Other (<x id="PH" equiv-text="percentage"/>)</source>
<target>اخرى (<x id="PH" equiv-text="percentage"/>)</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context> <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context>
<context context-type="linenumber">201</context> <context context-type="linenumber">201</context>
@@ -4578,7 +4565,6 @@
</trans-unit> </trans-unit>
<trans-unit id="time-until" datatype="html"> <trans-unit id="time-until" datatype="html">
<source>In ~<x id="DATE" equiv-text="dateStrings.i18nYear"/></source> <source>In ~<x id="DATE" equiv-text="dateStrings.i18nYear"/></source>
<target>في ~ <x id="DATE" equiv-text="dateStrings.i18nYear"/></target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/time/time.component.ts</context> <context context-type="sourcefile">src/app/components/time/time.component.ts</context>
<context context-type="linenumber">126</context> <context context-type="linenumber">126</context>
@@ -5362,7 +5348,6 @@
</trans-unit> </trans-unit>
<trans-unit id="8f2791f5d9656271dd6c385f5ad572716e90f4a2" datatype="html"> <trans-unit id="8f2791f5d9656271dd6c385f5ad572716e90f4a2" datatype="html">
<source><x id="START_BOLD_TEXT" ctype="x-b" equiv-text="mempool.space merely provides data about the Bitcoin network.&lt;/b&gt; It cannot help you with"/>mempool.space merely provides data about the Bitcoin network.<x id="CLOSE_BOLD_TEXT" ctype="x-b" equiv-text="&lt;/b&gt;"/> It cannot help you with retrieving funds, confirming your transaction quicker, etc.</source> <source><x id="START_BOLD_TEXT" ctype="x-b" equiv-text="mempool.space merely provides data about the Bitcoin network.&lt;/b&gt; It cannot help you with"/>mempool.space merely provides data about the Bitcoin network.<x id="CLOSE_BOLD_TEXT" ctype="x-b" equiv-text="&lt;/b&gt;"/> It cannot help you with retrieving funds, confirming your transaction quicker, etc.</source>
<target><x id="START_BOLD_TEXT" ctype="x-b" equiv-text="mempool.space merely provides data about the Bitcoin network.&lt;/b&gt; It cannot help you with"/>يوفر mempool.space بيانات حول شبكة البتكوين. <x id="CLOSE_BOLD_TEXT" ctype="x-b" equiv-text="&lt;/b&gt;"/> لا يمكننا مساعدتك في استرداد الأموال ، وتأكيد معاملتك بشكل أسرع ، وما إلى ذلك.</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/docs/api-docs/api-docs.component.html</context> <context context-type="sourcefile">src/app/docs/api-docs/api-docs.component.html</context>
<context context-type="linenumber">13</context> <context context-type="linenumber">13</context>
@@ -5888,7 +5873,6 @@
</trans-unit> </trans-unit>
<trans-unit id="96508700250272816" datatype="html"> <trans-unit id="96508700250272816" datatype="html">
<source>Force closed with penalty</source> <source>Force closed with penalty</source>
<target>أغلقت بالقوة هناك خطآ</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/channel/closing-type/closing-type.component.ts</context> <context context-type="sourcefile">src/app/lightning/channel/closing-type/closing-type.component.ts</context>
<context context-type="linenumber">28</context> <context context-type="linenumber">28</context>
@@ -6022,7 +6006,6 @@
</trans-unit> </trans-unit>
<trans-unit id="cfcc7201138b0ef9901e9604c35f550e91629295" datatype="html"> <trans-unit id="cfcc7201138b0ef9901e9604c35f550e91629295" datatype="html">
<source>avg</source> <source>avg</source>
<target>متوسط</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/channels-statistics/channels-statistics.component.html</context> <context context-type="sourcefile">src/app/lightning/channels-statistics/channels-statistics.component.html</context>
<context context-type="linenumber">3,5</context> <context context-type="linenumber">3,5</context>
@@ -6031,7 +6014,6 @@
</trans-unit> </trans-unit>
<trans-unit id="ba9117dcc11814c44437cf9d7561874ba8b98a2a" datatype="html"> <trans-unit id="ba9117dcc11814c44437cf9d7561874ba8b98a2a" datatype="html">
<source>med</source> <source>med</source>
<target>متوسط</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/channels-statistics/channels-statistics.component.html</context> <context context-type="sourcefile">src/app/lightning/channels-statistics/channels-statistics.component.html</context>
<context context-type="linenumber">6,9</context> <context context-type="linenumber">6,9</context>
@@ -6426,7 +6408,6 @@
</trans-unit> </trans-unit>
<trans-unit id="7254919336112973896" datatype="html"> <trans-unit id="7254919336112973896" datatype="html">
<source>Outgoing Fees</source> <source>Outgoing Fees</source>
<target>الرسوم الصادرة</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/node-fee-chart/node-fee-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/node-fee-chart/node-fee-chart.component.ts</context>
<context context-type="linenumber">170</context> <context context-type="linenumber">170</context>
@@ -6438,7 +6419,6 @@
</trans-unit> </trans-unit>
<trans-unit id="484887099976974152" datatype="html"> <trans-unit id="484887099976974152" datatype="html">
<source>Incoming Fees</source> <source>Incoming Fees</source>
<target>رسوم واردة</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/node-fee-chart/node-fee-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/node-fee-chart/node-fee-chart.component.ts</context>
<context context-type="linenumber">178</context> <context context-type="linenumber">178</context>
@@ -6726,7 +6706,6 @@
</trans-unit> </trans-unit>
<trans-unit id="599038141003770125" datatype="html"> <trans-unit id="599038141003770125" datatype="html">
<source>Clearnet and Darknet</source> <source>Clearnet and Darknet</source>
<target>كليرنت ودارك نت</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context>
<context context-type="linenumber">164,161</context> <context context-type="linenumber">164,161</context>
@@ -6738,7 +6717,6 @@
</trans-unit> </trans-unit>
<trans-unit id="1282458597026430784" datatype="html"> <trans-unit id="1282458597026430784" datatype="html">
<source>Clearnet Only (IPv4, IPv6)</source> <source>Clearnet Only (IPv4, IPv6)</source>
<target>كليرنت فقط (IPv4 ، IPv6)</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context>
<context context-type="linenumber">185,182</context> <context context-type="linenumber">185,182</context>
@@ -6750,7 +6728,6 @@
</trans-unit> </trans-unit>
<trans-unit id="2165336009914523952" datatype="html"> <trans-unit id="2165336009914523952" datatype="html">
<source>Darknet Only (Tor, I2P, cjdns)</source> <source>Darknet Only (Tor, I2P, cjdns)</source>
<target>الداركنت فقط (Tor، I2P، cjdns)</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts</context>
<context context-type="linenumber">206,203</context> <context context-type="linenumber">206,203</context>
@@ -6775,7 +6752,6 @@
</trans-unit> </trans-unit>
<trans-unit id="5222540403093176126" datatype="html"> <trans-unit id="5222540403093176126" datatype="html">
<source><x id="PH" equiv-text="nodeCount"/> nodes</source> <source><x id="PH" equiv-text="nodeCount"/> nodes</source>
<target><x id="PH" equiv-text="nodeCount"/>العقد</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.ts</context>
<context context-type="linenumber">104,103</context> <context context-type="linenumber">104,103</context>

View File

@@ -3235,7 +3235,6 @@
</trans-unit> </trans-unit>
<trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html"> <trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source>
<target>zbývá <x id="INTERPOLATION" equiv-text="{{ i }}"/> bloků</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">24</context> <context context-type="linenumber">24</context>
@@ -3244,7 +3243,6 @@
</trans-unit> </trans-unit>
<trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html"> <trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source>
<target>zbývá <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">25</context> <context context-type="linenumber">25</context>
@@ -3253,7 +3251,6 @@
</trans-unit> </trans-unit>
<trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html"> <trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source>
<target>za <x id="INTERPOLATION" equiv-text="{{ i }}"/> bloků</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">29</context> <context context-type="linenumber">29</context>
@@ -3262,7 +3259,6 @@
</trans-unit> </trans-unit>
<trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html"> <trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source>
<target>za <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">30</context> <context context-type="linenumber">30</context>
@@ -3271,7 +3267,6 @@
</trans-unit> </trans-unit>
<trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html"> <trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source>
<target>Před <x id="INTERPOLATION" equiv-text="{{ i }}"/> bloků</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">34</context> <context context-type="linenumber">34</context>
@@ -3280,7 +3275,6 @@
</trans-unit> </trans-unit>
<trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html"> <trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source>
<target>Před <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">35</context> <context context-type="linenumber">35</context>
@@ -3289,7 +3283,6 @@
</trans-unit> </trans-unit>
<trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html"> <trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html">
<source>Average block time</source> <source>Average block time</source>
<target>Průměrná perioda bloků</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context>
<context context-type="linenumber">42,45</context> <context context-type="linenumber">42,45</context>
@@ -3991,7 +3984,6 @@
</trans-unit> </trans-unit>
<trans-unit id="312539377512157124" datatype="html"> <trans-unit id="312539377512157124" datatype="html">
<source><x id="INTERPOLATION" equiv-text="i"/> blocks</source> <source><x id="INTERPOLATION" equiv-text="i"/> blocks</source>
<target><x id="INTERPOLATION" equiv-text="i"/> bloků</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context> <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context>
<context context-type="linenumber">165,163</context> <context context-type="linenumber">165,163</context>
@@ -4513,7 +4505,7 @@
</trans-unit> </trans-unit>
<trans-unit id="time-since" datatype="html"> <trans-unit id="time-since" datatype="html">
<source><x id="DATE" equiv-text="dateStrings.i18nYear"/> ago</source> <source><x id="DATE" equiv-text="dateStrings.i18nYear"/> ago</source>
<target>Před <x id="DATE" equiv-text="dateStrings.i18nYear"/></target> <target>před <x id="DATE" equiv-text="dateStrings.i18nYear"/></target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/time/time.component.ts</context> <context context-type="sourcefile">src/app/components/time/time.component.ts</context>
<context context-type="linenumber">103</context> <context context-type="linenumber">103</context>
@@ -7112,7 +7104,7 @@
</trans-unit> </trans-unit>
<trans-unit id="date-base.minute" datatype="html"> <trans-unit id="date-base.minute" datatype="html">
<source><x id="DATE" equiv-text="counter"/> minute</source> <source><x id="DATE" equiv-text="counter"/> minute</source>
<target><x id="DATE" equiv-text="counter"/> min</target> <target><x id="DATE" equiv-text="counter"/> minuta</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/shared/i18n/dates.ts</context> <context context-type="sourcefile">src/app/shared/i18n/dates.ts</context>
<context context-type="linenumber">13</context> <context context-type="linenumber">13</context>
@@ -7120,7 +7112,7 @@
</trans-unit> </trans-unit>
<trans-unit id="date-base.minutes" datatype="html"> <trans-unit id="date-base.minutes" datatype="html">
<source><x id="DATE" equiv-text="counter"/> minutes</source> <source><x id="DATE" equiv-text="counter"/> minutes</source>
<target><x id="DATE" equiv-text="counter"/> min</target> <target><x id="DATE" equiv-text="counter"/> minuty</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/shared/i18n/dates.ts</context> <context context-type="sourcefile">src/app/shared/i18n/dates.ts</context>
<context context-type="linenumber">14</context> <context context-type="linenumber">14</context>

View File

@@ -3203,7 +3203,6 @@
</trans-unit> </trans-unit>
<trans-unit id="0c65c3ee0ce537e507e0b053b479012e5803d2cf" datatype="html"> <trans-unit id="0c65c3ee0ce537e507e0b053b479012e5803d2cf" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks expected</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks expected</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blokke forventes</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">13</context> <context context-type="linenumber">13</context>
@@ -3212,7 +3211,6 @@
</trans-unit> </trans-unit>
<trans-unit id="ec9f27d00a7778cd1cfe1806105d2ca3314fa506" datatype="html"> <trans-unit id="ec9f27d00a7778cd1cfe1806105d2ca3314fa506" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block expected</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block expected</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok forventet</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">14</context> <context context-type="linenumber">14</context>
@@ -3221,7 +3219,6 @@
</trans-unit> </trans-unit>
<trans-unit id="b89cb92adf0a831d4a263ecdba02139abbda02ae" datatype="html"> <trans-unit id="b89cb92adf0a831d4a263ecdba02139abbda02ae" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks mined</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks mined</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blokke fundet</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">18</context> <context context-type="linenumber">18</context>
@@ -3230,7 +3227,6 @@
</trans-unit> </trans-unit>
<trans-unit id="4f7e823fd45c6def13a3f15f678888c7fe254fa5" datatype="html"> <trans-unit id="4f7e823fd45c6def13a3f15f678888c7fe254fa5" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block mined</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block mined</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok fundet</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">19</context> <context context-type="linenumber">19</context>
@@ -3239,7 +3235,6 @@
</trans-unit> </trans-unit>
<trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html"> <trans-unit id="229dfb17b342aa8b9a1db27557069445ea1a7051" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks remaining</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blokke tilbage</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">24</context> <context context-type="linenumber">24</context>
@@ -3248,7 +3243,6 @@
</trans-unit> </trans-unit>
<trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html"> <trans-unit id="13ff0d092caf85cd23815f0235e316dc3a6d1bbe" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block remaining</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok tilbage</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">25</context> <context context-type="linenumber">25</context>
@@ -3257,7 +3251,6 @@
</trans-unit> </trans-unit>
<trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html"> <trans-unit id="4f78348af343fb64016891d67b53bdab473f9dbf" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks ahead</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blokke foran</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">29</context> <context context-type="linenumber">29</context>
@@ -3266,7 +3259,6 @@
</trans-unit> </trans-unit>
<trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html"> <trans-unit id="15c5f3475966bf3be381378b046a65849f0f6bb6" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block ahead</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok foran</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">30</context> <context context-type="linenumber">30</context>
@@ -3275,7 +3267,6 @@
</trans-unit> </trans-unit>
<trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html"> <trans-unit id="697b8cb1caaf1729809bc5c065d4dd873810550a" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> blocks behind</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blokke bagved</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">34</context> <context context-type="linenumber">34</context>
@@ -3284,7 +3275,6 @@
</trans-unit> </trans-unit>
<trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html"> <trans-unit id="32137887e3f5a25b3a016eb03357f4e363fccb0b" datatype="html">
<source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source> <source><x id="INTERPOLATION" equiv-text="{{ i }}"/> block behind</source>
<target> <x id="INTERPOLATION" equiv-text="{{ i }}"/> blok bagved</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty-tooltip.component.html</context>
<context context-type="linenumber">35</context> <context context-type="linenumber">35</context>
@@ -3293,7 +3283,6 @@
</trans-unit> </trans-unit>
<trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html"> <trans-unit id="5e78899c9b98f29856ce3c7c265e1344bc7a5a18" datatype="html">
<source>Average block time</source> <source>Average block time</source>
<target>Gennemsnitlig bloktid</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context> <context context-type="sourcefile">src/app/components/difficulty/difficulty.component.html</context>
<context context-type="linenumber">42,45</context> <context context-type="linenumber">42,45</context>
@@ -4015,7 +4004,6 @@
</trans-unit> </trans-unit>
<trans-unit id="3666195172774554282" datatype="html"> <trans-unit id="3666195172774554282" datatype="html">
<source>Other (<x id="PH" equiv-text="percentage"/>)</source> <source>Other (<x id="PH" equiv-text="percentage"/>)</source>
<target>Andet (<x id="PH" equiv-text="percentage"/>)</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context> <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.ts</context>
<context context-type="linenumber">201</context> <context context-type="linenumber">201</context>
@@ -4518,7 +4506,7 @@
</trans-unit> </trans-unit>
<trans-unit id="time-since" datatype="html"> <trans-unit id="time-since" datatype="html">
<source><x id="DATE" equiv-text="dateStrings.i18nYear"/> ago</source> <source><x id="DATE" equiv-text="dateStrings.i18nYear"/> ago</source>
<target><x id="DATE" equiv-text="dateStrings.i18nYear"/> siden</target> <target> <x id="DATE" equiv-text="dateStrings.i18nYear"/> siden</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/time/time.component.ts</context> <context context-type="sourcefile">src/app/components/time/time.component.ts</context>
<context context-type="linenumber">103</context> <context context-type="linenumber">103</context>
@@ -5067,7 +5055,7 @@
</trans-unit> </trans-unit>
<trans-unit id="ea7c261363dc5f6134b7bacba2a1ef97f4ff7859" datatype="html"> <trans-unit id="ea7c261363dc5f6134b7bacba2a1ef97f4ff7859" datatype="html">
<source><x id="INTERPOLATION" equiv-text="remaining&lt;/ng-template&gt;"/> remaining</source> <source><x id="INTERPOLATION" equiv-text="remaining&lt;/ng-template&gt;"/> remaining</source>
<target><x id="INTERPOLATION" equiv-text="remaining&lt;/ng-template&gt;"/> tilbage</target> <target> <x id="INTERPOLATION" equiv-text="remaining&lt;/ng-template&gt;"/> tilbage</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">332,333</context> <context context-type="linenumber">332,333</context>
@@ -6913,7 +6901,7 @@
</trans-unit> </trans-unit>
<trans-unit id="3627306100664959238" datatype="html"> <trans-unit id="3627306100664959238" datatype="html">
<source><x id="PH" equiv-text="this.amountShortenerPipe.transform(isp[2] / 100000000, 2)"/> BTC</source> <source><x id="PH" equiv-text="this.amountShortenerPipe.transform(isp[2] / 100000000, 2)"/> BTC</source>
<target><x id="PH" equiv-text="this.amountShortenerPipe.transform(isp[2] / 100000000, 2)"/> BTC</target> <target> <x id="PH" equiv-text="this.amountShortenerPipe.transform(isp[2] / 100000000, 2)"/> BTC</target>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts</context> <context context-type="sourcefile">src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts</context>
<context context-type="linenumber">159,157</context> <context context-type="linenumber">159,157</context>

Some files were not shown because too many files have changed in this diff Show More