From 59f08247ef4b9c8ed317f5a1ac85a95c0b1db3c1 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Fri, 17 Feb 2023 18:58:05 -0600 Subject: [PATCH 01/47] Reduce data sent to mempool block 7 subscription --- backend/src/api/mempool-blocks.ts | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/backend/src/api/mempool-blocks.ts b/backend/src/api/mempool-blocks.ts index 0df125d55..3c2feb0e2 100644 --- a/backend/src/api/mempool-blocks.ts +++ b/backend/src/api/mempool-blocks.ts @@ -97,14 +97,14 @@ class MempoolBlocks { blockSize += tx.size; transactions.push(tx); } else { - mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockWeight, mempoolBlocks.length)); + mempoolBlocks.push(this.dataToMempoolBlocks(transactions, mempoolBlocks.length)); blockWeight = tx.weight; blockSize = tx.size; transactions = [tx]; } }); if (transactions.length) { - mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockWeight, mempoolBlocks.length)); + mempoolBlocks.push(this.dataToMempoolBlocks(transactions, mempoolBlocks.length)); } return mempoolBlocks; @@ -281,7 +281,7 @@ class MempoolBlocks { const mempoolBlocks = blocks.map((transactions, blockIndex) => { return this.dataToMempoolBlocks(transactions.map(tx => { return mempool[tx.txid] || null; - }).filter(tx => !!tx), undefined, undefined, blockIndex); + }).filter(tx => !!tx), blockIndex); }); if (saveResults) { @@ -293,18 +293,17 @@ class MempoolBlocks { return mempoolBlocks; } - private dataToMempoolBlocks(transactions: TransactionExtended[], - blockSize: number | undefined, blockWeight: number | undefined, blocksIndex: number): MempoolBlockWithTransactions { - let totalSize = blockSize || 0; - let totalWeight = blockWeight || 0; - if (blockSize === undefined && blockWeight === undefined) { - totalSize = 0; - totalWeight = 0; - transactions.forEach(tx => { - totalSize += tx.size; - totalWeight += tx.weight; - }); - } + private dataToMempoolBlocks(transactions: TransactionExtended[], blocksIndex: number): MempoolBlockWithTransactions { + let totalSize = 0; + let totalWeight = 0; + const fitTransactions: TransactionExtended[] = []; + transactions.forEach(tx => { + totalSize += tx.size; + totalWeight += tx.weight; + if ((totalWeight + tx.weight) <= config.MEMPOOL.BLOCK_WEIGHT_UNITS * 1.2) { + fitTransactions.push(tx); + } + }); let rangeLength = 4; if (blocksIndex === 0) { rangeLength = 8; @@ -322,7 +321,7 @@ class MempoolBlocks { medianFee: Common.percentile(transactions.map((tx) => tx.effectiveFeePerVsize), config.MEMPOOL.RECOMMENDED_FEE_PERCENTILE), feeRange: Common.getFeesInRange(transactions, rangeLength), transactionIds: transactions.map((tx) => tx.txid), - transactions: transactions.map((tx) => Common.stripTransaction(tx)), + transactions: fitTransactions.map((tx) => Common.stripTransaction(tx)), }; } } From b7425dc339f60e66fd3e71a8bbc240d0178ece95 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Fri, 24 Feb 2023 02:24:51 -0500 Subject: [PATCH 02/47] Add anchor links for about page sections --- .../app/components/about/about.component.html | 16 ++++++++-------- .../app/components/about/about.component.scss | 2 ++ .../src/app/components/about/about.component.ts | 14 +++++++++++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index 876bec028..a79797f9c 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -25,7 +25,7 @@ -
+

Enterprise Sponsors 🚀

-
+

Community Sponsors ❤️

@@ -187,7 +187,7 @@
-
+ -
+

Community Alliances

-
+

Project Translators

@@ -311,7 +311,7 @@ -
+

Project Contributors

@@ -323,7 +323,7 @@
-
+

Project Members

@@ -336,7 +336,7 @@
-
+

Project Maintainers

diff --git a/frontend/src/app/components/about/about.component.scss b/frontend/src/app/components/about/about.component.scss index 8390ce0ba..ae60e052e 100644 --- a/frontend/src/app/components/about/about.component.scss +++ b/frontend/src/app/components/about/about.component.scss @@ -46,6 +46,7 @@ .maintainers { margin-top: 68px; margin-bottom: 68px; + scroll-margin: 30px; } .maintainers { @@ -117,6 +118,7 @@ .project-translators, .community-integrations-sponsor, .maintainers { + scroll-margin: 30px; .wrapper { display: inline-block; a { diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index d26efb411..33c6ac5a2 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -5,7 +5,7 @@ import { StateService } from '../../services/state.service'; import { Observable } from 'rxjs'; import { ApiService } from '../../services/api.service'; import { IBackendInfo } from '../../interfaces/websocket.interface'; -import { Router } from '@angular/router'; +import { Router, ActivatedRoute } from '@angular/router'; import { map } from 'rxjs/operators'; import { ITranslators } from '../../interfaces/node-api.interface'; @@ -31,6 +31,7 @@ export class AboutComponent implements OnInit { public stateService: StateService, private apiService: ApiService, private router: Router, + private route: ActivatedRoute, @Inject(LOCALE_ID) public locale: string, ) { } @@ -60,6 +61,17 @@ export class AboutComponent implements OnInit { }) ); } + + ngAfterViewInit() { + const that = this; + setTimeout( () => { + if( this.route.snapshot.fragment ) { + if (document.getElementById( this.route.snapshot.fragment )) { + document.getElementById( this.route.snapshot.fragment ).scrollIntoView({behavior: "smooth", block: "center"}); + } + } + }, 1 ); + } sponsor(): void { if (this.officialMempoolSpace && this.stateService.env.BASE_MODULE === 'mempool') { From 32733a30230ef8bea9c8d6afc97883f157d690a0 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sun, 26 Feb 2023 11:30:12 +0900 Subject: [PATCH 03/47] When we re-index blocks due to mining pools change, wipe the nodejs backend cache --- backend/src/api/disk-cache.ts | 1 + backend/src/api/pools-parser.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/backend/src/api/disk-cache.ts b/backend/src/api/disk-cache.ts index a75fd43cc..e466982ad 100644 --- a/backend/src/api/disk-cache.ts +++ b/backend/src/api/disk-cache.ts @@ -62,6 +62,7 @@ class DiskCache { } wipeCache() { + logger.notice(`Wipping nodejs backend cache/cache*.json files`); fs.unlinkSync(DiskCache.FILE_NAME); for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { fs.unlinkSync(DiskCache.FILE_NAMES.replace('{number}', i.toString())); diff --git a/backend/src/api/pools-parser.ts b/backend/src/api/pools-parser.ts index 4e67ce98b..d1705b829 100644 --- a/backend/src/api/pools-parser.ts +++ b/backend/src/api/pools-parser.ts @@ -3,6 +3,7 @@ import logger from '../logger'; import config from '../config'; import PoolsRepository from '../repositories/PoolsRepository'; import { PoolTag } from '../mempool.interfaces'; +import diskCache from './disk-cache'; class PoolsParser { miningPools: any[] = []; @@ -139,6 +140,10 @@ class PoolsParser { WHERE pool_id = ?`, [pool.id] ); + + // We also need to wipe the backend cache to make sure we don't serve blocks with + // the wrong mining pool (usually happen with unknown blocks) + diskCache.wipeCache(); } private async $deleteUnknownBlocks(): Promise { @@ -149,6 +154,10 @@ class PoolsParser { WHERE pool_id = ? AND height >= 130635`, [unknownPool[0].id] ); + + // We also need to wipe the backend cache to make sure we don't serve blocks with + // the wrong mining pool (usually happen with unknown blocks) + diskCache.wipeCache(); } } From 9a4a5ad94e0f1eed983de118a1f9ced4719dc5f5 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sun, 26 Feb 2023 11:37:57 +0900 Subject: [PATCH 04/47] Silence ENOENT exception when we wipe the nodejs backend cache --- backend/src/api/disk-cache.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/src/api/disk-cache.ts b/backend/src/api/disk-cache.ts index e466982ad..c6af20e29 100644 --- a/backend/src/api/disk-cache.ts +++ b/backend/src/api/disk-cache.ts @@ -63,9 +63,23 @@ class DiskCache { wipeCache() { logger.notice(`Wipping nodejs backend cache/cache*.json files`); - fs.unlinkSync(DiskCache.FILE_NAME); + try { + fs.unlinkSync(DiskCache.FILE_NAME); + } catch (e: any) { + if (e?.code !== 'ENOENT') { + logger.err(`Cannot wipe cache file ${DiskCache.FILE_NAME}. Exception ${JSON.stringify(e)}`); + } + } + for (let i = 1; i < DiskCache.CHUNK_FILES; i++) { - fs.unlinkSync(DiskCache.FILE_NAMES.replace('{number}', i.toString())); + const filename = DiskCache.FILE_NAMES.replace('{number}', i.toString()); + try { + fs.unlinkSync(filename); + } catch (e: any) { + if (e?.code !== 'ENOENT') { + logger.err(`Cannot wipe cache file ${filename}. Exception ${JSON.stringify(e)}`); + } + } } } From 0ce4c5fa4d8bd55280d97262668f9ea8e3940d6e Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sun, 26 Feb 2023 08:23:44 -0800 Subject: [PATCH 05/47] Run Cypress tests on master after merging --- .github/workflows/cypress.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index e8f6d1df1..2cff7b73a 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -3,6 +3,9 @@ name: Cypress Tests on: pull_request: types: [opened, review_requested, synchronize] + push: + branches: + - master jobs: cypress: if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')" From 4cc0f9b5c74d15bf09514aec6d0c951235b83b3d Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sun, 26 Feb 2023 09:16:33 -0800 Subject: [PATCH 06/47] Reorder triggers --- .github/workflows/cypress.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 2cff7b73a..8c720917e 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -1,11 +1,11 @@ name: Cypress Tests on: + push: + branches: [master] pull_request: types: [opened, review_requested, synchronize] - push: - branches: - - master + jobs: cypress: if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')" From 5792dee553f03c632fc5888a35490a27e772b281 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 27 Feb 2023 10:47:04 +0900 Subject: [PATCH 07/47] Use bitcoinApiFactory when we don't need verbose blocks or confirmation number --- backend/src/api/blocks.ts | 14 ++++++-------- backend/src/api/chain-tips.ts | 4 ++-- backend/src/api/mining/mining.ts | 14 ++++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 204419496..068184949 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -479,7 +479,7 @@ class Blocks { loadingIndicators.setProgress('block-indexing', progress, false); } const blockHash = await bitcoinApi.$getBlockHash(blockHeight); - const block = BitcoinApi.convertBlock(await bitcoinClient.getBlock(blockHash)); + const block: IEsploraApi.Block = await bitcoinApi.$getBlock(blockHash); const transactions = await this.$getTransactionsExtended(blockHash, block.height, true, true); const blockExtended = await this.$getBlockExtended(block, transactions); @@ -527,13 +527,13 @@ class Blocks { if (blockchainInfo.blocks === blockchainInfo.headers) { const heightDiff = blockHeightTip % 2016; const blockHash = await bitcoinApi.$getBlockHash(blockHeightTip - heightDiff); - const block = BitcoinApi.convertBlock(await bitcoinClient.getBlock(blockHash)); + const block: IEsploraApi.Block = await bitcoinApi.$getBlock(blockHash); this.lastDifficultyAdjustmentTime = block.timestamp; this.currentDifficulty = block.difficulty; if (blockHeightTip >= 2016) { const previousPeriodBlockHash = await bitcoinApi.$getBlockHash(blockHeightTip - heightDiff - 2016); - const previousPeriodBlock = await bitcoinClient.getBlock(previousPeriodBlockHash) + const previousPeriodBlock: IEsploraApi.Block = await bitcoinApi.$getBlock(previousPeriodBlockHash); this.previousDifficultyRetarget = (block.difficulty - previousPeriodBlock.difficulty) / previousPeriodBlock.difficulty * 100; logger.debug(`Initial difficulty adjustment data set.`); } @@ -657,7 +657,7 @@ class Blocks { } const blockHash = await bitcoinApi.$getBlockHash(height); - const block = BitcoinApi.convertBlock(await bitcoinClient.getBlock(blockHash)); + const block: IEsploraApi.Block = await bitcoinApi.$getBlock(blockHash); const transactions = await this.$getTransactionsExtended(blockHash, block.height, true); const blockExtended = await this.$getBlockExtended(block, transactions); @@ -681,7 +681,7 @@ class Blocks { // Block has already been indexed if (Common.indexingEnabled()) { const dbBlock = await blocksRepository.$getBlockByHash(hash); - if (dbBlock != null) { + if (dbBlock !== null) { return prepareBlock(dbBlock); } } @@ -691,10 +691,8 @@ class Blocks { return await bitcoinApi.$getBlock(hash); } - let block = await bitcoinClient.getBlock(hash); - block = prepareBlock(block); - // Bitcoin network, add our custom data on top + const block: IEsploraApi.Block = await bitcoinApi.$getBlock(hash); const transactions = await this.$getTransactionsExtended(hash, block.height, true); const blockExtended = await this.$getBlockExtended(block, transactions); if (Common.indexingEnabled()) { diff --git a/backend/src/api/chain-tips.ts b/backend/src/api/chain-tips.ts index 3384ebb19..46a06f703 100644 --- a/backend/src/api/chain-tips.ts +++ b/backend/src/api/chain-tips.ts @@ -1,5 +1,5 @@ -import logger from "../logger"; -import bitcoinClient from "./bitcoin/bitcoin-client"; +import logger from '../logger'; +import bitcoinClient from './bitcoin/bitcoin-client'; export interface ChainTip { height: number; diff --git a/backend/src/api/mining/mining.ts b/backend/src/api/mining/mining.ts index f33a68dcb..e9b569485 100644 --- a/backend/src/api/mining/mining.ts +++ b/backend/src/api/mining/mining.ts @@ -11,6 +11,8 @@ import DifficultyAdjustmentsRepository from '../../repositories/DifficultyAdjust import config from '../../config'; import BlocksAuditsRepository from '../../repositories/BlocksAuditsRepository'; import PricesRepository from '../../repositories/PricesRepository'; +import bitcoinApiFactory from '../bitcoin/bitcoin-api-factory'; +import { IEsploraApi } from '../bitcoin/esplora-api.interface'; class Mining { blocksPriceIndexingRunning = false; @@ -189,8 +191,8 @@ class Mining { try { const oldestConsecutiveBlockTimestamp = 1000 * (await BlocksRepository.$getOldestConsecutiveBlock()).timestamp; - const genesisBlock = await bitcoinClient.getBlock(await bitcoinClient.getBlockHash(0)); - const genesisTimestamp = genesisBlock.time * 1000; + const genesisBlock: IEsploraApi.Block = await bitcoinApiFactory.$getBlock(await bitcoinClient.getBlockHash(0)); + const genesisTimestamp = genesisBlock.timestamp * 1000; const indexedTimestamp = await HashratesRepository.$getWeeklyHashrateTimestamps(); const hashrates: any[] = []; @@ -292,8 +294,8 @@ class Mining { const oldestConsecutiveBlockTimestamp = 1000 * (await BlocksRepository.$getOldestConsecutiveBlock()).timestamp; try { - const genesisBlock = await bitcoinClient.getBlock(await bitcoinClient.getBlockHash(0)); - const genesisTimestamp = genesisBlock.time * 1000; + const genesisBlock: IEsploraApi.Block = await bitcoinApiFactory.$getBlock(await bitcoinClient.getBlockHash(0)); + const genesisTimestamp = genesisBlock.timestamp * 1000; const indexedTimestamp = (await HashratesRepository.$getRawNetworkDailyHashrate(null)).map(hashrate => hashrate.timestamp); const lastMidnight = this.getDateMidnight(new Date()); let toTimestamp = Math.round(lastMidnight.getTime()); @@ -394,13 +396,13 @@ class Mining { } const blocks: any = await BlocksRepository.$getBlocksDifficulty(); - const genesisBlock = await bitcoinClient.getBlock(await bitcoinClient.getBlockHash(0)); + const genesisBlock: IEsploraApi.Block = await bitcoinApiFactory.$getBlock(await bitcoinClient.getBlockHash(0)); let currentDifficulty = genesisBlock.difficulty; let totalIndexed = 0; if (config.MEMPOOL.INDEXING_BLOCKS_AMOUNT === -1 && indexedHeights[0] !== true) { await DifficultyAdjustmentsRepository.$saveAdjustments({ - time: genesisBlock.time, + time: genesisBlock.timestamp, height: 0, difficulty: currentDifficulty, adjustment: 0.0, From 0aff276a5c8d9eb5d1f8688836d95a0427e4bb73 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 27 Feb 2023 18:00:00 +0900 Subject: [PATCH 08/47] Enforce BlockExtended use for block indexing - Unify /api/v1/block(s) API(s) response format --- .../src/api/bitcoin/bitcoin-api.interface.ts | 31 +++ backend/src/api/bitcoin/bitcoin-api.ts | 2 +- .../src/api/bitcoin/esplora-api.interface.ts | 2 +- backend/src/api/blocks.ts | 224 +++++++++--------- backend/src/api/chain-tips.ts | 6 +- backend/src/api/pools-parser.ts | 2 + backend/src/index.ts | 9 +- backend/src/mempool.interfaces.ts | 69 +++--- backend/src/repositories/BlocksRepository.ts | 206 +++++++++++----- backend/src/repositories/PoolsRepository.ts | 6 +- backend/src/utils/blocks-utils.ts | 33 --- .../src/app/interfaces/node-api.interface.ts | 1 - 12 files changed, 352 insertions(+), 239 deletions(-) delete mode 100644 backend/src/utils/blocks-utils.ts diff --git a/backend/src/api/bitcoin/bitcoin-api.interface.ts b/backend/src/api/bitcoin/bitcoin-api.interface.ts index 54d666794..3afc22897 100644 --- a/backend/src/api/bitcoin/bitcoin-api.interface.ts +++ b/backend/src/api/bitcoin/bitcoin-api.interface.ts @@ -172,4 +172,35 @@ export namespace IBitcoinApi { } } + export interface BlockStats { + "avgfee": number; + "avgfeerate": number; + "avgtxsize": number; + "blockhash": string; + "feerate_percentiles": [number, number, number, number, number]; + "height": number; + "ins": number; + "maxfee": number; + "maxfeerate": number; + "maxtxsize": number; + "medianfee": number; + "mediantime": number; + "mediantxsize": number; + "minfee": number; + "minfeerate": number; + "mintxsize": number; + "outs": number; + "subsidy": number; + "swtotal_size": number; + "swtotal_weight": number; + "swtxs": number; + "time": number; + "total_out": number; + "total_size": number; + "total_weight": number; + "totalfee": number; + "txs": number; + "utxo_increase": number; + "utxo_size_inc": number; + } } diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts index 117245ef8..e20fe9e34 100644 --- a/backend/src/api/bitcoin/bitcoin-api.ts +++ b/backend/src/api/bitcoin/bitcoin-api.ts @@ -28,7 +28,7 @@ class BitcoinApi implements AbstractBitcoinApi { size: block.size, weight: block.weight, previousblockhash: block.previousblockhash, - medianTime: block.mediantime, + mediantime: block.mediantime, }; } diff --git a/backend/src/api/bitcoin/esplora-api.interface.ts b/backend/src/api/bitcoin/esplora-api.interface.ts index eaf6476f4..6d50bddfd 100644 --- a/backend/src/api/bitcoin/esplora-api.interface.ts +++ b/backend/src/api/bitcoin/esplora-api.interface.ts @@ -88,7 +88,7 @@ export namespace IEsploraApi { size: number; weight: number; previousblockhash: string; - medianTime?: number; + mediantime: number; } export interface Address { diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 068184949..75d1ec300 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -2,7 +2,7 @@ import config from '../config'; import bitcoinApi from './bitcoin/bitcoin-api-factory'; import logger from '../logger'; import memPool from './mempool'; -import { BlockExtended, BlockSummary, PoolTag, TransactionExtended, TransactionStripped, TransactionMinerInfo } from '../mempool.interfaces'; +import { BlockExtended, BlockExtension, BlockSummary, PoolTag, TransactionExtended, TransactionStripped, TransactionMinerInfo } from '../mempool.interfaces'; import { Common } from './common'; import diskCache from './disk-cache'; import transactionUtils from './transaction-utils'; @@ -13,7 +13,6 @@ import poolsRepository from '../repositories/PoolsRepository'; import blocksRepository from '../repositories/BlocksRepository'; import loadingIndicators from './loading-indicators'; import BitcoinApi from './bitcoin/bitcoin-api'; -import { prepareBlock } from '../utils/blocks-utils'; import BlocksRepository from '../repositories/BlocksRepository'; import HashratesRepository from '../repositories/HashratesRepository'; import indexer from '../indexer'; @@ -143,7 +142,7 @@ class Blocks { * @param block * @returns BlockSummary */ - private summarizeBlock(block: IBitcoinApi.VerboseBlock): BlockSummary { + public summarizeBlock(block: IBitcoinApi.VerboseBlock): BlockSummary { const stripped = block.tx.map((tx) => { return { txid: tx.txid, @@ -166,80 +165,81 @@ class Blocks { * @returns BlockExtended */ private async $getBlockExtended(block: IEsploraApi.Block, transactions: TransactionExtended[]): Promise { - const blk: BlockExtended = Object.assign({ extras: {} }, block); - blk.extras.reward = transactions[0].vout.reduce((acc, curr) => acc + curr.value, 0); - blk.extras.coinbaseTx = transactionUtils.stripCoinbaseTransaction(transactions[0]); - blk.extras.coinbaseRaw = blk.extras.coinbaseTx.vin[0].scriptsig; - blk.extras.usd = priceUpdater.latestPrices.USD; - blk.extras.medianTimestamp = block.medianTime; - blk.extras.orphans = chainTips.getOrphanedBlocksAtHeight(blk.height); + const coinbaseTx = transactionUtils.stripCoinbaseTransaction(transactions[0]); + + const blk: Partial = Object.assign({}, block); + const extras: Partial = {}; + + extras.reward = transactions[0].vout.reduce((acc, curr) => acc + curr.value, 0); + extras.coinbaseRaw = coinbaseTx.vin[0].scriptsig; + extras.orphans = chainTips.getOrphanedBlocksAtHeight(blk.height); if (block.height === 0) { - blk.extras.medianFee = 0; // 50th percentiles - blk.extras.feeRange = [0, 0, 0, 0, 0, 0, 0]; - blk.extras.totalFees = 0; - blk.extras.avgFee = 0; - blk.extras.avgFeeRate = 0; - blk.extras.utxoSetChange = 0; - blk.extras.avgTxSize = 0; - blk.extras.totalInputs = 0; - blk.extras.totalOutputs = 1; - blk.extras.totalOutputAmt = 0; - blk.extras.segwitTotalTxs = 0; - blk.extras.segwitTotalSize = 0; - blk.extras.segwitTotalWeight = 0; + extras.medianFee = 0; // 50th percentiles + extras.feeRange = [0, 0, 0, 0, 0, 0, 0]; + extras.totalFees = 0; + extras.avgFee = 0; + extras.avgFeeRate = 0; + extras.utxoSetChange = 0; + extras.avgTxSize = 0; + extras.totalInputs = 0; + extras.totalOutputs = 1; + extras.totalOutputAmt = 0; + extras.segwitTotalTxs = 0; + extras.segwitTotalSize = 0; + extras.segwitTotalWeight = 0; } else { - const stats = await bitcoinClient.getBlockStats(block.id); - blk.extras.medianFee = stats.feerate_percentiles[2]; // 50th percentiles - blk.extras.feeRange = [stats.minfeerate, stats.feerate_percentiles, stats.maxfeerate].flat(); - blk.extras.totalFees = stats.totalfee; - blk.extras.avgFee = stats.avgfee; - blk.extras.avgFeeRate = stats.avgfeerate; - blk.extras.utxoSetChange = stats.utxo_increase; - blk.extras.avgTxSize = Math.round(stats.total_size / stats.txs * 100) * 0.01; - blk.extras.totalInputs = stats.ins; - blk.extras.totalOutputs = stats.outs; - blk.extras.totalOutputAmt = stats.total_out; - blk.extras.segwitTotalTxs = stats.swtxs; - blk.extras.segwitTotalSize = stats.swtotal_size; - blk.extras.segwitTotalWeight = stats.swtotal_weight; + const stats: IBitcoinApi.BlockStats = await bitcoinClient.getBlockStats(block.id); + extras.medianFee = stats.feerate_percentiles[2]; // 50th percentiles + extras.feeRange = [stats.minfeerate, stats.feerate_percentiles, stats.maxfeerate].flat(); + extras.totalFees = stats.totalfee; + extras.avgFee = stats.avgfee; + extras.avgFeeRate = stats.avgfeerate; + extras.utxoSetChange = stats.utxo_increase; + extras.avgTxSize = Math.round(stats.total_size / stats.txs * 100) * 0.01; + extras.totalInputs = stats.ins; + extras.totalOutputs = stats.outs; + extras.totalOutputAmt = stats.total_out; + extras.segwitTotalTxs = stats.swtxs; + extras.segwitTotalSize = stats.swtotal_size; + extras.segwitTotalWeight = stats.swtotal_weight; } if (Common.blocksSummariesIndexingEnabled()) { - blk.extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(block.id); - if (blk.extras.feePercentiles !== null) { - blk.extras.medianFeeAmt = blk.extras.feePercentiles[3]; + extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(block.id); + if (extras.feePercentiles !== null) { + extras.medianFeeAmt = extras.feePercentiles[3]; } } - blk.extras.virtualSize = block.weight / 4.0; - if (blk.extras.coinbaseTx.vout.length > 0) { - blk.extras.coinbaseAddress = blk.extras.coinbaseTx.vout[0].scriptpubkey_address ?? null; - blk.extras.coinbaseSignature = blk.extras.coinbaseTx.vout[0].scriptpubkey_asm ?? null; - blk.extras.coinbaseSignatureAscii = transactionUtils.hex2ascii(blk.extras.coinbaseTx.vin[0].scriptsig) ?? null; + extras.virtualSize = block.weight / 4.0; + if (coinbaseTx?.vout.length > 0) { + extras.coinbaseAddress = coinbaseTx.vout[0].scriptpubkey_address ?? null; + extras.coinbaseSignature = coinbaseTx.vout[0].scriptpubkey_asm ?? null; + extras.coinbaseSignatureAscii = transactionUtils.hex2ascii(coinbaseTx.vin[0].scriptsig) ?? null; } else { - blk.extras.coinbaseAddress = null; - blk.extras.coinbaseSignature = null; - blk.extras.coinbaseSignatureAscii = null; + extras.coinbaseAddress = null; + extras.coinbaseSignature = null; + extras.coinbaseSignatureAscii = null; } const header = await bitcoinClient.getBlockHeader(block.id, false); - blk.extras.header = header; + extras.header = header; const coinStatsIndex = indexer.isCoreIndexReady('coinstatsindex'); if (coinStatsIndex !== null && coinStatsIndex.best_block_height >= block.height) { const txoutset = await bitcoinClient.getTxoutSetinfo('none', block.height); - blk.extras.utxoSetSize = txoutset.txouts, - blk.extras.totalInputAmt = Math.round(txoutset.block_info.prevout_spent * 100000000); + extras.utxoSetSize = txoutset.txouts, + extras.totalInputAmt = Math.round(txoutset.block_info.prevout_spent * 100000000); } else { - blk.extras.utxoSetSize = null; - blk.extras.totalInputAmt = null; + extras.utxoSetSize = null; + extras.totalInputAmt = null; } if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) { let pool: PoolTag; - if (blk.extras?.coinbaseTx !== undefined) { - pool = await this.$findBlockMiner(blk.extras?.coinbaseTx); + if (coinbaseTx !== undefined) { + pool = await this.$findBlockMiner(coinbaseTx); } else { if (config.DATABASE.ENABLED === true) { pool = await poolsRepository.$getUnknownPool(); @@ -252,22 +252,24 @@ class Blocks { logger.warn(`Cannot assign pool to block ${blk.height} and 'unknown' pool does not exist. ` + `Check your "pools" table entries`); } else { - blk.extras.pool = { - id: pool.id, + extras.pool = { + id: pool.uniqueId, name: pool.name, slug: pool.slug, }; } + extras.matchRate = null; if (config.MEMPOOL.AUDIT) { const auditScore = await BlocksAuditsRepository.$getBlockAuditScore(block.id); if (auditScore != null) { - blk.extras.matchRate = auditScore.matchRate; + extras.matchRate = auditScore.matchRate; } } } - return blk; + blk.extras = extras; + return blk; } /** @@ -293,15 +295,18 @@ class Blocks { } else { pools = poolsParser.miningPools; } + for (let i = 0; i < pools.length; ++i) { if (address !== undefined) { - const addresses: string[] = JSON.parse(pools[i].addresses); + const addresses: string[] = typeof pools[i].addresses === 'string' ? + JSON.parse(pools[i].addresses) : pools[i].addresses; if (addresses.indexOf(address) !== -1) { return pools[i]; } } - const regexes: string[] = JSON.parse(pools[i].regexes); + const regexes: string[] = typeof pools[i].regexes === 'string' ? + JSON.parse(pools[i].regexes) : pools[i].regexes; for (let y = 0; y < regexes.length; ++y) { const regex = new RegExp(regexes[y], 'i'); const match = asciiScriptSig.match(regex); @@ -652,7 +657,7 @@ class Blocks { if (Common.indexingEnabled()) { const dbBlock = await blocksRepository.$getBlockByHeight(height); if (dbBlock !== null) { - return prepareBlock(dbBlock); + return dbBlock; } } @@ -665,11 +670,11 @@ class Blocks { await blocksRepository.$saveBlockInDatabase(blockExtended); } - return prepareBlock(blockExtended); + return blockExtended; } /** - * Index a block by hash if it's missing from the database. Returns the block after indexing + * Get one block by its hash */ public async $getBlock(hash: string): Promise { // Check the memory cache @@ -678,29 +683,14 @@ class Blocks { return blockByHash; } - // Block has already been indexed - if (Common.indexingEnabled()) { - const dbBlock = await blocksRepository.$getBlockByHash(hash); - if (dbBlock !== null) { - return prepareBlock(dbBlock); - } - } - - // Not Bitcoin network, return the block as it + // Not Bitcoin network, return the block as it from the bitcoin backend if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) { return await bitcoinApi.$getBlock(hash); } // Bitcoin network, add our custom data on top const block: IEsploraApi.Block = await bitcoinApi.$getBlock(hash); - const transactions = await this.$getTransactionsExtended(hash, block.height, true); - const blockExtended = await this.$getBlockExtended(block, transactions); - if (Common.indexingEnabled()) { - delete(blockExtended['coinbaseTx']); - await blocksRepository.$saveBlockInDatabase(blockExtended); - } - - return blockExtended; + return await this.$indexBlock(block.height); } public async $getStrippedBlockTransactions(hash: string, skipMemoryCache = false, @@ -734,6 +724,18 @@ class Blocks { return summary.transactions; } + /** + * Get 15 blocks + * + * Internally this function uses two methods to get the blocks, and + * the method is automatically selected: + * - Using previous block hash links + * - Using block height + * + * @param fromHeight + * @param limit + * @returns + */ public async $getBlocks(fromHeight?: number, limit: number = 15): Promise { let currentHeight = fromHeight !== undefined ? fromHeight : this.currentBlockHeight; if (currentHeight > this.currentBlockHeight) { @@ -759,11 +761,14 @@ class Blocks { for (let i = 0; i < limit && currentHeight >= 0; i++) { let block = this.getBlocks().find((b) => b.height === currentHeight); if (block) { + // Using the memory cache (find by height) returnBlocks.push(block); } else if (Common.indexingEnabled()) { + // Using indexing (find by height, index on the fly, save in database) block = await this.$indexBlock(currentHeight); returnBlocks.push(block); - } else if (nextHash != null) { + } else if (nextHash !== null) { + // Without indexing, query block on the fly using bitoin backend, follow previous hash links block = await this.$indexBlock(currentHeight); nextHash = block.previousblockhash; returnBlocks.push(block); @@ -788,7 +793,7 @@ class Blocks { const blocks: any[] = []; while (fromHeight <= toHeight) { - let block: any = await blocksRepository.$getBlockByHeight(fromHeight); + let block: BlockExtended | null = await blocksRepository.$getBlockByHeight(fromHeight); if (!block) { await this.$indexBlock(fromHeight); block = await blocksRepository.$getBlockByHeight(fromHeight); @@ -801,11 +806,11 @@ class Blocks { const cleanBlock: any = { height: block.height ?? null, hash: block.id ?? null, - timestamp: block.blockTimestamp ?? null, - median_timestamp: block.medianTime ?? null, + timestamp: block.timestamp ?? null, + median_timestamp: block.mediantime ?? null, previous_block_hash: block.previousblockhash ?? null, difficulty: block.difficulty ?? null, - header: block.header ?? null, + header: block.extras.header ?? null, version: block.version ?? null, bits: block.bits ?? null, nonce: block.nonce ?? null, @@ -813,29 +818,30 @@ class Blocks { weight: block.weight ?? null, tx_count: block.tx_count ?? null, merkle_root: block.merkle_root ?? null, - reward: block.reward ?? null, - total_fee_amt: block.fees ?? null, - avg_fee_amt: block.avg_fee ?? null, - median_fee_amt: block.median_fee_amt ?? null, - fee_amt_percentiles: block.fee_percentiles ?? null, - avg_fee_rate: block.avg_fee_rate ?? null, - median_fee_rate: block.median_fee ?? null, - fee_rate_percentiles: block.fee_span ?? null, - total_inputs: block.total_inputs ?? null, - total_input_amt: block.total_input_amt ?? null, - total_outputs: block.total_outputs ?? null, - total_output_amt: block.total_output_amt ?? null, - segwit_total_txs: block.segwit_total_txs ?? null, - segwit_total_size: block.segwit_total_size ?? null, - segwit_total_weight: block.segwit_total_weight ?? null, - avg_tx_size: block.avg_tx_size ?? null, - utxoset_change: block.utxoset_change ?? null, - utxoset_size: block.utxoset_size ?? null, - coinbase_raw: block.coinbase_raw ?? null, - coinbase_address: block.coinbase_address ?? null, - coinbase_signature: block.coinbase_signature ?? null, - coinbase_signature_ascii: block.coinbase_signature_ascii ?? null, - pool_slug: block.pool_slug ?? null, + reward: block.extras.reward ?? null, + total_fee_amt: block.extras.totalFees ?? null, + avg_fee_amt: block.extras.avgFee ?? null, + median_fee_amt: block.extras.medianFeeAmt ?? null, + fee_amt_percentiles: block.extras.feePercentiles ?? null, + avg_fee_rate: block.extras.avgFeeRate ?? null, + median_fee_rate: block.extras.medianFee ?? null, + fee_rate_percentiles: block.extras.feeRange ?? null, + total_inputs: block.extras.totalInputs ?? null, + total_input_amt: block.extras.totalInputAmt ?? null, + total_outputs: block.extras.totalOutputs ?? null, + total_output_amt: block.extras.totalOutputAmt ?? null, + segwit_total_txs: block.extras.segwitTotalTxs ?? null, + segwit_total_size: block.extras.segwitTotalSize ?? null, + segwit_total_weight: block.extras.segwitTotalWeight ?? null, + avg_tx_size: block.extras.avgTxSize ?? null, + utxoset_change: block.extras.utxoSetChange ?? null, + utxoset_size: block.extras.utxoSetSize ?? null, + coinbase_raw: block.extras.coinbaseRaw ?? null, + coinbase_address: block.extras.coinbaseAddress ?? null, + coinbase_signature: block.extras.coinbaseSignature ?? null, + coinbase_signature_ascii: block.extras.coinbaseSignatureAscii ?? null, + pool_slug: block.extras.pool.slug ?? null, + pool_id: block.extras.pool.id ?? null, }; if (Common.blocksSummariesIndexingEnabled() && cleanBlock.fee_amt_percentiles === null) { diff --git a/backend/src/api/chain-tips.ts b/backend/src/api/chain-tips.ts index 46a06f703..b68b0b281 100644 --- a/backend/src/api/chain-tips.ts +++ b/backend/src/api/chain-tips.ts @@ -43,7 +43,11 @@ class ChainTips { } } - public getOrphanedBlocksAtHeight(height: number): OrphanedBlock[] { + public getOrphanedBlocksAtHeight(height: number | undefined): OrphanedBlock[] { + if (height === undefined) { + return []; + } + const orphans: OrphanedBlock[] = []; for (const block of this.orphanedBlocks) { if (block.height === height) { diff --git a/backend/src/api/pools-parser.ts b/backend/src/api/pools-parser.ts index b34dcb7b8..0f009cd1d 100644 --- a/backend/src/api/pools-parser.ts +++ b/backend/src/api/pools-parser.ts @@ -7,6 +7,7 @@ import { PoolTag } from '../mempool.interfaces'; class PoolsParser { miningPools: any[] = []; unknownPool: any = { + 'id': 0, 'name': 'Unknown', 'link': 'https://learnmeabitcoin.com/technical/coinbase-transaction', 'regexes': '[]', @@ -26,6 +27,7 @@ class PoolsParser { public setMiningPools(pools): void { for (const pool of pools) { pool.regexes = pool.tags; + pool.slug = pool.name.replace(/[^a-z0-9]/gi, '').toLowerCase(); delete(pool.tags); } this.miningPools = pools; diff --git a/backend/src/index.ts b/backend/src/index.ts index 6f259a2bd..7207ae7a8 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -179,7 +179,14 @@ class Server { setTimeout(this.runMainUpdateLoop.bind(this), config.MEMPOOL.POLL_RATE_MS); this.currentBackendRetryInterval = 5; } catch (e: any) { - const loggerMsg = `runMainLoop error: ${(e instanceof Error ? e.message : e)}. Retrying in ${this.currentBackendRetryInterval} sec.`; + let loggerMsg = `Exception in runMainUpdateLoop(). Retrying in ${this.currentBackendRetryInterval} sec.`; + loggerMsg += ` Reason: ${(e instanceof Error ? e.message : e)}.`; + if (e?.stack) { + loggerMsg += ` Stack trace: ${e.stack}`; + } + // When we get a first Exception, only `logger.debug` it and retry after 5 seconds + // From the second Exception, `logger.warn` the Exception and increase the retry delay + // Maximum retry delay is 60 seconds if (this.currentBackendRetryInterval > 5) { logger.warn(loggerMsg); mempool.setOutOfSync(); diff --git a/backend/src/mempool.interfaces.ts b/backend/src/mempool.interfaces.ts index cb95be98a..a7937e01d 100644 --- a/backend/src/mempool.interfaces.ts +++ b/backend/src/mempool.interfaces.ts @@ -1,9 +1,10 @@ import { IEsploraApi } from './api/bitcoin/esplora-api.interface'; import { OrphanedBlock } from './api/chain-tips'; -import { HeapNode } from "./utils/pairing-heap"; +import { HeapNode } from './utils/pairing-heap'; export interface PoolTag { - id: number; // mysql row id + id: number; + uniqueId: number; name: string; link: string; regexes: string; // JSON array @@ -147,44 +148,44 @@ export interface TransactionStripped { } export interface BlockExtension { - totalFees?: number; - medianFee?: number; - feeRange?: number[]; - reward?: number; - coinbaseTx?: TransactionMinerInfo; - matchRate?: number; - pool?: { - id: number; + totalFees: number; + medianFee: number; // median fee rate + feeRange: number[]; // fee rate percentiles + reward: number; + matchRate: number | null; + pool: { + id: number; // Note - This is the `unique_id`, not to mix with the auto increment `id` name: string; slug: string; }; - avgFee?: number; - avgFeeRate?: number; - coinbaseRaw?: string; - usd?: number | null; - medianTimestamp?: number; - blockTime?: number; - orphans?: OrphanedBlock[] | null; - coinbaseAddress?: string | null; - coinbaseSignature?: string | null; - coinbaseSignatureAscii?: string | null; - virtualSize?: number; - avgTxSize?: number; - totalInputs?: number; - totalOutputs?: number; - totalOutputAmt?: number; - medianFeeAmt?: number | null; - feePercentiles?: number[] | null, - segwitTotalTxs?: number; - segwitTotalSize?: number; - segwitTotalWeight?: number; - header?: string; - utxoSetChange?: number; + avgFee: number; + avgFeeRate: number; + coinbaseRaw: string; + orphans: OrphanedBlock[] | null; + coinbaseAddress: string | null; + coinbaseSignature: string | null; + coinbaseSignatureAscii: string | null; + virtualSize: number; + avgTxSize: number; + totalInputs: number; + totalOutputs: number; + totalOutputAmt: number; + medianFeeAmt: number | null; // median fee in sats + feePercentiles: number[] | null, // fee percentiles in sats + segwitTotalTxs: number; + segwitTotalSize: number; + segwitTotalWeight: number; + header: string; + utxoSetChange: number; // Requires coinstatsindex, will be set to NULL otherwise - utxoSetSize?: number | null; - totalInputAmt?: number | null; + utxoSetSize: number | null; + totalInputAmt: number | null; } +/** + * Note: Everything that is added in here will be automatically returned through + * /api/v1/block and /api/v1/blocks APIs + */ export interface BlockExtended extends IEsploraApi.Block { extras: BlockExtension; } diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index c7edb97cb..ac12b3430 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -1,8 +1,7 @@ -import { BlockExtended, BlockPrice } from '../mempool.interfaces'; +import { BlockExtended, BlockExtension, BlockPrice } from '../mempool.interfaces'; import DB from '../database'; import logger from '../logger'; import { Common } from '../api/common'; -import { prepareBlock } from '../utils/blocks-utils'; import PoolsRepository from './PoolsRepository'; import HashratesRepository from './HashratesRepository'; import { escape } from 'mysql2'; @@ -10,6 +9,50 @@ import BlocksSummariesRepository from './BlocksSummariesRepository'; import DifficultyAdjustmentsRepository from './DifficultyAdjustmentsRepository'; import bitcoinClient from '../api/bitcoin/bitcoin-client'; import config from '../config'; +import chainTips from '../api/chain-tips'; +import blocks from '../api/blocks'; + +const BLOCK_DB_FIELDS = ` + blocks.hash AS id, + blocks.height, + blocks.version, + UNIX_TIMESTAMP(blocks.blockTimestamp) AS timestamp, + blocks.bits, + blocks.nonce, + blocks.difficulty, + blocks.merkle_root, + blocks.tx_count, + blocks.size, + blocks.weight, + blocks.previous_block_hash AS previousblockhash, + UNIX_TIMESTAMP(blocks.median_timestamp) AS mediantime, + blocks.fees AS totalFees, + blocks.median_fee AS medianFee, + blocks.fee_span AS feeRange, + blocks.reward, + pools.unique_id AS poolId, + pools.name AS poolName, + pools.slug AS poolSlug, + blocks.avg_fee AS avgFee, + blocks.avg_fee_rate AS avgFeeRate, + blocks.coinbase_raw AS coinbaseRaw, + blocks.coinbase_address AS coinbaseAddress, + blocks.coinbase_signature AS coinbaseSignature, + blocks.coinbase_signature_ascii AS coinbaseSignatureAscii, + blocks.avg_tx_size AS avgTxSize, + blocks.total_inputs AS totalInputs, + blocks.total_outputs AS totalOutputs, + blocks.total_output_amt AS totalOutputAmt, + blocks.median_fee_amt AS medianFeeAmt, + blocks.fee_percentiles AS feePercentiles, + blocks.segwit_total_txs AS segwitTotalTxs, + blocks.segwit_total_size AS segwitTotalSize, + blocks.segwit_total_weight AS segwitTotalWeight, + blocks.header, + blocks.utxoset_change AS utxoSetChange, + blocks.utxoset_size AS utxoSetSize, + blocks.total_input_amt AS totalInputAmts +`; class BlocksRepository { /** @@ -44,6 +87,11 @@ class BlocksRepository { ?, ? )`; + const poolDbId = await PoolsRepository.$getPoolByUniqueId(block.extras.pool.id); + if (!poolDbId) { + throw Error(`Could not find a mining pool with the unique_id = ${block.extras.pool.id}. This error should never be printed.`); + } + const params: any[] = [ block.height, block.id, @@ -53,7 +101,7 @@ class BlocksRepository { block.tx_count, block.extras.coinbaseRaw, block.difficulty, - block.extras.pool?.id, // Should always be set to something + poolDbId.id, block.extras.totalFees, JSON.stringify(block.extras.feeRange), block.extras.medianFee, @@ -65,7 +113,7 @@ class BlocksRepository { block.previousblockhash, block.extras.avgFee, block.extras.avgFeeRate, - block.extras.medianTimestamp, + block.mediantime, block.extras.header, block.extras.coinbaseAddress, truncatedCoinbaseSignature, @@ -87,9 +135,9 @@ class BlocksRepository { await DB.query(query, params); } catch (e: any) { if (e.errno === 1062) { // ER_DUP_ENTRY - This scenario is possible upon node backend restart - logger.debug(`$saveBlockInDatabase() - Block ${block.height} has already been indexed, ignoring`); + logger.debug(`$saveBlockInDatabase() - Block ${block.height} has already been indexed, ignoring`, logger.tags.mining); } else { - logger.err('Cannot save indexed block into db. Reason: ' + (e instanceof Error ? e.message : e)); + logger.err('Cannot save indexed block into db. Reason: ' + (e instanceof Error ? e.message : e), logger.tags.mining); throw e; } } @@ -307,34 +355,17 @@ class BlocksRepository { /** * Get blocks mined by a specific mining pool */ - public async $getBlocksByPool(slug: string, startHeight?: number): Promise { + public async $getBlocksByPool(slug: string, startHeight?: number): Promise { const pool = await PoolsRepository.$getPool(slug); if (!pool) { throw new Error('This mining pool does not exist ' + escape(slug)); } const params: any[] = []; - let query = ` SELECT - blocks.height, - hash as id, - UNIX_TIMESTAMP(blocks.blockTimestamp) as blockTimestamp, - size, - weight, - tx_count, - coinbase_raw, - difficulty, - fees, - fee_span, - median_fee, - reward, - version, - bits, - nonce, - merkle_root, - previous_block_hash as previousblockhash, - avg_fee, - avg_fee_rate + let query = ` + SELECT ${BLOCK_DB_FIELDS} FROM blocks + JOIN pools ON blocks.pool_id = pools.id WHERE pool_id = ?`; params.push(pool.id); @@ -347,11 +378,11 @@ class BlocksRepository { LIMIT 10`; try { - const [rows] = await DB.query(query, params); + const [rows]: any[] = await DB.query(query, params); const blocks: BlockExtended[] = []; - for (const block of rows) { - blocks.push(prepareBlock(block)); + for (const block of rows) { + blocks.push(await this.formatDbBlockIntoExtendedBlock(block)); } return blocks; @@ -364,32 +395,21 @@ class BlocksRepository { /** * Get one block by height */ - public async $getBlockByHeight(height: number): Promise { + public async $getBlockByHeight(height: number): Promise { try { - const [rows]: any[] = await DB.query(`SELECT - blocks.*, - hash as id, - UNIX_TIMESTAMP(blocks.blockTimestamp) as blockTimestamp, - UNIX_TIMESTAMP(blocks.median_timestamp) as medianTime, - pools.id as pool_id, - pools.name as pool_name, - pools.link as pool_link, - pools.slug as pool_slug, - pools.addresses as pool_addresses, - pools.regexes as pool_regexes, - previous_block_hash as previousblockhash + const [rows]: any[] = await DB.query(` + SELECT ${BLOCK_DB_FIELDS} FROM blocks JOIN pools ON blocks.pool_id = pools.id - WHERE blocks.height = ${height} - `); + WHERE blocks.height = ?`, + [height] + ); if (rows.length <= 0) { return null; } - rows[0].fee_span = JSON.parse(rows[0].fee_span); - rows[0].fee_percentiles = JSON.parse(rows[0].fee_percentiles); - return rows[0]; + return await this.formatDbBlockIntoExtendedBlock(rows[0]); } catch (e) { logger.err(`Cannot get indexed block ${height}. Reason: ` + (e instanceof Error ? e.message : e)); throw e; @@ -402,10 +422,7 @@ class BlocksRepository { public async $getBlockByHash(hash: string): Promise { try { const query = ` - SELECT *, blocks.height, UNIX_TIMESTAMP(blocks.blockTimestamp) as blockTimestamp, hash as id, - pools.id as pool_id, pools.name as pool_name, pools.link as pool_link, pools.slug as pool_slug, - pools.addresses as pool_addresses, pools.regexes as pool_regexes, - previous_block_hash as previousblockhash + SELECT ${BLOCK_DB_FIELDS} FROM blocks JOIN pools ON blocks.pool_id = pools.id WHERE hash = ?; @@ -415,9 +432,8 @@ class BlocksRepository { if (rows.length <= 0) { return null; } - - rows[0].fee_span = JSON.parse(rows[0].fee_span); - return rows[0]; + + return await this.formatDbBlockIntoExtendedBlock(rows[0]); } catch (e) { logger.err(`Cannot get indexed block ${hash}. Reason: ` + (e instanceof Error ? e.message : e)); throw e; @@ -833,6 +849,86 @@ class BlocksRepository { throw e; } } + + /** + * Convert a mysql row block into a BlockExtended. Note that you + * must provide the correct field into dbBlk object param + * + * @param dbBlk + */ + private async formatDbBlockIntoExtendedBlock(dbBlk: any): Promise { + const blk: Partial = {}; + const extras: Partial = {}; + + // IEsploraApi.Block + blk.id = dbBlk.id; + blk.height = dbBlk.height; + blk.version = dbBlk.version; + blk.timestamp = dbBlk.timestamp; + blk.bits = dbBlk.bits; + blk.nonce = dbBlk.nonce; + blk.difficulty = dbBlk.difficulty; + blk.merkle_root = dbBlk.merkle_root; + blk.tx_count = dbBlk.tx_count; + blk.size = dbBlk.size; + blk.weight = dbBlk.weight; + blk.previousblockhash = dbBlk.previousblockhash; + blk.mediantime = dbBlk.mediantime; + + // BlockExtension + extras.totalFees = dbBlk.totalFees; + extras.medianFee = dbBlk.medianFee; + extras.feeRange = JSON.parse(dbBlk.feeRange); + extras.reward = dbBlk.reward; + extras.pool = { + id: dbBlk.poolId, + name: dbBlk.poolName, + slug: dbBlk.poolSlug, + }; + extras.avgFee = dbBlk.avgFee; + extras.avgFeeRate = dbBlk.avgFeeRate; + extras.coinbaseRaw = dbBlk.coinbaseRaw; + extras.coinbaseAddress = dbBlk.coinbaseAddress; + extras.coinbaseSignature = dbBlk.coinbaseSignature; + extras.coinbaseSignatureAscii = dbBlk.coinbaseSignatureAscii; + extras.avgTxSize = dbBlk.avgTxSize; + extras.totalInputs = dbBlk.totalInputs; + extras.totalOutputs = dbBlk.totalOutputs; + extras.totalOutputAmt = dbBlk.totalOutputAmt; + extras.medianFeeAmt = dbBlk.medianFeeAmt; + extras.feePercentiles = JSON.parse(dbBlk.feePercentiles); + extras.segwitTotalTxs = dbBlk.segwitTotalTxs; + extras.segwitTotalSize = dbBlk.segwitTotalSize; + extras.segwitTotalWeight = dbBlk.segwitTotalWeight; + extras.header = dbBlk.header, + extras.utxoSetChange = dbBlk.utxoSetChange; + extras.utxoSetSize = dbBlk.utxoSetSize; + extras.totalInputAmt = dbBlk.totalInputAmt; + extras.virtualSize = dbBlk.weight / 4.0; + + // Re-org can happen after indexing so we need to always get the + // latest state from core + extras.orphans = chainTips.getOrphanedBlocksAtHeight(dbBlk.height); + + // If we're missing block summary related field, check if we can populate them on the fly now + if (Common.blocksSummariesIndexingEnabled() && + (extras.medianFeeAmt === null || extras.feePercentiles === null)) + { + extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(dbBlk.id); + if (extras.feePercentiles === null) { + const block = await bitcoinClient.getBlock(dbBlk.id, 2); + const summary = blocks.summarizeBlock(block); + await BlocksSummariesRepository.$saveSummary({ height: block.height, mined: summary }); + extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(dbBlk.id); + } + if (extras.feePercentiles !== null) { + extras.medianFeeAmt = extras.feePercentiles[3]; + } + } + + blk.extras = extras; + return blk; + } } export default new BlocksRepository(); diff --git a/backend/src/repositories/PoolsRepository.ts b/backend/src/repositories/PoolsRepository.ts index 236955d65..293fd5e39 100644 --- a/backend/src/repositories/PoolsRepository.ts +++ b/backend/src/repositories/PoolsRepository.ts @@ -10,7 +10,7 @@ class PoolsRepository { * Get all pools tagging info */ public async $getPools(): Promise { - const [rows] = await DB.query('SELECT id, name, addresses, regexes, slug FROM pools;'); + const [rows] = await DB.query('SELECT id, unique_id as uniqueId, name, addresses, regexes, slug FROM pools'); return rows; } @@ -18,10 +18,10 @@ class PoolsRepository { * Get unknown pool tagging info */ public async $getUnknownPool(): Promise { - let [rows]: any[] = await DB.query('SELECT id, name, slug FROM pools where name = "Unknown"'); + let [rows]: any[] = await DB.query('SELECT id, unique_id as uniqueId, name, slug FROM pools where name = "Unknown"'); if (rows && rows.length === 0 && config.DATABASE.ENABLED) { await poolsParser.$insertUnknownPool(); - [rows] = await DB.query('SELECT id, name, slug FROM pools where name = "Unknown"'); + [rows] = await DB.query('SELECT id, unique_id as uniqueId, name, slug FROM pools where name = "Unknown"'); } return rows[0]; } diff --git a/backend/src/utils/blocks-utils.ts b/backend/src/utils/blocks-utils.ts deleted file mode 100644 index 43a2fc964..000000000 --- a/backend/src/utils/blocks-utils.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { BlockExtended } from '../mempool.interfaces'; - -export function prepareBlock(block: any): BlockExtended { - return { - id: block.id ?? block.hash, // hash for indexed block - timestamp: block.timestamp ?? block.time ?? block.blockTimestamp, // blockTimestamp for indexed block - height: block.height, - version: block.version, - bits: (typeof block.bits === 'string' ? parseInt(block.bits, 16): block.bits), - nonce: block.nonce, - difficulty: block.difficulty, - merkle_root: block.merkle_root ?? block.merkleroot, - tx_count: block.tx_count ?? block.nTx, - size: block.size, - weight: block.weight, - previousblockhash: block.previousblockhash, - extras: { - coinbaseRaw: block.coinbase_raw ?? block.extras?.coinbaseRaw, - medianFee: block.medianFee ?? block.median_fee ?? block.extras?.medianFee, - feeRange: block.feeRange ?? block?.extras?.feeRange ?? block.fee_span, - reward: block.reward ?? block?.extras?.reward, - totalFees: block.totalFees ?? block?.fees ?? block?.extras?.totalFees, - avgFee: block?.extras?.avgFee ?? block.avg_fee, - avgFeeRate: block?.avgFeeRate ?? block.avg_fee_rate, - pool: block?.extras?.pool ?? (block?.pool_id ? { - id: block.pool_id, - name: block.pool_name, - slug: block.pool_slug, - } : undefined), - usd: block?.extras?.usd ?? block.usd ?? null, - } - }; -} diff --git a/frontend/src/app/interfaces/node-api.interface.ts b/frontend/src/app/interfaces/node-api.interface.ts index 8fa30a723..7ed32a9de 100644 --- a/frontend/src/app/interfaces/node-api.interface.ts +++ b/frontend/src/app/interfaces/node-api.interface.ts @@ -114,7 +114,6 @@ export interface BlockExtension { medianFee?: number; feeRange?: number[]; reward?: number; - coinbaseTx?: Transaction; coinbaseRaw?: string; matchRate?: number; pool?: { From 01d699e454648a97a4f374e120f3276666691461 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 27 Feb 2023 18:39:02 +0900 Subject: [PATCH 09/47] Add missing match rate to the block returned from the database --- backend/src/repositories/BlocksRepository.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index ac12b3430..9cd31bbab 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -11,6 +11,7 @@ import bitcoinClient from '../api/bitcoin/bitcoin-client'; import config from '../config'; import chainTips from '../api/chain-tips'; import blocks from '../api/blocks'; +import BlocksAuditsRepository from './BlocksAuditsRepository'; const BLOCK_DB_FIELDS = ` blocks.hash AS id, @@ -910,6 +911,15 @@ class BlocksRepository { // latest state from core extras.orphans = chainTips.getOrphanedBlocksAtHeight(dbBlk.height); + // Match rate is not part of the blocks table, but it is part of APIs so we must include it + extras.matchRate = null; + if (config.MEMPOOL.AUDIT) { + const auditScore = await BlocksAuditsRepository.$getBlockAuditScore(dbBlk.id); + if (auditScore != null) { + extras.matchRate = auditScore.matchRate; + } + } + // If we're missing block summary related field, check if we can populate them on the fly now if (Common.blocksSummariesIndexingEnabled() && (extras.medianFeeAmt === null || extras.feePercentiles === null)) From 76ae9d4ccba76ba8d8a854d9ce39474185bf273a Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 27 Feb 2023 19:06:46 +0900 Subject: [PATCH 10/47] Wipe the disk cache since we have a new block structure --- backend/src/api/disk-cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/disk-cache.ts b/backend/src/api/disk-cache.ts index a75fd43cc..2a53e7b9b 100644 --- a/backend/src/api/disk-cache.ts +++ b/backend/src/api/disk-cache.ts @@ -9,7 +9,7 @@ import { TransactionExtended } from '../mempool.interfaces'; import { Common } from './common'; class DiskCache { - private cacheSchemaVersion = 2; + private cacheSchemaVersion = 3; private static FILE_NAME = config.MEMPOOL.CACHE_DIR + '/cache.json'; private static FILE_NAMES = config.MEMPOOL.CACHE_DIR + '/cache{number}.json'; From 174758bdd9effd92bf6bd2e57cf77738da862b51 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Tue, 28 Feb 2023 00:20:30 -0500 Subject: [PATCH 11/47] Specify networks in lightning network graph labels --- .../nodes-networks-chart.component.ts | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts index 0ff9f4af1..e257864fa 100644 --- a/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts +++ b/frontend/src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts @@ -161,28 +161,7 @@ export class NodesNetworksChartComponent implements OnInit { { zlevel: 1, yAxisIndex: 0, - name: $localize`Reachable on Clearnet Only`, - showSymbol: false, - symbol: 'none', - data: data.clearnet_nodes, - type: 'line', - lineStyle: { - width: 2, - }, - areaStyle: { - opacity: 0.5, - }, - stack: 'Total', - color: new graphic.LinearGradient(0, 0.75, 0, 1, [ - { offset: 0, color: '#FFB300' }, - { offset: 1, color: '#FFB300AA' }, - ]), - smooth: false, - }, - { - zlevel: 1, - yAxisIndex: 0, - name: $localize`Reachable on Clearnet and Darknet`, + name: $localize`Clearnet and Darknet`, showSymbol: false, symbol: 'none', data: data.clearnet_tor_nodes, @@ -203,7 +182,28 @@ export class NodesNetworksChartComponent implements OnInit { { zlevel: 1, yAxisIndex: 0, - name: $localize`Reachable on Darknet Only`, + name: $localize`Clearnet (IPv4, IPv6)`, + showSymbol: false, + symbol: 'none', + data: data.clearnet_nodes, + type: 'line', + lineStyle: { + width: 2, + }, + areaStyle: { + opacity: 0.5, + }, + stack: 'Total', + color: new graphic.LinearGradient(0, 0.75, 0, 1, [ + { offset: 0, color: '#FFB300' }, + { offset: 1, color: '#FFB300AA' }, + ]), + smooth: false, + }, + { + zlevel: 1, + yAxisIndex: 0, + name: $localize`Darknet Only (Tor, I2P, cjdns)`, showSymbol: false, symbol: 'none', data: data.tor_nodes, @@ -284,7 +284,7 @@ export class NodesNetworksChartComponent implements OnInit { padding: 10, data: [ { - name: $localize`Reachable on Darknet Only`, + name: $localize`Darknet Only (Tor, I2P, cjdns)`, inactiveColor: 'rgb(110, 112, 121)', textStyle: { color: 'white', @@ -292,7 +292,7 @@ export class NodesNetworksChartComponent implements OnInit { icon: 'roundRect', }, { - name: $localize`Reachable on Clearnet and Darknet`, + name: $localize`Clearnet (IPv4, IPv6)`, inactiveColor: 'rgb(110, 112, 121)', textStyle: { color: 'white', @@ -300,7 +300,7 @@ export class NodesNetworksChartComponent implements OnInit { icon: 'roundRect', }, { - name: $localize`Reachable on Clearnet Only`, + name: $localize`Clearnet and Darknet`, inactiveColor: 'rgb(110, 112, 121)', textStyle: { color: 'white', @@ -317,9 +317,9 @@ export class NodesNetworksChartComponent implements OnInit { }, ], selected: this.widget ? undefined : JSON.parse(this.storageService.getValue('nodes_networks_legend')) ?? { - '$localize`Reachable on Darknet Only`': true, - '$localize`Reachable on Clearnet Only`': true, - '$localize`Reachable on Clearnet and Darknet`': true, + '$localize`Darknet Only (Tor, I2P, cjdns)`': true, + '$localize`Clearnet (IPv4, IPv6)`': true, + '$localize`Clearnet and Darknet`': true, '$localize`:@@e5d8bb389c702588877f039d72178f219453a72d:Unknown`': true, } }, From 4bdad54bb20a81ab81b8f8a558a50dba6852dc89 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Tue, 28 Feb 2023 04:54:31 -0500 Subject: [PATCH 12/47] Link api rate limit note to /enterprise --- frontend/src/app/docs/api-docs/api-docs.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 47332abc3..8c8d6ac36 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -39,7 +39,7 @@

Below is a reference for the {{ network.val === '' ? 'Bitcoin' : network.val.charAt(0).toUpperCase() + network.val.slice(1) }} REST API service.

-

Note that we enforce rate limits. If you exceed these limits, you will get a polite error encouraging you to run your own Mempool instance. If you repeatedly exceed the limits, you may be banned from accessing the service altogether.

+

Note that we enforce rate limits. If you exceed these limits, you will get an HTTP 429 error. If you repeatedly exceed the limits, you may be banned from accessing the service altogether. Consider an enterprise sponsorship if you need higher API limits.

{{ item.title }}

From 73b90fcd250fc19568ad29e16a5f86f024756c6f Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Fri, 24 Feb 2023 09:44:15 -0500 Subject: [PATCH 13/47] Add skeleton for blocks-bulk endpoint --- .../src/app/docs/api-docs/api-docs-data.ts | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index a6e8e418f..2c3bbc06b 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -2907,6 +2907,54 @@ export const restApiDocsData = [ } }, ... +]` + }, + codeSampleLiquid: emptyCodeSample, + codeSampleLiquidTestnet: emptyCodeSample, + codeSampleBisq: emptyCodeSample, + } + } + }, + { + type: "endpoint", + category: "blocks", + httpRequestMethod: "GET", + fragment: "get-blocks-bulk", + title: "GET Blocks (Bulk)", + description: { + default: "Returns details on the range of blocks between :minHeight and :maxHeight, inclusive, up to 100 blocks. If :maxHeight is not specified, :maxHeight defaults to the current tip." + }, + urlString: "/v1/blocks-bulk/:minHeight[/:maxHeight]", + showConditions: bitcoinNetworks, + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `/api/v1/blocks-bulk/%{1}/%{2}`, + commonJS: ``, + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: [730000, 730100], + response: `[ + +]`, + }, + codeSampleTestnet: { + esModule: ['2091187'], + commonJS: ['2091187'], + curl: ['2091187'], + response: `[ + +]` + }, + codeSampleSignet: { + esModule: ['53783'], + commonJS: ['53783'], + curl: ['53783'], + response: `[ + ]` }, codeSampleLiquid: emptyCodeSample, From f057b07021ef7e678dbf929d2b1ee2275adb5afe Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Sat, 25 Feb 2023 02:26:06 -0500 Subject: [PATCH 14/47] Add note for special availability Indicating that api endpoint is only available for enterprise sponsors. --- .../src/app/docs/api-docs/api-docs-data.ts | 1 + .../app/docs/api-docs/api-docs.component.html | 2 ++ .../app/docs/api-docs/api-docs.component.scss | 22 +++++++++++++++++++ frontend/src/app/shared/shared.module.ts | 3 ++- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index 2c3bbc06b..525e19320 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -2927,6 +2927,7 @@ export const restApiDocsData = [ urlString: "/v1/blocks-bulk/:minHeight[/:maxHeight]", showConditions: bitcoinNetworks, showJsExamples: showJsExamplesDefaultFalse, + specialAvailability: { enterprise: true }, codeExample: { default: { codeTemplate: { diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 47332abc3..4687fe0b2 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -46,6 +46,8 @@
{{ item.title }} {{ item.category }}
+

This endpoint is available to enterprise sponsors.

+

This endpoint is only supported on official mempool.space instances.

Endpoint
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.scss b/frontend/src/app/docs/api-docs/api-docs.component.scss index 92e78bc55..231871db6 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.scss +++ b/frontend/src/app/docs/api-docs/api-docs.component.scss @@ -284,6 +284,28 @@ h3 { margin-bottom: 0; } +.special-availability { + padding: 16px; + margin-bottom: 15px; + background-color: #1d1f31; +} + +.special-availability table tr td:first-child { + padding-right: 10px; +} + +.special-availability.enterprise fa-icon { + color: #ffc107; +} + +.special-availability.mempoolspace fa-icon { + color: #1bd8f4; +} + +.special-availability p { + margin: 0; +} + @media (max-width: 992px) { h3 { diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts index fd257db85..46d831309 100644 --- a/frontend/src/app/shared/shared.module.ts +++ b/frontend/src/app/shared/shared.module.ts @@ -4,7 +4,7 @@ import { NgbCollapseModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstra import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle, faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, - faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft } from '@fortawesome/free-solid-svg-icons'; + faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft, faStar } from '@fortawesome/free-solid-svg-icons'; import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { MasterPageComponent } from '../components/master-page/master-page.component'; import { PreviewTitleComponent } from '../components/master-page-preview/preview-title.component'; @@ -309,5 +309,6 @@ export class SharedModule { library.addIcons(faQrcode); library.addIcons(faArrowRightArrowLeft); library.addIcons(faExchangeAlt); + library.addIcons(faStar); } } From 852513500af5b5fd94415fe6bc842982acf53c3d Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Sun, 26 Feb 2023 03:12:41 -0500 Subject: [PATCH 15/47] Add example responses for blocks-bulk --- .../src/app/docs/api-docs/api-docs-data.ts | 185 +++++++++++++++++- 1 file changed, 175 insertions(+), 10 deletions(-) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index 525e19320..d3d50fe79 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -2937,25 +2937,190 @@ export const restApiDocsData = [ codeSampleMainnet: { esModule: [], commonJS: [], - curl: [730000, 730100], + curl: [100000,100000], response: `[ - + { + "height": 100000, + "hash": "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506", + "timestamp": 1293623863, + "median_timestamp": 1293622620, + "previous_block_hash": "000000000002d01c1fccc21636b607dfd930d31d01c3a62104612a1719011250", + "difficulty": 14484.1623612254, + "header": "0100000050120119172a610421a6c3011dd330d9df07b63616c2cc1f1cd00200000000006657a9252aacd5c0b2940996ecff952228c3067cc38d4885efb5a4ac4247e9f337221b4d4c86041b0f2b5710", + "version": 1, + "bits": 453281356, + "nonce": 274148111, + "size": 957, + "weight": 3828, + "tx_count": 4, + "merkle_root": "f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766", + "reward": 5000000000, + "total_fee_amt": 0, + "avg_fee_amt": 0, + "median_fee_amt": 0, + "fee_amt_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "avg_fee_rate": 0, + "median_fee_rate": 0, + "fee_rate_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "total_inputs": 3, + "total_input_amt": 5301000000, + "total_outputs": 6, + "total_output_amt": 5301000000, + "segwit_total_txs": 0, + "segwit_total_size": 0, + "segwit_total_weight": 0, + "avg_tx_size": 185.25, + "utxoset_change": 3, + "utxoset_size": 71888, + "coinbase_raw": "044c86041b020602", + "coinbase_address": null, + "coinbase_signature": "OP_PUSHBYTES_65 041b0e8c2567c12536aa13357b79a073dc4444acb83c4ec7a0e2f99dd7457516c5817242da796924ca4e99947d087fedf9ce467cb9f7c6287078f801df276fdf84 OP_CHECKSIG", + "coinbase_signature_ascii": "\u0004L�\u0004\u001b\u0002\u0006\u0002", + "pool_slug": "unknown", + "orphans": [] + } ]`, }, codeSampleTestnet: { - esModule: ['2091187'], - commonJS: ['2091187'], - curl: ['2091187'], + esModule: [], + commonJS: [], + curl: [100000,100000], response: `[ - + { + "height": 100000, + "hash": "00000000009e2958c15ff9290d571bf9459e93b19765c6801ddeccadbb160a1e", + "timestamp": 1376123972, + "median_timestamp": 1677396660, + "previous_block_hash": "000000004956cc2edd1a8caa05eacfa3c69f4c490bfc9ace820257834115ab35", + "difficulty": 271.7576739288896, + "header": "0200000035ab154183570282ce9afc0b494c9fc6a3cfea05aa8c1add2ecc56490000000038ba3d78e4500a5a7570dbe61960398add4410d278b21cd9708e6d9743f374d544fc055227f1001c29c1ea3b", + "version": 2, + "bits": 469823783, + "nonce": 1005240617, + "size": 221, + "weight": 884, + "tx_count": 1, + "merkle_root": "d574f343976d8e70d91cb278d21044dd8a396019e6db70755a0a50e4783dba38", + "reward": 5000000000, + "total_fee_amt": 0, + "avg_fee_amt": 0, + "median_fee_amt": 0, + "fee_amt_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "avg_fee_rate": 0, + "median_fee_rate": 0, + "fee_rate_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "total_inputs": 0, + "total_input_amt": null, + "total_outputs": 1, + "total_output_amt": 0, + "segwit_total_txs": 0, + "segwit_total_size": 0, + "segwit_total_weight": 0, + "avg_tx_size": 0, + "utxoset_change": 1, + "utxoset_size": null, + "coinbase_raw": "03a08601000427f1001c046a510100522cfabe6d6d0000000000000000000068692066726f6d20706f6f6c7365727665726aac1eeeed88", + "coinbase_address": "mtkbaiLiUH3fvGJeSzuN3kUgmJzqinLejJ", + "coinbase_signature": "OP_DUP OP_HASH160 OP_PUSHBYTES_20 912e2b234f941f30b18afbb4fa46171214bf66c8 OP_EQUALVERIFY OP_CHECKSIG", + "coinbase_signature_ascii": "\u0003 �\u0001\u0000\u0004'ñ\u0000\u001c\u0004jQ\u0001\u0000R,ú¾mm\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000hi from poolserverj¬\u001eîí�", + "pool_slug": "unknown", + "orphans": [] + } ]` }, codeSampleSignet: { - esModule: ['53783'], - commonJS: ['53783'], - curl: ['53783'], + esModule: [], + commonJS: [], + curl: [100000,100000], response: `[ - + { + "height": 100000, + "hash": "0000008753108390007b3f5c26e5d924191567e147876b84489b0c0cf133a0bf", + "timestamp": 1658421183, + "median_timestamp": 1658418056, + "previous_block_hash": "000000b962a13c3dd3f81917bc8646a0c98224adcd5124026d4fdfcb76a76d30", + "difficulty": 0.002781447610743506, + "header": "00000020306da776cbdf4f6d022451cdad2482c9a04686bc1719f8d33d3ca162b90000001367fb15320ebb1932fd589f8f38866b692ca8a4ad6100a4bc732d212916d0efbf7fd9628567011e47662d00", + "version": 536870912, + "bits": 503408517, + "nonce": 2975303, + "size": 343, + "weight": 1264, + "tx_count": 1, + "merkle_root": "efd01629212d73bca40061ada4a82c696b86388f9f58fd3219bb0e3215fb6713", + "reward": 5000000000, + "total_fee_amt": 0, + "avg_fee_amt": 0, + "median_fee_amt": 0, + "fee_amt_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "avg_fee_rate": 0, + "median_fee_rate": 0, + "fee_rate_percentiles": { + "min": 0, + "perc_10": 0, + "perc_25": 0, + "perc_50": 0, + "perc_75": 0, + "perc_90": 0, + "max": 0 + }, + "total_inputs": 0, + "total_input_amt": null, + "total_outputs": 2, + "total_output_amt": 0, + "segwit_total_txs": 0, + "segwit_total_size": 0, + "segwit_total_weight": 0, + "avg_tx_size": 0, + "utxoset_change": 2, + "utxoset_size": null, + "coinbase_raw": "03a08601", + "coinbase_address": "tb1psfjl80vk0yp3agcq6ylueas29rau00mfq90mhejerpgccg33xhasd9gjyd", + "coinbase_signature": "OP_PUSHNUM_1 OP_PUSHBYTES_32 8265f3bd9679031ea300d13fccf60a28fbc7bf69015fbbe65918518c223135fb", + "coinbase_signature_ascii": "\u0003 �\u0001", + "pool_slug": "unknown", + "orphans": [] + } ]` }, codeSampleLiquid: emptyCodeSample, From 54f7e59978bd839baae9490ddd26a13a1f9cabf0 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Tue, 28 Feb 2023 04:15:45 -0500 Subject: [PATCH 16/47] Correct number of blocks returned for bulk-blocks --- frontend/src/app/docs/api-docs/api-docs-data.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index d3d50fe79..62d031613 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -2922,12 +2922,11 @@ export const restApiDocsData = [ fragment: "get-blocks-bulk", title: "GET Blocks (Bulk)", description: { - default: "Returns details on the range of blocks between :minHeight and :maxHeight, inclusive, up to 100 blocks. If :maxHeight is not specified, :maxHeight defaults to the current tip." + default: "

Returns details on the range of blocks between :minHeight and :maxHeight, inclusive, up to 10 blocks. If :maxHeight is not specified, it defaults to the current tip.

To return data for more than 10 blocks, consider becoming an enterprise sponsor.

" }, urlString: "/v1/blocks-bulk/:minHeight[/:maxHeight]", showConditions: bitcoinNetworks, showJsExamples: showJsExamplesDefaultFalse, - specialAvailability: { enterprise: true }, codeExample: { default: { codeTemplate: { From 7e093d912b8422595eff2bbf8c54ee40f04d01d1 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Tue, 28 Feb 2023 04:39:32 -0500 Subject: [PATCH 17/47] Remove special availability note mechanism --- .../app/docs/api-docs/api-docs.component.html | 2 -- .../app/docs/api-docs/api-docs.component.scss | 22 ------------------- frontend/src/app/shared/shared.module.ts | 3 +-- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 4687fe0b2..47332abc3 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -46,8 +46,6 @@
{{ item.title }} {{ item.category }}
-

This endpoint is available to enterprise sponsors.

-

This endpoint is only supported on official mempool.space instances.

Endpoint
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.scss b/frontend/src/app/docs/api-docs/api-docs.component.scss index 231871db6..92e78bc55 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.scss +++ b/frontend/src/app/docs/api-docs/api-docs.component.scss @@ -284,28 +284,6 @@ h3 { margin-bottom: 0; } -.special-availability { - padding: 16px; - margin-bottom: 15px; - background-color: #1d1f31; -} - -.special-availability table tr td:first-child { - padding-right: 10px; -} - -.special-availability.enterprise fa-icon { - color: #ffc107; -} - -.special-availability.mempoolspace fa-icon { - color: #1bd8f4; -} - -.special-availability p { - margin: 0; -} - @media (max-width: 992px) { h3 { diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts index 46d831309..fd257db85 100644 --- a/frontend/src/app/shared/shared.module.ts +++ b/frontend/src/app/shared/shared.module.ts @@ -4,7 +4,7 @@ import { NgbCollapseModule, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstra import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle, faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, - faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft, faStar } from '@fortawesome/free-solid-svg-icons'; + faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload, faQrcode, faArrowRightArrowLeft, faArrowsRotate, faCircleLeft } from '@fortawesome/free-solid-svg-icons'; import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { MasterPageComponent } from '../components/master-page/master-page.component'; import { PreviewTitleComponent } from '../components/master-page-preview/preview-title.component'; @@ -309,6 +309,5 @@ export class SharedModule { library.addIcons(faQrcode); library.addIcons(faArrowRightArrowLeft); library.addIcons(faExchangeAlt); - library.addIcons(faStar); } } From a67656389ea75f591b90f9164b717d7629038a66 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 13:50:15 +0900 Subject: [PATCH 18/47] Fix chain divergence detection upon new block (use the new interface) --- backend/src/api/blocks.ts | 14 +++++++------- backend/src/repositories/BlocksRepository.ts | 11 +++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 75d1ec300..12eb3b693 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -570,18 +570,18 @@ class Blocks { if (Common.indexingEnabled()) { if (!fastForwarded) { const lastBlock = await blocksRepository.$getBlockByHeight(blockExtended.height - 1); - if (lastBlock !== null && blockExtended.previousblockhash !== lastBlock['hash']) { - logger.warn(`Chain divergence detected at block ${lastBlock['height']}, re-indexing most recent data`); + if (lastBlock !== null && blockExtended.previousblockhash !== lastBlock.id) { + 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 - await BlocksRepository.$deleteBlocksFrom(lastBlock['height'] - 10); + await BlocksRepository.$deleteBlocksFrom(lastBlock.height - 10); await HashratesRepository.$deleteLastEntries(); - await BlocksSummariesRepository.$deleteBlocksFrom(lastBlock['height'] - 10); - await cpfpRepository.$deleteClustersFrom(lastBlock['height'] - 10); + await BlocksSummariesRepository.$deleteBlocksFrom(lastBlock.height - 10); + await cpfpRepository.$deleteClustersFrom(lastBlock.height - 10); for (let i = 10; i >= 0; --i) { - const newBlock = await this.$indexBlock(lastBlock['height'] - i); + const newBlock = await this.$indexBlock(lastBlock.height - i); await this.$getStrippedBlockTransactions(newBlock.id, true, true); if (config.MEMPOOL.CPFP_INDEXING) { - await this.$indexCPFP(newBlock.id, lastBlock['height'] - i); + await this.$indexCPFP(newBlock.id, lastBlock.height - i); } } await mining.$indexDifficultyAdjustments(); diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index 9cd31bbab..80df1ac92 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -525,8 +525,15 @@ class BlocksRepository { public async $validateChain(): Promise { try { const start = new Date().getTime(); - const [blocks]: any[] = await DB.query(`SELECT height, hash, previous_block_hash, - UNIX_TIMESTAMP(blockTimestamp) as timestamp FROM blocks ORDER BY height`); + const [blocks]: any[] = await DB.query(` + SELECT + height, + hash, + previous_block_hash, + UNIX_TIMESTAMP(blockTimestamp) AS timestamp + FROM blocks + ORDER BY height + `); let partialMsg = false; let idx = 1; From 87d678e268c7f5dfed8df4060d7c2048ea156116 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 16:52:24 +0900 Subject: [PATCH 19/47] Run ln forensics last --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 6f259a2bd..0ef107b76 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -199,8 +199,8 @@ class Server { try { await fundingTxFetcher.$init(); await networkSyncService.$startService(); - await forensicsService.$startService(); await lightningStatsUpdater.$startService(); + await forensicsService.$startService(); } catch(e) { logger.err(`Nodejs lightning backend crashed. Restarting in 1 minute. Reason: ${(e instanceof Error ? e.message : e)}`); await Common.sleep$(1000 * 60); From d5342a4e9aaa944aa19ebf53b6fc1e0639527532 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 17:26:53 +0900 Subject: [PATCH 20/47] Add frontend config flag to toggle historical price fetching --- docker/frontend/entrypoint.sh | 2 ++ frontend/mempool-frontend-config.sample.json | 3 ++- frontend/src/app/services/price.service.ts | 2 +- frontend/src/app/services/state.service.ts | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/frontend/entrypoint.sh b/docker/frontend/entrypoint.sh index 18cb782e9..45d852c45 100644 --- a/docker/frontend/entrypoint.sh +++ b/docker/frontend/entrypoint.sh @@ -35,6 +35,7 @@ __AUDIT__=${AUDIT:=false} __MAINNET_BLOCK_AUDIT_START_HEIGHT__=${MAINNET_BLOCK_AUDIT_START_HEIGHT:=0} __TESTNET_BLOCK_AUDIT_START_HEIGHT__=${TESTNET_BLOCK_AUDIT_START_HEIGHT:=0} __SIGNET_BLOCK_AUDIT_START_HEIGHT__=${SIGNET_BLOCK_AUDIT_START_HEIGHT:=0} +__HISTORICAL_PRICE__=${HISTORICAL_PRICE:=true} # Export as environment variables to be used by envsubst export __TESTNET_ENABLED__ @@ -60,6 +61,7 @@ export __AUDIT__ export __MAINNET_BLOCK_AUDIT_START_HEIGHT__ export __TESTNET_BLOCK_AUDIT_START_HEIGHT__ export __SIGNET_BLOCK_AUDIT_START_HEIGHT__ +export __HISTORICAL_PRICE__ folder=$(find /var/www/mempool -name "config.js" | xargs dirname) echo ${folder} diff --git a/frontend/mempool-frontend-config.sample.json b/frontend/mempool-frontend-config.sample.json index 9035315a4..084cbd0ef 100644 --- a/frontend/mempool-frontend-config.sample.json +++ b/frontend/mempool-frontend-config.sample.json @@ -21,5 +21,6 @@ "MAINNET_BLOCK_AUDIT_START_HEIGHT": 0, "TESTNET_BLOCK_AUDIT_START_HEIGHT": 0, "SIGNET_BLOCK_AUDIT_START_HEIGHT": 0, - "LIGHTNING": false + "LIGHTNING": false, + "HISTORICAL_PRICE": true } diff --git a/frontend/src/app/services/price.service.ts b/frontend/src/app/services/price.service.ts index e3ec93c8b..93c4ce449 100644 --- a/frontend/src/app/services/price.service.ts +++ b/frontend/src/app/services/price.service.ts @@ -70,7 +70,7 @@ export class PriceService { } getBlockPrice$(blockTimestamp: number, singlePrice = false): Observable { - if (this.stateService.env.BASE_MODULE !== 'mempool') { + if (this.stateService.env.BASE_MODULE !== 'mempool' || !this.stateService.env.HISTORICAL_PRICE) { return of(undefined); } diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts index 33de7823d..c56a5e79e 100644 --- a/frontend/src/app/services/state.service.ts +++ b/frontend/src/app/services/state.service.ts @@ -43,6 +43,7 @@ export interface Env { MAINNET_BLOCK_AUDIT_START_HEIGHT: number; TESTNET_BLOCK_AUDIT_START_HEIGHT: number; SIGNET_BLOCK_AUDIT_START_HEIGHT: number; + HISTORICAL_PRICE: boolean; } const defaultEnv: Env = { @@ -72,6 +73,7 @@ const defaultEnv: Env = { 'MAINNET_BLOCK_AUDIT_START_HEIGHT': 0, 'TESTNET_BLOCK_AUDIT_START_HEIGHT': 0, 'SIGNET_BLOCK_AUDIT_START_HEIGHT': 0, + 'HISTORICAL_PRICE': true, }; @Injectable({ From 9c5a9f2eba71abab75086d41f64cacb6a87edfff Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 17:33:37 +0900 Subject: [PATCH 21/47] Only run migration 57 if bitcoin --- backend/src/api/database-migration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/database-migration.ts b/backend/src/api/database-migration.ts index f4801deb6..d40637e74 100644 --- a/backend/src/api/database-migration.ts +++ b/backend/src/api/database-migration.ts @@ -501,7 +501,7 @@ class DatabaseMigration { await this.updateToSchemaVersion(56); } - if (databaseSchemaVersion < 57) { + if (databaseSchemaVersion < 57 && isBitcoin === true) { await this.$executeQuery(`ALTER TABLE nodes MODIFY updated_at datetime NULL`); await this.updateToSchemaVersion(57); } From 9043d23a03753d42359de28674495e8c11a8e431 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 19:11:03 +0900 Subject: [PATCH 22/47] Ignore negative USD prices --- backend/src/repositories/PricesRepository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/repositories/PricesRepository.ts b/backend/src/repositories/PricesRepository.ts index 83336eaff..6493735ee 100644 --- a/backend/src/repositories/PricesRepository.ts +++ b/backend/src/repositories/PricesRepository.ts @@ -40,7 +40,7 @@ export const MAX_PRICES = { class PricesRepository { public async $savePrices(time: number, prices: IConversionRates): Promise { - if (prices.USD === 0) { + if (prices.USD === -1) { // Some historical price entries have no USD prices, so we just ignore them to avoid future UX issues // As of today there are only 4 (on 2013-09-05, 2013-0909, 2013-09-12 and 2013-09-26) so that's fine return; From 3265b32a5688ba77f94b5cda995666ba27fc06e5 Mon Sep 17 00:00:00 2001 From: softsimon Date: Wed, 1 Mar 2023 19:14:54 +0900 Subject: [PATCH 23/47] Pull from transifex 1/3 --- frontend/src/locale/messages.fr.xlf | 688 +++++++++++++++++++--------- frontend/src/locale/messages.mk.xlf | 649 +++++++++++++++++--------- frontend/src/locale/messages.vi.xlf | 688 +++++++++++++++++++--------- 3 files changed, 1340 insertions(+), 685 deletions(-) diff --git a/frontend/src/locale/messages.fr.xlf b/frontend/src/locale/messages.fr.xlf index 61342d809..476dd8cfe 100644 --- a/frontend/src/locale/messages.fr.xlf +++ b/frontend/src/locale/messages.fr.xlf @@ -11,6 +11,7 @@ Slide of + Diapositive de node_modules/src/carousel/carousel.ts 175,181 @@ -147,6 +148,7 @@ + node_modules/src/progressbar/progressbar.ts 30,33 @@ -357,11 +359,11 @@ src/app/components/block/block.component.html - 290,291 + 310,311 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 26,27 + 46,47 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -382,11 +384,11 @@ src/app/components/block/block.component.html - 291,292 + 311,312 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 27,28 + 47,48 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -424,7 +426,7 @@ src/app/components/block/block.component.html - 40,41 + 38,39 block.hash @@ -449,7 +451,7 @@ src/app/components/block/block.component.html - 44,46 + 42,44 src/app/components/blocks-list/blocks-list.component.html @@ -592,11 +594,11 @@ src/app/components/master-page/master-page.component.html - 49,51 + 48,50 src/app/components/pool-ranking/pool-ranking.component.html - 94,96 + 94,95 @@ -775,14 +777,22 @@ src/app/components/about/about.component.html 385,389 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 88 + src/app/dashboard/dashboard.component.html - 150,152 + 157,159 src/app/docs/docs/docs.component.html 51 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 97 + Terms of Service shared.terms-of-service @@ -793,14 +803,22 @@ src/app/bisq/bisq-main-dashboard/bisq-main-dashboard.component.html 113,120 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 90 + src/app/dashboard/dashboard.component.html - 152,154 + 159,161 src/app/docs/docs/docs.component.html 53 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 99 + Privacy Policy shared.privacy-policy @@ -988,7 +1006,7 @@ src/app/dashboard/dashboard.component.html - 124,125 + 124,126 @@ -1036,7 +1054,7 @@ src/app/components/transaction/transaction.component.html - 158,160 + 152,154 src/app/components/transactions-list/transactions-list.component.html @@ -1052,11 +1070,11 @@ src/app/components/block/block.component.html - 246,247 + 252,253 src/app/components/transaction/transaction.component.html - 288,290 + 282,284 transaction.version @@ -1106,7 +1124,7 @@ src/app/components/transactions-list/transactions-list.component.html - 294,295 + 296,297 Transaction singular confirmation count shared.confirmation-count.singular @@ -1128,7 +1146,7 @@ src/app/components/transactions-list/transactions-list.component.html - 295,296 + 297,298 Transaction plural confirmation count shared.confirmation-count.plural @@ -1140,10 +1158,6 @@ src/app/bisq/bisq-transaction/bisq-transaction.component.html 43,45 - - src/app/components/transaction/transaction.component.html - 65,67 - Transaction included in block transaction.included-in-block @@ -1156,11 +1170,11 @@ src/app/components/transaction/transaction.component.html - 77,80 + 71,74 src/app/components/transaction/transaction.component.html - 135,138 + 129,132 Transaction features transaction.features @@ -1188,11 +1202,11 @@ src/app/components/transaction/transaction.component.html - 262,267 + 256,261 src/app/components/transaction/transaction.component.html - 406,412 + 400,406 transaction.details @@ -1209,11 +1223,11 @@ src/app/components/transaction/transaction.component.html - 249,253 + 243,247 src/app/components/transaction/transaction.component.html - 377,383 + 371,377 Transaction inputs and outputs transaction.inputs-and-outputs @@ -1231,7 +1245,7 @@ src/app/components/transaction/transaction.component.ts - 241,240 + 244,243 @@ -1251,7 +1265,7 @@ src/app/components/transaction/transaction.component.html - 159,160 + 153,154 src/app/dashboard/dashboard.component.html @@ -1267,7 +1281,7 @@ src/app/components/transaction/transaction.component.html - 72,73 + 66,67 Transaction Confirmed state transaction.confirmed @@ -1530,7 +1544,7 @@ src/app/components/master-page/master-page.component.html - 58,61 + 57,60 @@ -1567,7 +1581,7 @@ src/app/components/amount/amount.component.html - 6,9 + 18,21 src/app/components/asset-circulation/asset-circulation.component.html @@ -1583,7 +1597,7 @@ src/app/components/transactions-list/transactions-list.component.html - 302,304 + 304,306 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -1666,7 +1680,7 @@ src/app/components/assets/assets.component.html - 29,31 + 31,33 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -1888,7 +1902,7 @@ src/app/components/assets/assets.component.html - 30,31 + 32,33 Asset ticker header @@ -1901,7 +1915,7 @@ src/app/components/assets/assets.component.html - 31,34 + 33,36 Asset Issuer Domain header @@ -1914,7 +1928,7 @@ src/app/components/assets/assets.component.html - 32,36 + 34,38 Asset ID header @@ -1923,7 +1937,7 @@ Erreur lors du chargement des données des actifs. src/app/components/assets/assets.component.html - 48,53 + 50,55 Asset data load error @@ -2047,7 +2061,7 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 161 + 165 @@ -2063,7 +2077,7 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 163 + 167 @@ -2075,7 +2089,7 @@ src/app/components/block-fees-graph/block-fees-graph.component.ts - 62 + 67 src/app/components/graphs/graphs.component.html @@ -2088,15 +2102,15 @@ Indexage des blocs src/app/components/block-fees-graph/block-fees-graph.component.ts - 110,105 + 116,111 src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 108,103 + 113,108 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 115,110 + 116,111 src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -2121,6 +2135,7 @@ not available + pas disponible src/app/components/block-overview-graph/block-overview-graph.component.html 5 @@ -2140,7 +2155,7 @@ src/app/components/transaction/transaction.component.html - 476 + 472 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -2166,11 +2181,11 @@ src/app/components/transaction/transaction.component.html - 476,477 + 472 src/app/components/transactions-list/transactions-list.component.html - 286,287 + 288 sat shared.sat @@ -2184,11 +2199,11 @@ src/app/components/transaction/transaction.component.html - 161,165 + 155,159 src/app/components/transaction/transaction.component.html - 479,481 + 475,477 src/app/lightning/channel/channel-box/channel-box.component.html @@ -2200,7 +2215,7 @@ src/app/lightning/channels-list/channels-list.component.html - 38,39 + 41,42 Transaction fee rate transaction.fee-rate @@ -2218,19 +2233,19 @@ src/app/components/block/block.component.html - 125,128 + 124,127 src/app/components/block/block.component.html - 129 + 128,130 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 12,14 + 19,22 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 15,17 + 30,33 src/app/components/fees-box/fees-box.component.html @@ -2270,27 +2285,27 @@ src/app/components/transaction/transaction.component.html - 173,174 + 167,168 src/app/components/transaction/transaction.component.html - 184,185 + 178,179 src/app/components/transaction/transaction.component.html - 195,196 + 189,190 src/app/components/transaction/transaction.component.html - 481,484 + 477,480 src/app/components/transaction/transaction.component.html - 492,494 + 488,490 src/app/components/transactions-list/transactions-list.component.html - 286 + 286,287 src/app/dashboard/dashboard.component.html @@ -2298,7 +2313,7 @@ src/app/dashboard/dashboard.component.html - 204,208 + 213,217 sat/vB shared.sat-vbyte @@ -2312,17 +2327,18 @@ src/app/components/transaction/transaction.component.html - 160,162 + 154,156 src/app/components/transaction/transaction.component.html - 274,277 + 268,271 Transaction Virtual Size transaction.vsize Audit status + État de l'audit src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 36 @@ -2331,6 +2347,7 @@ Match + Correspond src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 38 @@ -2339,6 +2356,7 @@ Removed + Supprimée src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 39 @@ -2347,6 +2365,7 @@ Marginal fee rate + Taux de frais marginal src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 40 @@ -2359,6 +2378,7 @@ Recently broadcasted + Récemment envoyée src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 41 @@ -2424,7 +2444,7 @@ src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 60 + 65 src/app/components/graphs/graphs.component.html @@ -2454,15 +2474,15 @@ Taille src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 180,179 + 184,183 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 226,224 + 239,237 src/app/components/block/block.component.html - 50,52 + 48,50 src/app/components/blocks-list/blocks-list.component.html @@ -2486,7 +2506,7 @@ src/app/components/transaction/transaction.component.html - 270,272 + 264,266 src/app/dashboard/dashboard.component.html @@ -2498,11 +2518,11 @@ Poids src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 188,187 + 192,191 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 257,254 + 270,267 src/app/components/block/block-preview.component.html @@ -2510,11 +2530,23 @@ src/app/components/block/block.component.html - 54,56 + 52,54 src/app/components/transaction/transaction.component.html - 278,280 + 272,274 + + + + Size per weight + Taille par poids + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 200,199 + + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 282,279 @@ -2530,15 +2562,6 @@ shared.block-title - - - - - src/app/components/block/block-preview.component.html - 11,12 - - shared.block-title - Median fee Frais médian @@ -2548,7 +2571,7 @@ src/app/components/block/block.component.html - 128,129 + 127,128 src/app/components/mempool-block/mempool-block.component.html @@ -2565,11 +2588,11 @@ src/app/components/block/block.component.html - 133,135 + 138,140 src/app/components/block/block.component.html - 159,162 + 164,167 src/app/components/mempool-block/mempool-block.component.html @@ -2587,7 +2610,7 @@ src/app/components/block/block.component.html - 168,170 + 173,175 block.miner @@ -2600,7 +2623,7 @@ src/app/components/block/block.component.ts - 227 + 242 @@ -2625,25 +2648,42 @@ Previous Block - - Block health + + Health + Santé src/app/components/block/block.component.html - 58,61 + 56 - block.health + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + latest-blocks.health Unknown Inconnue src/app/components/block/block.component.html - 69,72 + 67,70 src/app/components/blocks-list/blocks-list.component.html 60,63 + + src/app/components/pool-ranking/pool-ranking.component.html + 121,124 + + + src/app/lightning/channel/closing-type/closing-type.component.ts + 32 + src/app/lightning/node/node.component.html 52,55 @@ -2667,7 +2707,7 @@ L'envergure des frais src/app/components/block/block.component.html - 124,125 + 123,124 src/app/components/mempool-block/mempool-block.component.html @@ -2680,7 +2720,7 @@ Basé sur une transaction segwit standard de 140 vBytes src/app/components/block/block.component.html - 129,131 + 131,136 src/app/components/fees-box/fees-box.component.html @@ -2704,49 +2744,66 @@ Transaction fee tooltip - - Subsidy + fees: - Subvention + frais: + + Subsidy + fees + Subvention + frais src/app/components/block/block.component.html - 148,151 + 153,156 src/app/components/block/block.component.html - 163,167 + 168,172 Total subsidy and fees in a block block.subsidy-and-fees - - Projected + + Expected + Attendu src/app/components/block/block.component.html - 210,212 + 216 - block.projected + block.expected + + + beta + bêta + + src/app/components/block/block.component.html + 216,217 + + + src/app/components/block/block.component.html + 222,224 + + beta Actual + Réel src/app/components/block/block.component.html - 212,216 + 218,222 block.actual - - Projected Block + + Expected Block + Bloc attendu src/app/components/block/block.component.html - 216,218 + 222 - block.projected-block + block.expected-block Actual Block + Bloc réel src/app/components/block/block.component.html - 225,227 + 231 block.actual-block @@ -2755,7 +2812,7 @@ Bits src/app/components/block/block.component.html - 250,252 + 256,258 block.bits @@ -2764,7 +2821,7 @@ racine de Merkle src/app/components/block/block.component.html - 254,256 + 260,262 block.merkle-root @@ -2773,7 +2830,7 @@ Difficulté src/app/components/block/block.component.html - 265,268 + 271,274 src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html @@ -2802,7 +2859,7 @@ Nonce src/app/components/block/block.component.html - 269,271 + 275,277 block.nonce @@ -2811,20 +2868,30 @@ Hex d'en-tête de bloc src/app/components/block/block.component.html - 273,274 + 279,280 block.header + + Audit + Audit + + src/app/components/block/block.component.html + 297,301 + + Toggle Audit + block.toggle-audit + Details Détails src/app/components/block/block.component.html - 284,288 + 304,308 src/app/components/transaction/transaction.component.html - 254,259 + 248,253 src/app/lightning/channel/channel.component.html @@ -2846,11 +2913,11 @@ Une erreur est survenue lors du chargement. src/app/components/block/block.component.html - 303,305 + 323,325 src/app/components/block/block.component.html - 339,343 + 362,366 src/app/lightning/channel/channel-preview.component.html @@ -2872,9 +2939,10 @@ Why is this block empty? + Pourquoi ce bloc est-il vide ? src/app/components/block/block.component.html - 361,367 + 384,390 block.empty-block-explanation @@ -2920,18 +2988,6 @@ latest-blocks.mined - - Health - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - latest-blocks.health - Reward Récompense @@ -2995,7 +3051,7 @@ src/app/dashboard/dashboard.component.html - 210,214 + 219,223 dashboard.txs @@ -3234,7 +3290,7 @@ src/app/dashboard/dashboard.component.html - 237,238 + 246,247 dashboard.incoming-transactions @@ -3247,7 +3303,7 @@ src/app/dashboard/dashboard.component.html - 240,243 + 249,252 dashboard.backend-is-synchronizing @@ -3260,7 +3316,7 @@ src/app/dashboard/dashboard.component.html - 245,250 + 254,259 vB/s shared.vbytes-per-second @@ -3274,7 +3330,7 @@ src/app/dashboard/dashboard.component.html - 208,209 + 217,218 Unconfirmed count dashboard.unconfirmed @@ -3531,7 +3587,7 @@ src/app/components/master-page/master-page.component.html - 52,54 + 51,53 src/app/components/statistics/statistics.component.ts @@ -3557,7 +3613,7 @@ Explorateur Lightning src/app/components/master-page/master-page.component.html - 44,45 + 44,47 src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts @@ -3565,21 +3621,12 @@ master-page.lightning - - beta - bêta - - src/app/components/master-page/master-page.component.html - 45,48 - - beta - Documentation Documentation src/app/components/master-page/master-page.component.html - 55,57 + 54,56 src/app/docs/docs/docs.component.html @@ -3659,6 +3706,32 @@ dashboard.adjustments + + Broadcast Transaction + Émettre une transaction + + src/app/components/mining-dashboard/mining-dashboard.component.html + 92 + + + src/app/components/push-transaction/push-transaction.component.html + 2 + + + src/app/components/push-transaction/push-transaction.component.html + 8 + + + src/app/dashboard/dashboard.component.html + 161,169 + + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 102 + + Broadcast Transaction + shared.broadcast-transaction + Pools luck (1 week) Chance des pools (1 semaine) @@ -3726,7 +3799,7 @@ src/app/components/pool-ranking/pool-ranking.component.html - 136,138 + 152,154 master-page.blocks @@ -3756,12 +3829,25 @@ mining.rank + + Avg Health + Santé moyenne + + src/app/components/pool-ranking/pool-ranking.component.html + 96,97 + + + src/app/components/pool-ranking/pool-ranking.component.html + 96,98 + + latest-blocks.avg_health + Empty blocks Bloc vides src/app/components/pool-ranking/pool-ranking.component.html - 95,98 + 97,100 mining.empty-blocks @@ -3770,7 +3856,7 @@ Tous les mineurs src/app/components/pool-ranking/pool-ranking.component.html - 113,114 + 129,130 mining.all-miners @@ -3779,7 +3865,7 @@ Chance des pools src/app/components/pool-ranking/pool-ranking.component.html - 130,132 + 146,148 mining.miners-luck @@ -3788,7 +3874,7 @@ Nombre de pool src/app/components/pool-ranking/pool-ranking.component.html - 142,144 + 158,160 mining.miners-count @@ -3797,7 +3883,7 @@ Pool de minage src/app/components/pool-ranking/pool-ranking.component.ts - 57 + 58 @@ -4024,24 +4110,6 @@ latest-blocks.coinbasetag - - Broadcast Transaction - Émettre une transaction - - src/app/components/push-transaction/push-transaction.component.html - 2 - - - src/app/components/push-transaction/push-transaction.component.html - 8 - - - src/app/dashboard/dashboard.component.html - 154,161 - - Broadcast Transaction - shared.broadcast-transaction - Transaction hex Transaction hex @@ -4051,7 +4119,7 @@ src/app/components/transaction/transaction.component.html - 296,297 + 290,291 transaction.hex @@ -4083,6 +4151,7 @@ Avg Block Fees + Frais de bloc moyens src/app/components/reward-stats/reward-stats.component.html 17 @@ -4095,6 +4164,7 @@ Average fees per block in the past 144 blocks + Frais moyens par bloc au cours des 144 derniers blocs src/app/components/reward-stats/reward-stats.component.html 18,20 @@ -4103,6 +4173,7 @@ BTC/block + BTC/bloc src/app/components/reward-stats/reward-stats.component.html 21,24 @@ -4112,6 +4183,7 @@ Avg Tx Fee + Frais Tx Moy src/app/components/reward-stats/reward-stats.component.html 30 @@ -4172,6 +4244,78 @@ search-form.search-title + + Bitcoin Block Height + Hauteur de bloc Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 3 + + search.bitcoin-block-height + + + Bitcoin Transaction + Transaction Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 9 + + search.bitcoin-transaction + + + Bitcoin Address + Adresse Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 15 + + search.bitcoin-address + + + Bitcoin Block + Bloc de Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 21 + + search.bitcoin-block + + + Bitcoin Addresses + Adresses Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 27 + + search.bitcoin-addresses + + + Lightning Nodes + Noeuds Lightning + + src/app/components/search-form/search-results/search-results.component.html + 35 + + search.lightning-nodes + + + Lightning Channels + Canaux Lightning + + src/app/components/search-form/search-results/search-results.component.html + 43 + + search.lightning-channels + + + Go to "" + Aller à &quot;&quot; + + src/app/components/search-form/search-results/search-results.component.html + 52 + + search.go-to + Mempool by vBytes (sat/vByte) Mempool par vBytes (sat/vByte) @@ -4429,6 +4573,7 @@ This transaction replaced: + Cette transaction a remplacé : src/app/components/transaction/transaction.component.html 10,12 @@ -4438,6 +4583,7 @@ Replaced + Remplacée src/app/components/transaction/transaction.component.html 36,39 @@ -4454,7 +4600,7 @@ src/app/components/transactions-list/transactions-list.component.html - 298,301 + 300,303 Transaction unconfirmed state transaction.unconfirmed @@ -4464,7 +4610,7 @@ Vu pour la première fois src/app/components/transaction/transaction.component.html - 108,109 + 102,103 src/app/lightning/node/node.component.html @@ -4498,7 +4644,7 @@ HAP src/app/components/transaction/transaction.component.html - 115,116 + 109,110 Transaction ETA transaction.eta @@ -4508,7 +4654,7 @@ Dans plusieurs heures (ou plus) src/app/components/transaction/transaction.component.html - 121,124 + 115,118 Transaction ETA in several hours or more transaction.eta.in-several-hours @@ -4518,11 +4664,11 @@ Descendant src/app/components/transaction/transaction.component.html - 168,170 + 162,164 src/app/components/transaction/transaction.component.html - 179,181 + 173,175 Descendant transaction.descendant @@ -4532,7 +4678,7 @@ Ancêtre src/app/components/transaction/transaction.component.html - 190,192 + 184,186 Transaction Ancestor transaction.ancestor @@ -4542,11 +4688,11 @@ Flux src/app/components/transaction/transaction.component.html - 208,211 + 202,205 src/app/components/transaction/transaction.component.html - 346,350 + 340,344 Transaction flow transaction.flow @@ -4556,7 +4702,7 @@ Masquer le diagramme src/app/components/transaction/transaction.component.html - 211,216 + 205,210 hide-diagram @@ -4565,7 +4711,7 @@ Montrer plus src/app/components/transaction/transaction.component.html - 231,233 + 225,227 src/app/components/transactions-list/transactions-list.component.html @@ -4582,7 +4728,7 @@ Montrer moins src/app/components/transaction/transaction.component.html - 233,239 + 227,233 src/app/components/transactions-list/transactions-list.component.html @@ -4595,7 +4741,7 @@ Afficher le diagramme src/app/components/transaction/transaction.component.html - 253,254 + 247,248 show-diagram @@ -4604,7 +4750,7 @@ Temps de verrouillage src/app/components/transaction/transaction.component.html - 292,294 + 286,288 transaction.locktime @@ -4613,7 +4759,7 @@ Transaction introuvable. src/app/components/transaction/transaction.component.html - 455,456 + 449,450 transaction.error.transaction-not-found @@ -4622,7 +4768,7 @@ Veuillez patienter pendant que nous attendons qu'elle apparaisse dans le mempool src/app/components/transaction/transaction.component.html - 456,461 + 450,455 transaction.error.waiting-for-it-to-appear @@ -4631,7 +4777,7 @@ Taux de frais effectif src/app/components/transaction/transaction.component.html - 489,492 + 485,488 Effective transaction fee rate transaction.effective-fee-rate @@ -4777,17 +4923,19 @@ Show more inputs to reveal fee data + Afficher plus d'entrées pour révéler les données de frais src/app/components/transactions-list/transactions-list.component.html - 288,291 + 290,293 transactions-list.load-to-reveal-fee-info remaining + restantes src/app/components/transactions-list/transactions-list.component.html - 330,331 + 332,333 x-remaining @@ -4935,6 +5083,7 @@ This transaction does not use Taproot + Cette transaction n'utilise pas Taproot src/app/components/tx-features/tx-features.component.html 18 @@ -5037,21 +5186,12 @@ dashboard.latest-transactions - - USD - USD - - src/app/dashboard/dashboard.component.html - 126,127 - - dashboard.latest-transactions.USD - Minimum fee Frais minimums src/app/dashboard/dashboard.component.html - 201,202 + 210,211 Minimum mempool fee dashboard.minimum-fee @@ -5061,7 +5201,7 @@ Purgées src/app/dashboard/dashboard.component.html - 202,203 + 211,212 Purgin below fee dashboard.purging @@ -5071,7 +5211,7 @@ Mémoire utilisée src/app/dashboard/dashboard.component.html - 214,215 + 223,224 Memory usage dashboard.memory-usage @@ -5081,16 +5221,25 @@ L-BTC en circulation src/app/dashboard/dashboard.component.html - 228,230 + 237,239 dashboard.lbtc-pegs-in-circulation + + mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc. + mempool.space fournit simplement des données sur le réseau Bitcoin. Il ne peut pas vous aider à récupérer des fonds, à confirmer vos transactions plus rapidement, etc. + + src/app/docs/api-docs/api-docs.component.html + 13 + + faq.big-disclaimer + REST API service Service d'API REST src/app/docs/api-docs/api-docs.component.html - 39,40 + 41,42 api-docs.title @@ -5099,11 +5248,11 @@ Point de terminaison src/app/docs/api-docs/api-docs.component.html - 48,49 + 50,51 src/app/docs/api-docs/api-docs.component.html - 102,105 + 104,107 Api docs endpoint @@ -5112,11 +5261,11 @@ Description src/app/docs/api-docs/api-docs.component.html - 67,68 + 69,70 src/app/docs/api-docs/api-docs.component.html - 106,107 + 108,109 @@ -5124,7 +5273,7 @@ Pousser par défaut : action: 'want', data: ['blocks', ...] pour exprimer ce que vous voulez pousser. Disponible: blocks, mempool-blocks, live-2h-chart, et stats.Pousse les transactions liées à l'adresse : 'track-address': '3PbJ...bF9B' pour recevoir toutes les nouvelles transactions contenant cette adresse en entrée ou en sortie. Renvoie un tableau de transactions. address-transactions pour les nouvelles transactions mempool, et block-transactions pour les nouvelles transactions confirmées en bloc. src/app/docs/api-docs/api-docs.component.html - 107,108 + 109,110 api-docs.websocket.websocket @@ -5297,12 +5446,13 @@ src/app/lightning/channels-list/channels-list.component.html - 120,121 + 123,124 lightning.x-channels Starting balance + Solde de départ src/app/lightning/channel/channel-close-box/channel-close-box.component.html 6 @@ -5312,6 +5462,7 @@ Closing balance + Solde de clôture src/app/lightning/channel/channel-close-box/channel-close-box.component.html 12 @@ -5341,7 +5492,7 @@ src/app/lightning/channels-list/channels-list.component.html - 65,66 + 68,69 status.inactive @@ -5358,7 +5509,7 @@ src/app/lightning/channels-list/channels-list.component.html - 66,68 + 69,71 status.active @@ -5379,7 +5530,7 @@ src/app/lightning/channels-list/channels-list.component.html - 68,70 + 71,73 status.closed @@ -5409,7 +5560,7 @@ src/app/lightning/channels-list/channels-list.component.html - 40,43 + 43,46 src/app/lightning/node-statistics/node-statistics.component.html @@ -5417,7 +5568,7 @@ src/app/lightning/node-statistics/node-statistics.component.html - 47,50 + 46,49 src/app/lightning/nodes-list/nodes-list.component.html @@ -5525,12 +5676,13 @@ src/app/lightning/channels-list/channels-list.component.html - 39,40 + 42,43 lightning.closing_date Closed by + Fermée par src/app/lightning/channel/channel.component.html 52,54 @@ -5563,6 +5715,30 @@ 37 + + Mutually closed + Mutuellement fermé + + src/app/lightning/channel/closing-type/closing-type.component.ts + 20 + + + + Force closed + Fermeture Forcée + + src/app/lightning/channel/closing-type/closing-type.component.ts + 24 + + + + Force closed with penalty + Fermeture forcée avec pénalité + + src/app/lightning/channel/closing-type/closing-type.component.ts + 28 + + Open Ouvert @@ -5577,7 +5753,7 @@ Aucun canal à afficher src/app/lightning/channels-list/channels-list.component.html - 29,35 + 29,37 lightning.empty-channels-list @@ -5586,7 +5762,7 @@ Alias src/app/lightning/channels-list/channels-list.component.html - 35,37 + 38,40 src/app/lightning/group/group.component.html @@ -5623,7 +5799,7 @@ Statut src/app/lightning/channels-list/channels-list.component.html - 37,38 + 40,41 status @@ -5632,7 +5808,7 @@ ID du canal src/app/lightning/channels-list/channels-list.component.html - 41,45 + 44,48 channels.id @@ -5641,11 +5817,11 @@ sats src/app/lightning/channels-list/channels-list.component.html - 60,64 + 63,67 src/app/lightning/channels-list/channels-list.component.html - 84,88 + 87,91 src/app/lightning/channels-statistics/channels-statistics.component.html @@ -5689,6 +5865,24 @@ shared.sats + + avg + moy. + + src/app/lightning/channels-statistics/channels-statistics.component.html + 3,5 + + statistics.average-small + + + med + med. + + src/app/lightning/channels-statistics/channels-statistics.component.html + 6,9 + + statistics.median-small + Avg Capacity Capacité moy @@ -5817,11 +6011,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 17,18 + 16,17 src/app/lightning/node-statistics/node-statistics.component.html - 54,57 + 53,56 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -5891,11 +6085,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 29,30 + 28,29 src/app/lightning/node-statistics/node-statistics.component.html - 61,64 + 60,63 src/app/lightning/nodes-list/nodes-list.component.html @@ -6052,12 +6246,37 @@ Fee distribution + Répartition des frais src/app/lightning/node-fee-chart/node-fee-chart.component.html 2 lightning.node-fee-distribution + + Outgoing Fees + Frais de sortie + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 170 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 208 + + + + Incoming Fees + Frais entrants + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 178 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 222 + + Percentage change past week Variation sur une semaine @@ -6067,11 +6286,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 18,20 + 17,19 src/app/lightning/node-statistics/node-statistics.component.html - 30,32 + 29,31 mining.percentage-change-last-week @@ -6147,6 +6366,7 @@ Avg channel distance + Distance moyenne des canaux src/app/lightning/node/node.component.html 56,57 @@ -6186,6 +6406,7 @@ Liquidity ad + Annonce de liquidité src/app/lightning/node/node.component.html 138,141 @@ -6194,6 +6415,7 @@ Lease fee rate + Taux de frais de location src/app/lightning/node/node.component.html 144,147 @@ -6203,6 +6425,7 @@ Lease base fee + Frais de base de location src/app/lightning/node/node.component.html 152,154 @@ -6211,6 +6434,7 @@ Funding weight + Poids du financement src/app/lightning/node/node.component.html 158,159 @@ -6219,6 +6443,7 @@ Channel fee rate + Taux de frais de canal src/app/lightning/node/node.component.html 168,171 @@ -6228,6 +6453,7 @@ Channel base fee + Frais de base du canal src/app/lightning/node/node.component.html 176,178 @@ -6236,6 +6462,7 @@ Compact lease + Location compacte src/app/lightning/node/node.component.html 188,190 @@ -6244,6 +6471,7 @@ TLV extension records + Enregistrements d'extension TLV src/app/lightning/node/node.component.html 199,202 @@ -6310,7 +6538,7 @@ Aucune donnée de géolocalisation disponible src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts - 218,213 + 219,214 @@ -6324,6 +6552,7 @@ Indexing in progress + Indexation en cours src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts 121,116 @@ -6591,6 +6820,7 @@ Active nodes + Nœuds actifs src/app/lightning/nodes-per-isp/nodes-per-isp.component.html 14,18 diff --git a/frontend/src/locale/messages.mk.xlf b/frontend/src/locale/messages.mk.xlf index 61ffc6a69..8747463ee 100644 --- a/frontend/src/locale/messages.mk.xlf +++ b/frontend/src/locale/messages.mk.xlf @@ -11,6 +11,7 @@ Slide of + Слајд of node_modules/src/carousel/carousel.ts 175,181 @@ -147,6 +148,7 @@ + node_modules/src/progressbar/progressbar.ts 30,33 @@ -355,11 +357,11 @@ src/app/components/block/block.component.html - 290,291 + 310,311 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 26,27 + 46,47 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -380,11 +382,11 @@ src/app/components/block/block.component.html - 291,292 + 311,312 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 27,28 + 47,48 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -422,7 +424,7 @@ src/app/components/block/block.component.html - 40,41 + 38,39 block.hash @@ -447,7 +449,7 @@ src/app/components/block/block.component.html - 44,46 + 42,44 src/app/components/blocks-list/blocks-list.component.html @@ -590,11 +592,11 @@ src/app/components/master-page/master-page.component.html - 49,51 + 48,50 src/app/components/pool-ranking/pool-ranking.component.html - 94,96 + 94,95 @@ -735,6 +737,7 @@ View more » + Види повеќе » src/app/bisq/bisq-main-dashboard/bisq-main-dashboard.component.html 92,97 @@ -772,14 +775,22 @@ src/app/components/about/about.component.html 385,389 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 88 + src/app/dashboard/dashboard.component.html - 150,152 + 157,159 src/app/docs/docs/docs.component.html 51 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 97 + Terms of Service shared.terms-of-service @@ -790,14 +801,22 @@ src/app/bisq/bisq-main-dashboard/bisq-main-dashboard.component.html 113,120 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 90 + src/app/dashboard/dashboard.component.html - 152,154 + 159,161 src/app/docs/docs/docs.component.html 53 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 99 + Privacy Policy shared.privacy-policy @@ -985,7 +1004,7 @@ src/app/dashboard/dashboard.component.html - 124,125 + 124,126 @@ -1033,7 +1052,7 @@ src/app/components/transaction/transaction.component.html - 158,160 + 152,154 src/app/components/transactions-list/transactions-list.component.html @@ -1049,11 +1068,11 @@ src/app/components/block/block.component.html - 246,247 + 252,253 src/app/components/transaction/transaction.component.html - 288,290 + 282,284 transaction.version @@ -1103,7 +1122,7 @@ src/app/components/transactions-list/transactions-list.component.html - 294,295 + 296,297 Transaction singular confirmation count shared.confirmation-count.singular @@ -1125,7 +1144,7 @@ src/app/components/transactions-list/transactions-list.component.html - 295,296 + 297,298 Transaction plural confirmation count shared.confirmation-count.plural @@ -1137,10 +1156,6 @@ src/app/bisq/bisq-transaction/bisq-transaction.component.html 43,45 - - src/app/components/transaction/transaction.component.html - 65,67 - Transaction included in block transaction.included-in-block @@ -1153,11 +1168,11 @@ src/app/components/transaction/transaction.component.html - 77,80 + 71,74 src/app/components/transaction/transaction.component.html - 135,138 + 129,132 Transaction features transaction.features @@ -1185,11 +1200,11 @@ src/app/components/transaction/transaction.component.html - 262,267 + 256,261 src/app/components/transaction/transaction.component.html - 406,412 + 400,406 transaction.details @@ -1206,11 +1221,11 @@ src/app/components/transaction/transaction.component.html - 249,253 + 243,247 src/app/components/transaction/transaction.component.html - 377,383 + 371,377 Transaction inputs and outputs transaction.inputs-and-outputs @@ -1228,7 +1243,7 @@ src/app/components/transaction/transaction.component.ts - 241,240 + 244,243 @@ -1248,7 +1263,7 @@ src/app/components/transaction/transaction.component.html - 159,160 + 153,154 src/app/dashboard/dashboard.component.html @@ -1264,7 +1279,7 @@ src/app/components/transaction/transaction.component.html - 72,73 + 66,67 Transaction Confirmed state transaction.confirmed @@ -1457,6 +1472,7 @@ Community Integrations + Интеграции од заедницата src/app/components/about/about.component.html 191,193 @@ -1474,6 +1490,7 @@ Project Translators + Преведувачи src/app/components/about/about.component.html 301,303 @@ -1524,11 +1541,12 @@ src/app/components/master-page/master-page.component.html - 58,61 + 57,60 Multisig of + Multisig од src/app/components/address-labels/address-labels.component.ts 107 @@ -1560,7 +1578,7 @@ src/app/components/amount/amount.component.html - 6,9 + 18,21 src/app/components/asset-circulation/asset-circulation.component.html @@ -1576,7 +1594,7 @@ src/app/components/transactions-list/transactions-list.component.html - 302,304 + 304,306 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -1602,6 +1620,7 @@ of transaction + од трансакција src/app/components/address/address.component.html 59 @@ -1610,6 +1629,7 @@ of transactions + од трансакции src/app/components/address/address.component.html 60 @@ -1656,7 +1676,7 @@ src/app/components/assets/assets.component.html - 29,31 + 31,33 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -1784,6 +1804,7 @@ Group of assets + Група на асети src/app/components/assets/asset-group/asset-group.component.html 8,9 @@ -1816,6 +1837,7 @@ Featured + Промовиран src/app/components/assets/assets-nav/assets-nav.component.html 9 @@ -1823,6 +1845,7 @@ All + Сите src/app/components/assets/assets-nav/assets-nav.component.html 13 @@ -1875,7 +1898,7 @@ src/app/components/assets/assets.component.html - 30,31 + 32,33 Asset ticker header @@ -1888,7 +1911,7 @@ src/app/components/assets/assets.component.html - 31,34 + 33,36 Asset Issuer Domain header @@ -1901,7 +1924,7 @@ src/app/components/assets/assets.component.html - 32,36 + 34,38 Asset ID header @@ -1910,7 +1933,7 @@ Грешка во вчитувањето на податоците за средствата. src/app/components/assets/assets.component.html - 48,53 + 50,55 Asset data load error @@ -2022,6 +2045,7 @@ At block: + Во блок: src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 188 @@ -2032,11 +2056,12 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 161 + 165 Around block: + Околу блок: src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 190 @@ -2047,7 +2072,7 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 163 + 167 @@ -2058,7 +2083,7 @@ src/app/components/block-fees-graph/block-fees-graph.component.ts - 62 + 67 src/app/components/graphs/graphs.component.html @@ -2070,15 +2095,15 @@ Indexing blocks src/app/components/block-fees-graph/block-fees-graph.component.ts - 110,105 + 116,111 src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 108,103 + 113,108 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 115,110 + 116,111 src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -2103,6 +2128,7 @@ not available + не е достапно src/app/components/block-overview-graph/block-overview-graph.component.html 5 @@ -2122,7 +2148,7 @@ src/app/components/transaction/transaction.component.html - 476 + 472 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -2148,11 +2174,11 @@ src/app/components/transaction/transaction.component.html - 476,477 + 472 src/app/components/transactions-list/transactions-list.component.html - 286,287 + 288 sat shared.sat @@ -2166,11 +2192,11 @@ src/app/components/transaction/transaction.component.html - 161,165 + 155,159 src/app/components/transaction/transaction.component.html - 479,481 + 475,477 src/app/lightning/channel/channel-box/channel-box.component.html @@ -2182,7 +2208,7 @@ src/app/lightning/channels-list/channels-list.component.html - 38,39 + 41,42 Transaction fee rate transaction.fee-rate @@ -2200,19 +2226,19 @@ src/app/components/block/block.component.html - 125,128 + 124,127 src/app/components/block/block.component.html - 129 + 128,130 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 12,14 + 19,22 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 15,17 + 30,33 src/app/components/fees-box/fees-box.component.html @@ -2252,27 +2278,27 @@ src/app/components/transaction/transaction.component.html - 173,174 + 167,168 src/app/components/transaction/transaction.component.html - 184,185 + 178,179 src/app/components/transaction/transaction.component.html - 195,196 + 189,190 src/app/components/transaction/transaction.component.html - 481,484 + 477,480 src/app/components/transaction/transaction.component.html - 492,494 + 488,490 src/app/components/transactions-list/transactions-list.component.html - 286 + 286,287 src/app/dashboard/dashboard.component.html @@ -2280,7 +2306,7 @@ src/app/dashboard/dashboard.component.html - 204,208 + 213,217 sat/vB shared.sat-vbyte @@ -2294,11 +2320,11 @@ src/app/components/transaction/transaction.component.html - 160,162 + 154,156 src/app/components/transaction/transaction.component.html - 274,277 + 268,271 Transaction Virtual Size transaction.vsize @@ -2321,6 +2347,7 @@ Removed + Одстрането src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 39 @@ -2349,6 +2376,7 @@ Added + Додадено src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 42 @@ -2401,7 +2429,7 @@ src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 60 + 65 src/app/components/graphs/graphs.component.html @@ -2430,15 +2458,15 @@ Големина src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 180,179 + 184,183 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 226,224 + 239,237 src/app/components/block/block.component.html - 50,52 + 48,50 src/app/components/blocks-list/blocks-list.component.html @@ -2462,7 +2490,7 @@ src/app/components/transaction/transaction.component.html - 270,272 + 264,266 src/app/dashboard/dashboard.component.html @@ -2474,11 +2502,11 @@ Тежина src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 188,187 + 192,191 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 257,254 + 270,267 src/app/components/block/block-preview.component.html @@ -2486,11 +2514,22 @@ src/app/components/block/block.component.html - 54,56 + 52,54 src/app/components/transaction/transaction.component.html - 278,280 + 272,274 + + + + Size per weight + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 200,199 + + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 282,279 @@ -2505,14 +2544,6 @@ shared.block-title - - - - src/app/components/block/block-preview.component.html - 11,12 - - shared.block-title - Median fee Средна провизија @@ -2522,7 +2553,7 @@ src/app/components/block/block.component.html - 128,129 + 127,128 src/app/components/mempool-block/mempool-block.component.html @@ -2539,11 +2570,11 @@ src/app/components/block/block.component.html - 133,135 + 138,140 src/app/components/block/block.component.html - 159,162 + 164,167 src/app/components/mempool-block/mempool-block.component.html @@ -2561,7 +2592,7 @@ src/app/components/block/block.component.html - 168,170 + 173,175 block.miner @@ -2574,7 +2605,7 @@ src/app/components/block/block.component.ts - 227 + 242 @@ -2599,24 +2630,40 @@ Previous Block - - Block health + + Health src/app/components/block/block.component.html - 58,61 + 56 - block.health + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + latest-blocks.health Unknown src/app/components/block/block.component.html - 69,72 + 67,70 src/app/components/blocks-list/blocks-list.component.html 60,63 + + src/app/components/pool-ranking/pool-ranking.component.html + 121,124 + + + src/app/lightning/channel/closing-type/closing-type.component.ts + 32 + src/app/lightning/node/node.component.html 52,55 @@ -2640,7 +2687,7 @@ Оспег на провизии src/app/components/block/block.component.html - 124,125 + 123,124 src/app/components/mempool-block/mempool-block.component.html @@ -2653,7 +2700,7 @@ Базирано на просечна segwit трансакција од 140 vBytes src/app/components/block/block.component.html - 129,131 + 131,136 src/app/components/fees-box/fees-box.component.html @@ -2677,49 +2724,61 @@ Transaction fee tooltip - - Subsidy + fees: - Награда + провизија: + + Subsidy + fees src/app/components/block/block.component.html - 148,151 + 153,156 src/app/components/block/block.component.html - 163,167 + 168,172 Total subsidy and fees in a block block.subsidy-and-fees - - Projected + + Expected src/app/components/block/block.component.html - 210,212 + 216 - block.projected + block.expected + + + beta + бета + + src/app/components/block/block.component.html + 216,217 + + + src/app/components/block/block.component.html + 222,224 + + beta Actual src/app/components/block/block.component.html - 212,216 + 218,222 block.actual - - Projected Block + + Expected Block src/app/components/block/block.component.html - 216,218 + 222 - block.projected-block + block.expected-block Actual Block src/app/components/block/block.component.html - 225,227 + 231 block.actual-block @@ -2728,7 +2787,7 @@ Битови src/app/components/block/block.component.html - 250,252 + 256,258 block.bits @@ -2737,7 +2796,7 @@ Merkle root src/app/components/block/block.component.html - 254,256 + 260,262 block.merkle-root @@ -2746,7 +2805,7 @@ Сложеност src/app/components/block/block.component.html - 265,268 + 271,274 src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html @@ -2775,7 +2834,7 @@ Nonce src/app/components/block/block.component.html - 269,271 + 275,277 block.nonce @@ -2784,20 +2843,29 @@ Хекс од заглавието на блокот src/app/components/block/block.component.html - 273,274 + 279,280 block.header + + Audit + + src/app/components/block/block.component.html + 297,301 + + Toggle Audit + block.toggle-audit + Details Детали src/app/components/block/block.component.html - 284,288 + 304,308 src/app/components/transaction/transaction.component.html - 254,259 + 248,253 src/app/lightning/channel/channel.component.html @@ -2818,11 +2886,11 @@ Error loading data. src/app/components/block/block.component.html - 303,305 + 323,325 src/app/components/block/block.component.html - 339,343 + 362,366 src/app/lightning/channel/channel-preview.component.html @@ -2846,7 +2914,7 @@ Why is this block empty? src/app/components/block/block.component.html - 361,367 + 384,390 block.empty-block-explanation @@ -2891,18 +2959,6 @@ latest-blocks.mined - - Health - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - latest-blocks.health - Reward @@ -2964,7 +3020,7 @@ src/app/dashboard/dashboard.component.html - 210,214 + 219,223 dashboard.txs @@ -3190,7 +3246,7 @@ src/app/dashboard/dashboard.component.html - 237,238 + 246,247 dashboard.incoming-transactions @@ -3203,7 +3259,7 @@ src/app/dashboard/dashboard.component.html - 240,243 + 249,252 dashboard.backend-is-synchronizing @@ -3216,7 +3272,7 @@ src/app/dashboard/dashboard.component.html - 245,250 + 254,259 vB/s shared.vbytes-per-second @@ -3230,7 +3286,7 @@ src/app/dashboard/dashboard.component.html - 208,209 + 217,218 Unconfirmed count dashboard.unconfirmed @@ -3470,7 +3526,7 @@ src/app/components/master-page/master-page.component.html - 52,54 + 51,53 src/app/components/statistics/statistics.component.ts @@ -3494,7 +3550,7 @@ Lightning Explorer src/app/components/master-page/master-page.component.html - 44,45 + 44,47 src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts @@ -3502,20 +3558,12 @@ master-page.lightning - - beta - - src/app/components/master-page/master-page.component.html - 45,48 - - beta - Documentation Документација src/app/components/master-page/master-page.component.html - 55,57 + 54,56 src/app/docs/docs/docs.component.html @@ -3592,6 +3640,32 @@ dashboard.adjustments + + Broadcast Transaction + Емитирај ја Трансакцијата + + src/app/components/mining-dashboard/mining-dashboard.component.html + 92 + + + src/app/components/push-transaction/push-transaction.component.html + 2 + + + src/app/components/push-transaction/push-transaction.component.html + 8 + + + src/app/dashboard/dashboard.component.html + 161,169 + + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 102 + + Broadcast Transaction + shared.broadcast-transaction + Pools luck (1 week) @@ -3652,7 +3726,7 @@ src/app/components/pool-ranking/pool-ranking.component.html - 136,138 + 152,154 master-page.blocks @@ -3680,11 +3754,23 @@ mining.rank + + Avg Health + + src/app/components/pool-ranking/pool-ranking.component.html + 96,97 + + + src/app/components/pool-ranking/pool-ranking.component.html + 96,98 + + latest-blocks.avg_health + Empty blocks src/app/components/pool-ranking/pool-ranking.component.html - 95,98 + 97,100 mining.empty-blocks @@ -3692,7 +3778,7 @@ All miners src/app/components/pool-ranking/pool-ranking.component.html - 113,114 + 129,130 mining.all-miners @@ -3700,7 +3786,7 @@ Pools Luck (1w) src/app/components/pool-ranking/pool-ranking.component.html - 130,132 + 146,148 mining.miners-luck @@ -3708,7 +3794,7 @@ Pools Count (1w) src/app/components/pool-ranking/pool-ranking.component.html - 142,144 + 158,160 mining.miners-count @@ -3716,7 +3802,7 @@ Mining Pools src/app/components/pool-ranking/pool-ranking.component.ts - 57 + 58 @@ -3930,24 +4016,6 @@ latest-blocks.coinbasetag - - Broadcast Transaction - Емитирај ја Трансакцијата - - src/app/components/push-transaction/push-transaction.component.html - 2 - - - src/app/components/push-transaction/push-transaction.component.html - 8 - - - src/app/dashboard/dashboard.component.html - 154,161 - - Broadcast Transaction - shared.broadcast-transaction - Transaction hex @@ -3956,7 +4024,7 @@ src/app/components/transaction/transaction.component.html - 296,297 + 290,291 transaction.hex @@ -4071,6 +4139,70 @@ search-form.search-title + + Bitcoin Block Height + + src/app/components/search-form/search-results/search-results.component.html + 3 + + search.bitcoin-block-height + + + Bitcoin Transaction + + src/app/components/search-form/search-results/search-results.component.html + 9 + + search.bitcoin-transaction + + + Bitcoin Address + + src/app/components/search-form/search-results/search-results.component.html + 15 + + search.bitcoin-address + + + Bitcoin Block + + src/app/components/search-form/search-results/search-results.component.html + 21 + + search.bitcoin-block + + + Bitcoin Addresses + + src/app/components/search-form/search-results/search-results.component.html + 27 + + search.bitcoin-addresses + + + Lightning Nodes + + src/app/components/search-form/search-results/search-results.component.html + 35 + + search.lightning-nodes + + + Lightning Channels + + src/app/components/search-form/search-results/search-results.component.html + 43 + + search.lightning-channels + + + Go to "" + + src/app/components/search-form/search-results/search-results.component.html + 52 + + search.go-to + Mempool by vBytes (sat/vByte) Mempool прикажан по vBytes (sat/vByte) @@ -4353,7 +4485,7 @@ src/app/components/transactions-list/transactions-list.component.html - 298,301 + 300,303 Transaction unconfirmed state transaction.unconfirmed @@ -4363,7 +4495,7 @@ Пратена src/app/components/transaction/transaction.component.html - 108,109 + 102,103 src/app/lightning/node/node.component.html @@ -4397,7 +4529,7 @@ Потврдена src/app/components/transaction/transaction.component.html - 115,116 + 109,110 Transaction ETA transaction.eta @@ -4407,7 +4539,7 @@ За неколку часа (или повеќе) src/app/components/transaction/transaction.component.html - 121,124 + 115,118 Transaction ETA in several hours or more transaction.eta.in-several-hours @@ -4417,11 +4549,11 @@ Наследник src/app/components/transaction/transaction.component.html - 168,170 + 162,164 src/app/components/transaction/transaction.component.html - 179,181 + 173,175 Descendant transaction.descendant @@ -4431,7 +4563,7 @@ Претходник src/app/components/transaction/transaction.component.html - 190,192 + 184,186 Transaction Ancestor transaction.ancestor @@ -4440,11 +4572,11 @@ Flow src/app/components/transaction/transaction.component.html - 208,211 + 202,205 src/app/components/transaction/transaction.component.html - 346,350 + 340,344 Transaction flow transaction.flow @@ -4453,7 +4585,7 @@ Hide diagram src/app/components/transaction/transaction.component.html - 211,216 + 205,210 hide-diagram @@ -4461,7 +4593,7 @@ Show more src/app/components/transaction/transaction.component.html - 231,233 + 225,227 src/app/components/transactions-list/transactions-list.component.html @@ -4477,7 +4609,7 @@ Show less src/app/components/transaction/transaction.component.html - 233,239 + 227,233 src/app/components/transactions-list/transactions-list.component.html @@ -4489,7 +4621,7 @@ Show diagram src/app/components/transaction/transaction.component.html - 253,254 + 247,248 show-diagram @@ -4498,7 +4630,7 @@ Locktime src/app/components/transaction/transaction.component.html - 292,294 + 286,288 transaction.locktime @@ -4507,7 +4639,7 @@ Трансакцијата не е пронајдена src/app/components/transaction/transaction.component.html - 455,456 + 449,450 transaction.error.transaction-not-found @@ -4516,7 +4648,7 @@ Се чека да се појави во mempool-от... src/app/components/transaction/transaction.component.html - 456,461 + 450,455 transaction.error.waiting-for-it-to-appear @@ -4525,7 +4657,7 @@ Ефективна профизија src/app/components/transaction/transaction.component.html - 489,492 + 485,488 Effective transaction fee rate transaction.effective-fee-rate @@ -4672,7 +4804,7 @@ Show more inputs to reveal fee data src/app/components/transactions-list/transactions-list.component.html - 288,291 + 290,293 transactions-list.load-to-reveal-fee-info @@ -4680,7 +4812,7 @@ remaining src/app/components/transactions-list/transactions-list.component.html - 330,331 + 332,333 x-remaining @@ -4918,21 +5050,12 @@ dashboard.latest-transactions - - USD - во USD - - src/app/dashboard/dashboard.component.html - 126,127 - - dashboard.latest-transactions.USD - Minimum fee Минимум src/app/dashboard/dashboard.component.html - 201,202 + 210,211 Minimum mempool fee dashboard.minimum-fee @@ -4942,7 +5065,7 @@ Отфрлање src/app/dashboard/dashboard.component.html - 202,203 + 211,212 Purgin below fee dashboard.purging @@ -4952,7 +5075,7 @@ Искористена меморија src/app/dashboard/dashboard.component.html - 214,215 + 223,224 Memory usage dashboard.memory-usage @@ -4962,15 +5085,23 @@ L-BTC во циркулација src/app/dashboard/dashboard.component.html - 228,230 + 237,239 dashboard.lbtc-pegs-in-circulation + + mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc. + + src/app/docs/api-docs/api-docs.component.html + 13 + + faq.big-disclaimer + REST API service src/app/docs/api-docs/api-docs.component.html - 39,40 + 41,42 api-docs.title @@ -4979,11 +5110,11 @@ Endpoint src/app/docs/api-docs/api-docs.component.html - 48,49 + 50,51 src/app/docs/api-docs/api-docs.component.html - 102,105 + 104,107 Api docs endpoint @@ -4992,11 +5123,11 @@ Опис src/app/docs/api-docs/api-docs.component.html - 67,68 + 69,70 src/app/docs/api-docs/api-docs.component.html - 106,107 + 108,109 @@ -5004,7 +5135,7 @@ Објавување: action: 'want', data: ['blocks', ...] за да специфираш што да биде објавено. Достапни полиња: blocks, mempool-blocks, live-2h-chart, и stats.Објави трансакции поврзани со адресса: 'track-address': '3PbJ...bF9B' за да ги добиеш сите нови трансакции што ја содржат таа адреса како влез или излез. Враќа низа од транссакции. address-transactions за нови трансакции во mempool-от, и block-transactions за поврдени трансакции во најновиот блок. src/app/docs/api-docs/api-docs.component.html - 107,108 + 109,110 api-docs.websocket.websocket @@ -5166,7 +5297,7 @@ src/app/lightning/channels-list/channels-list.component.html - 120,121 + 123,124 lightning.x-channels @@ -5208,7 +5339,7 @@ src/app/lightning/channels-list/channels-list.component.html - 65,66 + 68,69 status.inactive @@ -5224,7 +5355,7 @@ src/app/lightning/channels-list/channels-list.component.html - 66,68 + 69,71 status.active @@ -5244,7 +5375,7 @@ src/app/lightning/channels-list/channels-list.component.html - 68,70 + 71,73 status.closed @@ -5272,7 +5403,7 @@ src/app/lightning/channels-list/channels-list.component.html - 40,43 + 43,46 src/app/lightning/node-statistics/node-statistics.component.html @@ -5280,7 +5411,7 @@ src/app/lightning/node-statistics/node-statistics.component.html - 47,50 + 46,49 src/app/lightning/nodes-list/nodes-list.component.html @@ -5384,7 +5515,7 @@ src/app/lightning/channels-list/channels-list.component.html - 39,40 + 42,43 lightning.closing_date @@ -5419,6 +5550,27 @@ 37 + + Mutually closed + + src/app/lightning/channel/closing-type/closing-type.component.ts + 20 + + + + Force closed + + src/app/lightning/channel/closing-type/closing-type.component.ts + 24 + + + + Force closed with penalty + + src/app/lightning/channel/closing-type/closing-type.component.ts + 28 + + Open @@ -5431,7 +5583,7 @@ No channels to display src/app/lightning/channels-list/channels-list.component.html - 29,35 + 29,37 lightning.empty-channels-list @@ -5439,7 +5591,7 @@ Alias src/app/lightning/channels-list/channels-list.component.html - 35,37 + 38,40 src/app/lightning/group/group.component.html @@ -5475,7 +5627,7 @@ Status src/app/lightning/channels-list/channels-list.component.html - 37,38 + 40,41 status @@ -5483,7 +5635,7 @@ Channel ID src/app/lightning/channels-list/channels-list.component.html - 41,45 + 44,48 channels.id @@ -5491,11 +5643,11 @@ sats src/app/lightning/channels-list/channels-list.component.html - 60,64 + 63,67 src/app/lightning/channels-list/channels-list.component.html - 84,88 + 87,91 src/app/lightning/channels-statistics/channels-statistics.component.html @@ -5539,6 +5691,22 @@ shared.sats + + avg + + src/app/lightning/channels-statistics/channels-statistics.component.html + 3,5 + + statistics.average-small + + + med + + src/app/lightning/channels-statistics/channels-statistics.component.html + 6,9 + + statistics.median-small + Avg Capacity @@ -5655,11 +5823,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 17,18 + 16,17 src/app/lightning/node-statistics/node-statistics.component.html - 54,57 + 53,56 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -5727,11 +5895,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 29,30 + 28,29 src/app/lightning/node-statistics/node-statistics.component.html - 61,64 + 60,63 src/app/lightning/nodes-list/nodes-list.component.html @@ -5887,6 +6055,28 @@ lightning.node-fee-distribution + + Outgoing Fees + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 170 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 208 + + + + Incoming Fees + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 178 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 222 + + Percentage change past week @@ -5895,11 +6085,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 18,20 + 17,19 src/app/lightning/node-statistics/node-statistics.component.html - 30,32 + 29,31 mining.percentage-change-last-week @@ -6123,7 +6313,7 @@ No geolocation data available src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts - 218,213 + 219,214 @@ -6285,6 +6475,7 @@ Tor Capacity + Капацитет на Tor src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html 20,22 @@ -6379,6 +6570,7 @@ Active nodes + Активни нодови src/app/lightning/nodes-per-isp/nodes-per-isp.component.html 14,18 @@ -6418,6 +6610,7 @@ Oldest nodes + Најстари нодови src/app/lightning/nodes-rankings-dashboard/nodes-rankings-dashboard.component.html 36 @@ -6426,6 +6619,7 @@ Top lightning nodes + Топ lightning нодови src/app/lightning/nodes-rankings-dashboard/nodes-rankings-dashboard.component.ts 22 @@ -6433,6 +6627,7 @@ Indexing in progress + Индексирањето е во прогрес src/app/lightning/statistics-chart/lightning-statistics-chart.component.html 52,55 diff --git a/frontend/src/locale/messages.vi.xlf b/frontend/src/locale/messages.vi.xlf index 4af52e030..41e5e9281 100644 --- a/frontend/src/locale/messages.vi.xlf +++ b/frontend/src/locale/messages.vi.xlf @@ -11,6 +11,7 @@ Slide of + Slide of node_modules/src/carousel/carousel.ts 175,181 @@ -147,6 +148,7 @@ + node_modules/src/progressbar/progressbar.ts 30,33 @@ -357,11 +359,11 @@ src/app/components/block/block.component.html - 290,291 + 310,311 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 26,27 + 46,47 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -382,11 +384,11 @@ src/app/components/block/block.component.html - 291,292 + 311,312 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 27,28 + 47,48 src/app/components/mempool-blocks/mempool-blocks.component.html @@ -424,7 +426,7 @@ src/app/components/block/block.component.html - 40,41 + 38,39 block.hash @@ -449,7 +451,7 @@ src/app/components/block/block.component.html - 44,46 + 42,44 src/app/components/blocks-list/blocks-list.component.html @@ -592,11 +594,11 @@ src/app/components/master-page/master-page.component.html - 49,51 + 48,50 src/app/components/pool-ranking/pool-ranking.component.html - 94,96 + 94,95 @@ -775,14 +777,22 @@ src/app/components/about/about.component.html 385,389 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 88 + src/app/dashboard/dashboard.component.html - 150,152 + 157,159 src/app/docs/docs/docs.component.html 51 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 97 + Terms of Service shared.terms-of-service @@ -793,14 +803,22 @@ src/app/bisq/bisq-main-dashboard/bisq-main-dashboard.component.html 113,120 + + src/app/components/mining-dashboard/mining-dashboard.component.html + 90 + src/app/dashboard/dashboard.component.html - 152,154 + 159,161 src/app/docs/docs/docs.component.html 53 + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 99 + Privacy Policy shared.privacy-policy @@ -988,7 +1006,7 @@ src/app/dashboard/dashboard.component.html - 124,125 + 124,126 @@ -1036,7 +1054,7 @@ src/app/components/transaction/transaction.component.html - 158,160 + 152,154 src/app/components/transactions-list/transactions-list.component.html @@ -1052,11 +1070,11 @@ src/app/components/block/block.component.html - 246,247 + 252,253 src/app/components/transaction/transaction.component.html - 288,290 + 282,284 transaction.version @@ -1106,7 +1124,7 @@ src/app/components/transactions-list/transactions-list.component.html - 294,295 + 296,297 Transaction singular confirmation count shared.confirmation-count.singular @@ -1128,7 +1146,7 @@ src/app/components/transactions-list/transactions-list.component.html - 295,296 + 297,298 Transaction plural confirmation count shared.confirmation-count.plural @@ -1140,10 +1158,6 @@ src/app/bisq/bisq-transaction/bisq-transaction.component.html 43,45 - - src/app/components/transaction/transaction.component.html - 65,67 - Transaction included in block transaction.included-in-block @@ -1156,11 +1170,11 @@ src/app/components/transaction/transaction.component.html - 77,80 + 71,74 src/app/components/transaction/transaction.component.html - 135,138 + 129,132 Transaction features transaction.features @@ -1188,11 +1202,11 @@ src/app/components/transaction/transaction.component.html - 262,267 + 256,261 src/app/components/transaction/transaction.component.html - 406,412 + 400,406 transaction.details @@ -1209,11 +1223,11 @@ src/app/components/transaction/transaction.component.html - 249,253 + 243,247 src/app/components/transaction/transaction.component.html - 377,383 + 371,377 Transaction inputs and outputs transaction.inputs-and-outputs @@ -1231,7 +1245,7 @@ src/app/components/transaction/transaction.component.ts - 241,240 + 244,243 @@ -1251,7 +1265,7 @@ src/app/components/transaction/transaction.component.html - 159,160 + 153,154 src/app/dashboard/dashboard.component.html @@ -1267,7 +1281,7 @@ src/app/components/transaction/transaction.component.html - 72,73 + 66,67 Transaction Confirmed state transaction.confirmed @@ -1530,7 +1544,7 @@ src/app/components/master-page/master-page.component.html - 58,61 + 57,60 @@ -1567,7 +1581,7 @@ src/app/components/amount/amount.component.html - 6,9 + 18,21 src/app/components/asset-circulation/asset-circulation.component.html @@ -1583,7 +1597,7 @@ src/app/components/transactions-list/transactions-list.component.html - 302,304 + 304,306 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -1666,7 +1680,7 @@ src/app/components/assets/assets.component.html - 29,31 + 31,33 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -1888,7 +1902,7 @@ src/app/components/assets/assets.component.html - 30,31 + 32,33 Asset ticker header @@ -1901,7 +1915,7 @@ src/app/components/assets/assets.component.html - 31,34 + 33,36 Asset Issuer Domain header @@ -1914,7 +1928,7 @@ src/app/components/assets/assets.component.html - 32,36 + 34,38 Asset ID header @@ -1923,7 +1937,7 @@ Lỗi khi tải dữ liệu tài sản. src/app/components/assets/assets.component.html - 48,53 + 50,55 Asset data load error @@ -2047,7 +2061,7 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 161 + 165 @@ -2063,7 +2077,7 @@ src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 163 + 167 @@ -2075,7 +2089,7 @@ src/app/components/block-fees-graph/block-fees-graph.component.ts - 62 + 67 src/app/components/graphs/graphs.component.html @@ -2088,15 +2102,15 @@ Lập chỉ mục khối src/app/components/block-fees-graph/block-fees-graph.component.ts - 110,105 + 116,111 src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 108,103 + 113,108 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 115,110 + 116,111 src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -2121,6 +2135,7 @@ not available + không có sẵn src/app/components/block-overview-graph/block-overview-graph.component.html 5 @@ -2140,7 +2155,7 @@ src/app/components/transaction/transaction.component.html - 476 + 472 src/app/components/tx-bowtie-graph-tooltip/tx-bowtie-graph-tooltip.component.html @@ -2166,11 +2181,11 @@ src/app/components/transaction/transaction.component.html - 476,477 + 472 src/app/components/transactions-list/transactions-list.component.html - 286,287 + 288 sat shared.sat @@ -2184,11 +2199,11 @@ src/app/components/transaction/transaction.component.html - 161,165 + 155,159 src/app/components/transaction/transaction.component.html - 479,481 + 475,477 src/app/lightning/channel/channel-box/channel-box.component.html @@ -2200,7 +2215,7 @@ src/app/lightning/channels-list/channels-list.component.html - 38,39 + 41,42 Transaction fee rate transaction.fee-rate @@ -2218,19 +2233,19 @@ src/app/components/block/block.component.html - 125,128 + 124,127 src/app/components/block/block.component.html - 129 + 128,130 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 12,14 + 19,22 src/app/components/blockchain-blocks/blockchain-blocks.component.html - 15,17 + 30,33 src/app/components/fees-box/fees-box.component.html @@ -2270,27 +2285,27 @@ src/app/components/transaction/transaction.component.html - 173,174 + 167,168 src/app/components/transaction/transaction.component.html - 184,185 + 178,179 src/app/components/transaction/transaction.component.html - 195,196 + 189,190 src/app/components/transaction/transaction.component.html - 481,484 + 477,480 src/app/components/transaction/transaction.component.html - 492,494 + 488,490 src/app/components/transactions-list/transactions-list.component.html - 286 + 286,287 src/app/dashboard/dashboard.component.html @@ -2298,7 +2313,7 @@ src/app/dashboard/dashboard.component.html - 204,208 + 213,217 sat/vB shared.sat-vbyte @@ -2312,17 +2327,18 @@ src/app/components/transaction/transaction.component.html - 160,162 + 154,156 src/app/components/transaction/transaction.component.html - 274,277 + 268,271 Transaction Virtual Size transaction.vsize Audit status + Trạng thái kiểm tra src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 36 @@ -2331,6 +2347,7 @@ Match + Khớp src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 38 @@ -2339,6 +2356,7 @@ Removed + Đã xoá src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 39 @@ -2347,6 +2365,7 @@ Marginal fee rate + Tỷ lệ phí cận biên src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 40 @@ -2359,6 +2378,7 @@ Recently broadcasted + Truyền phát gần đây src/app/components/block-overview-tooltip/block-overview-tooltip.component.html 41 @@ -2424,7 +2444,7 @@ src/app/components/block-rewards-graph/block-rewards-graph.component.ts - 60 + 65 src/app/components/graphs/graphs.component.html @@ -2454,15 +2474,15 @@ Kích thước src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 180,179 + 184,183 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 226,224 + 239,237 src/app/components/block/block.component.html - 50,52 + 48,50 src/app/components/blocks-list/blocks-list.component.html @@ -2486,7 +2506,7 @@ src/app/components/transaction/transaction.component.html - 270,272 + 264,266 src/app/dashboard/dashboard.component.html @@ -2498,11 +2518,11 @@ Khối lượng src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 188,187 + 192,191 src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts - 257,254 + 270,267 src/app/components/block/block-preview.component.html @@ -2510,11 +2530,23 @@ src/app/components/block/block.component.html - 54,56 + 52,54 src/app/components/transaction/transaction.component.html - 278,280 + 272,274 + + + + Size per weight + Kích thước mỗi trọng lượng + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 200,199 + + + src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts + 282,279 @@ -2530,15 +2562,6 @@ shared.block-title - - - - - src/app/components/block/block-preview.component.html - 11,12 - - shared.block-title - Median fee Phí trung bình @@ -2548,7 +2571,7 @@ src/app/components/block/block.component.html - 128,129 + 127,128 src/app/components/mempool-block/mempool-block.component.html @@ -2565,11 +2588,11 @@ src/app/components/block/block.component.html - 133,135 + 138,140 src/app/components/block/block.component.html - 159,162 + 164,167 src/app/components/mempool-block/mempool-block.component.html @@ -2587,7 +2610,7 @@ src/app/components/block/block.component.html - 168,170 + 173,175 block.miner @@ -2600,7 +2623,7 @@ src/app/components/block/block.component.ts - 227 + 242 @@ -2625,25 +2648,42 @@ Previous Block - - Block health + + Health + Sức khỏe src/app/components/block/block.component.html - 58,61 + 56 - block.health + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + + src/app/components/blocks-list/blocks-list.component.html + 18,19 + + latest-blocks.health Unknown không xác định src/app/components/block/block.component.html - 69,72 + 67,70 src/app/components/blocks-list/blocks-list.component.html 60,63 + + src/app/components/pool-ranking/pool-ranking.component.html + 121,124 + + + src/app/lightning/channel/closing-type/closing-type.component.ts + 32 + src/app/lightning/node/node.component.html 52,55 @@ -2667,7 +2707,7 @@ Khoảng phí src/app/components/block/block.component.html - 124,125 + 123,124 src/app/components/mempool-block/mempool-block.component.html @@ -2680,7 +2720,7 @@ Dựa trên giao dịch segwit gốc trung bình là 140 vBytes src/app/components/block/block.component.html - 129,131 + 131,136 src/app/components/fees-box/fees-box.component.html @@ -2704,49 +2744,66 @@ Transaction fee tooltip - - Subsidy + fees: - Trợ cấp + phí: + + Subsidy + fees + Trợ cấp + phí src/app/components/block/block.component.html - 148,151 + 153,156 src/app/components/block/block.component.html - 163,167 + 168,172 Total subsidy and fees in a block block.subsidy-and-fees - - Projected + + Expected + Dự kiến src/app/components/block/block.component.html - 210,212 + 216 - block.projected + block.expected + + + beta + bản beta + + src/app/components/block/block.component.html + 216,217 + + + src/app/components/block/block.component.html + 222,224 + + beta Actual + Thực tế src/app/components/block/block.component.html - 212,216 + 218,222 block.actual - - Projected Block + + Expected Block + Khối dự kiến src/app/components/block/block.component.html - 216,218 + 222 - block.projected-block + block.expected-block Actual Block + Khối thực tế src/app/components/block/block.component.html - 225,227 + 231 block.actual-block @@ -2755,7 +2812,7 @@ Bits src/app/components/block/block.component.html - 250,252 + 256,258 block.bits @@ -2764,7 +2821,7 @@ Merkle root src/app/components/block/block.component.html - 254,256 + 260,262 block.merkle-root @@ -2773,7 +2830,7 @@ Độ khó src/app/components/block/block.component.html - 265,268 + 271,274 src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html @@ -2802,7 +2859,7 @@ Nonce src/app/components/block/block.component.html - 269,271 + 275,277 block.nonce @@ -2811,20 +2868,30 @@ Khối tiêu đề Hex src/app/components/block/block.component.html - 273,274 + 279,280 block.header + + Audit + Kiểm tra + + src/app/components/block/block.component.html + 297,301 + + Toggle Audit + block.toggle-audit + Details Chi tiết src/app/components/block/block.component.html - 284,288 + 304,308 src/app/components/transaction/transaction.component.html - 254,259 + 248,253 src/app/lightning/channel/channel.component.html @@ -2846,11 +2913,11 @@ Lỗi trong lúc tải dữ liệu. src/app/components/block/block.component.html - 303,305 + 323,325 src/app/components/block/block.component.html - 339,343 + 362,366 src/app/lightning/channel/channel-preview.component.html @@ -2872,9 +2939,10 @@ Why is this block empty? + Tại sao khối này trống? src/app/components/block/block.component.html - 361,367 + 384,390 block.empty-block-explanation @@ -2920,18 +2988,6 @@ latest-blocks.mined - - Health - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - - src/app/components/blocks-list/blocks-list.component.html - 18,19 - - latest-blocks.health - Reward Phần thưởng @@ -2995,7 +3051,7 @@ src/app/dashboard/dashboard.component.html - 210,214 + 219,223 dashboard.txs @@ -3234,7 +3290,7 @@ src/app/dashboard/dashboard.component.html - 237,238 + 246,247 dashboard.incoming-transactions @@ -3247,7 +3303,7 @@ src/app/dashboard/dashboard.component.html - 240,243 + 249,252 dashboard.backend-is-synchronizing @@ -3260,7 +3316,7 @@ src/app/dashboard/dashboard.component.html - 245,250 + 254,259 vB/s shared.vbytes-per-second @@ -3274,7 +3330,7 @@ src/app/dashboard/dashboard.component.html - 208,209 + 217,218 Unconfirmed count dashboard.unconfirmed @@ -3531,7 +3587,7 @@ src/app/components/master-page/master-page.component.html - 52,54 + 51,53 src/app/components/statistics/statistics.component.ts @@ -3557,7 +3613,7 @@ Trình duyệt Lightning src/app/components/master-page/master-page.component.html - 44,45 + 44,47 src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts @@ -3565,21 +3621,12 @@ master-page.lightning - - beta - bản beta - - src/app/components/master-page/master-page.component.html - 45,48 - - beta - Documentation Tài liệu src/app/components/master-page/master-page.component.html - 55,57 + 54,56 src/app/docs/docs/docs.component.html @@ -3659,6 +3706,32 @@ dashboard.adjustments + + Broadcast Transaction + Truyền tải Giao dịch + + src/app/components/mining-dashboard/mining-dashboard.component.html + 92 + + + src/app/components/push-transaction/push-transaction.component.html + 2 + + + src/app/components/push-transaction/push-transaction.component.html + 8 + + + src/app/dashboard/dashboard.component.html + 161,169 + + + src/app/lightning/lightning-dashboard/lightning-dashboard.component.html + 102 + + Broadcast Transaction + shared.broadcast-transaction + Pools luck (1 week) Pools luck (1 tuần) @@ -3726,7 +3799,7 @@ src/app/components/pool-ranking/pool-ranking.component.html - 136,138 + 152,154 master-page.blocks @@ -3756,12 +3829,25 @@ mining.rank + + Avg Health + Sức khỏe trung bình + + src/app/components/pool-ranking/pool-ranking.component.html + 96,97 + + + src/app/components/pool-ranking/pool-ranking.component.html + 96,98 + + latest-blocks.avg_health + Empty blocks Các khối trống src/app/components/pool-ranking/pool-ranking.component.html - 95,98 + 97,100 mining.empty-blocks @@ -3770,7 +3856,7 @@ Tất cả thợ đào src/app/components/pool-ranking/pool-ranking.component.html - 113,114 + 129,130 mining.all-miners @@ -3779,7 +3865,7 @@ Pool Luck (1 tuần) src/app/components/pool-ranking/pool-ranking.component.html - 130,132 + 146,148 mining.miners-luck @@ -3788,7 +3874,7 @@ Số lượng Pool (1 tuần) src/app/components/pool-ranking/pool-ranking.component.html - 142,144 + 158,160 mining.miners-count @@ -3797,7 +3883,7 @@ Pool đào src/app/components/pool-ranking/pool-ranking.component.ts - 57 + 58 @@ -4024,24 +4110,6 @@ latest-blocks.coinbasetag - - Broadcast Transaction - Truyền tải Giao dịch - - src/app/components/push-transaction/push-transaction.component.html - 2 - - - src/app/components/push-transaction/push-transaction.component.html - 8 - - - src/app/dashboard/dashboard.component.html - 154,161 - - Broadcast Transaction - shared.broadcast-transaction - Transaction hex Hex giao dịch @@ -4051,7 +4119,7 @@ src/app/components/transaction/transaction.component.html - 296,297 + 290,291 transaction.hex @@ -4083,6 +4151,7 @@ Avg Block Fees + Phí khối trung bình src/app/components/reward-stats/reward-stats.component.html 17 @@ -4095,6 +4164,7 @@ Average fees per block in the past 144 blocks + Phí trung bình cho mỗi khối trong 144 khối vừa qua src/app/components/reward-stats/reward-stats.component.html 18,20 @@ -4103,6 +4173,7 @@ BTC/block + BTC/khối src/app/components/reward-stats/reward-stats.component.html 21,24 @@ -4112,6 +4183,7 @@ Avg Tx Fee + Phí giao dịch trung bình src/app/components/reward-stats/reward-stats.component.html 30 @@ -4172,6 +4244,78 @@ search-form.search-title + + Bitcoin Block Height + Chiều cao khối Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 3 + + search.bitcoin-block-height + + + Bitcoin Transaction + Giao dịch Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 9 + + search.bitcoin-transaction + + + Bitcoin Address + Địa chỉ Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 15 + + search.bitcoin-address + + + Bitcoin Block + Khối Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 21 + + search.bitcoin-block + + + Bitcoin Addresses + Địa chỉ Bitcoin + + src/app/components/search-form/search-results/search-results.component.html + 27 + + search.bitcoin-addresses + + + Lightning Nodes + Nút Lightning + + src/app/components/search-form/search-results/search-results.component.html + 35 + + search.lightning-nodes + + + Lightning Channels + Kênh Lightning + + src/app/components/search-form/search-results/search-results.component.html + 43 + + search.lightning-channels + + + Go to "" + Tới &quot; &quot; + + src/app/components/search-form/search-results/search-results.component.html + 52 + + search.go-to + Mempool by vBytes (sat/vByte) Mempool theo vBytes (sat / vByte) @@ -4429,6 +4573,7 @@ This transaction replaced: + Giao dịch này đã thay thế: src/app/components/transaction/transaction.component.html 10,12 @@ -4438,6 +4583,7 @@ Replaced + Đã thay thế src/app/components/transaction/transaction.component.html 36,39 @@ -4454,7 +4600,7 @@ src/app/components/transactions-list/transactions-list.component.html - 298,301 + 300,303 Transaction unconfirmed state transaction.unconfirmed @@ -4464,7 +4610,7 @@ Lần đầu thấy src/app/components/transaction/transaction.component.html - 108,109 + 102,103 src/app/lightning/node/node.component.html @@ -4498,7 +4644,7 @@ Thời gian dự kiến src/app/components/transaction/transaction.component.html - 115,116 + 109,110 Transaction ETA transaction.eta @@ -4508,7 +4654,7 @@ Trong vài giờ (hoặc hơn) src/app/components/transaction/transaction.component.html - 121,124 + 115,118 Transaction ETA in several hours or more transaction.eta.in-several-hours @@ -4518,11 +4664,11 @@ Descendant src/app/components/transaction/transaction.component.html - 168,170 + 162,164 src/app/components/transaction/transaction.component.html - 179,181 + 173,175 Descendant transaction.descendant @@ -4532,7 +4678,7 @@ Ancestor src/app/components/transaction/transaction.component.html - 190,192 + 184,186 Transaction Ancestor transaction.ancestor @@ -4542,11 +4688,11 @@ lưu lượng src/app/components/transaction/transaction.component.html - 208,211 + 202,205 src/app/components/transaction/transaction.component.html - 346,350 + 340,344 Transaction flow transaction.flow @@ -4556,7 +4702,7 @@ Ẩn sơ đồ src/app/components/transaction/transaction.component.html - 211,216 + 205,210 hide-diagram @@ -4565,7 +4711,7 @@ Hiển thị nhiều hơn src/app/components/transaction/transaction.component.html - 231,233 + 225,227 src/app/components/transactions-list/transactions-list.component.html @@ -4582,7 +4728,7 @@ Hiển thị ít hơn src/app/components/transaction/transaction.component.html - 233,239 + 227,233 src/app/components/transactions-list/transactions-list.component.html @@ -4595,7 +4741,7 @@ Hiển thị sơ đồ src/app/components/transaction/transaction.component.html - 253,254 + 247,248 show-diagram @@ -4604,7 +4750,7 @@ Thời gian khóa src/app/components/transaction/transaction.component.html - 292,294 + 286,288 transaction.locktime @@ -4613,7 +4759,7 @@ Không tìm thấy giao dịch. src/app/components/transaction/transaction.component.html - 455,456 + 449,450 transaction.error.transaction-not-found @@ -4622,7 +4768,7 @@ Đang đợi nó xuất hiện trong mempool ... src/app/components/transaction/transaction.component.html - 456,461 + 450,455 transaction.error.waiting-for-it-to-appear @@ -4631,7 +4777,7 @@ Tỷ lệ phí hiệu quả src/app/components/transaction/transaction.component.html - 489,492 + 485,488 Effective transaction fee rate transaction.effective-fee-rate @@ -4777,17 +4923,19 @@ Show more inputs to reveal fee data + Hiển thị thêm đầu vào để tiết lộ dữ liệu phí src/app/components/transactions-list/transactions-list.component.html - 288,291 + 290,293 transactions-list.load-to-reveal-fee-info remaining + còn lại src/app/components/transactions-list/transactions-list.component.html - 330,331 + 332,333 x-remaining @@ -4935,6 +5083,7 @@ This transaction does not use Taproot + Giao dịch này không sử dụng Taproot src/app/components/tx-features/tx-features.component.html 18 @@ -5037,21 +5186,12 @@ dashboard.latest-transactions - - USD - USD - - src/app/dashboard/dashboard.component.html - 126,127 - - dashboard.latest-transactions.USD - Minimum fee Phí tối thiểu src/app/dashboard/dashboard.component.html - 201,202 + 210,211 Minimum mempool fee dashboard.minimum-fee @@ -5061,7 +5201,7 @@ Thanh lọc src/app/dashboard/dashboard.component.html - 202,203 + 211,212 Purgin below fee dashboard.purging @@ -5071,7 +5211,7 @@ Sử dụng bộ nhớ src/app/dashboard/dashboard.component.html - 214,215 + 223,224 Memory usage dashboard.memory-usage @@ -5081,16 +5221,25 @@ L-BTC đang lưu hành src/app/dashboard/dashboard.component.html - 228,230 + 237,239 dashboard.lbtc-pegs-in-circulation + + mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc. + mempool.space chỉ cung cấp dữ liệu về mạng Bitcoin. Trang không thể giúp bạn lấy tiền, xác nhận giao dịch của bạn nhanh hơn, v.v. + + src/app/docs/api-docs/api-docs.component.html + 13 + + faq.big-disclaimer + REST API service Dịch vụ REST API src/app/docs/api-docs/api-docs.component.html - 39,40 + 41,42 api-docs.title @@ -5099,11 +5248,11 @@ Điểm cuối src/app/docs/api-docs/api-docs.component.html - 48,49 + 50,51 src/app/docs/api-docs/api-docs.component.html - 102,105 + 104,107 Api docs endpoint @@ -5112,11 +5261,11 @@ Sự miêu tả src/app/docs/api-docs/api-docs.component.html - 67,68 + 69,70 src/app/docs/api-docs/api-docs.component.html - 106,107 + 108,109 @@ -5124,7 +5273,7 @@ Push mặc định: hành động: 'want', dữ liệu: ['blocks', ...] để thể hiện những gì bạn muốn đẩy. Có sẵn: khối , mempool-khối , live-2h-chart c195a641ez0c195ez0. Đẩy các giao dịch liên quan đến địa chỉ: 'track-address': '3PbJ ... bF9B' a0c95ez0 đầu vào để nhận các giao dịch đầu vào a0c95ez0 a0c95ez0 đó để nhận địa chỉ đầu vào là all95ez0. Trả về một mảng các giao dịch. địa chỉ-giao dịch cho các giao dịch mempool mới và giao dịch khối cho các giao dịch được xác nhận khối mới. src/app/docs/api-docs/api-docs.component.html - 107,108 + 109,110 api-docs.websocket.websocket @@ -5297,12 +5446,13 @@ src/app/lightning/channels-list/channels-list.component.html - 120,121 + 123,124 lightning.x-channels Starting balance + Số dư bắt đầu src/app/lightning/channel/channel-close-box/channel-close-box.component.html 6 @@ -5312,6 +5462,7 @@ Closing balance + Số dư kết thúc src/app/lightning/channel/channel-close-box/channel-close-box.component.html 12 @@ -5341,7 +5492,7 @@ src/app/lightning/channels-list/channels-list.component.html - 65,66 + 68,69 status.inactive @@ -5358,7 +5509,7 @@ src/app/lightning/channels-list/channels-list.component.html - 66,68 + 69,71 status.active @@ -5379,7 +5530,7 @@ src/app/lightning/channels-list/channels-list.component.html - 68,70 + 71,73 status.closed @@ -5409,7 +5560,7 @@ src/app/lightning/channels-list/channels-list.component.html - 40,43 + 43,46 src/app/lightning/node-statistics/node-statistics.component.html @@ -5417,7 +5568,7 @@ src/app/lightning/node-statistics/node-statistics.component.html - 47,50 + 46,49 src/app/lightning/nodes-list/nodes-list.component.html @@ -5525,12 +5676,13 @@ src/app/lightning/channels-list/channels-list.component.html - 39,40 + 42,43 lightning.closing_date Closed by + Đóng bởi src/app/lightning/channel/channel.component.html 52,54 @@ -5563,6 +5715,30 @@ 37 + + Mutually closed + Đóng lẫn nhau + + src/app/lightning/channel/closing-type/closing-type.component.ts + 20 + + + + Force closed + Buộc đóng + + src/app/lightning/channel/closing-type/closing-type.component.ts + 24 + + + + Force closed with penalty + Bắt buộc đóng với khoản phạt + + src/app/lightning/channel/closing-type/closing-type.component.ts + 28 + + Open Mở @@ -5577,7 +5753,7 @@ Không có kênh nào để hiển thị src/app/lightning/channels-list/channels-list.component.html - 29,35 + 29,37 lightning.empty-channels-list @@ -5586,7 +5762,7 @@ Tên riêng src/app/lightning/channels-list/channels-list.component.html - 35,37 + 38,40 src/app/lightning/group/group.component.html @@ -5623,7 +5799,7 @@ Trạng thái src/app/lightning/channels-list/channels-list.component.html - 37,38 + 40,41 status @@ -5632,7 +5808,7 @@ ID kênh src/app/lightning/channels-list/channels-list.component.html - 41,45 + 44,48 channels.id @@ -5641,11 +5817,11 @@ satoshi src/app/lightning/channels-list/channels-list.component.html - 60,64 + 63,67 src/app/lightning/channels-list/channels-list.component.html - 84,88 + 87,91 src/app/lightning/channels-statistics/channels-statistics.component.html @@ -5689,6 +5865,24 @@ shared.sats + + avg + trung bình + + src/app/lightning/channels-statistics/channels-statistics.component.html + 3,5 + + statistics.average-small + + + med + trung vị + + src/app/lightning/channels-statistics/channels-statistics.component.html + 6,9 + + statistics.median-small + Avg Capacity Công suất trung bình @@ -5817,11 +6011,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 17,18 + 16,17 src/app/lightning/node-statistics/node-statistics.component.html - 54,57 + 53,56 src/app/lightning/nodes-per-country-chart/nodes-per-country-chart.component.html @@ -5891,11 +6085,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 29,30 + 28,29 src/app/lightning/node-statistics/node-statistics.component.html - 61,64 + 60,63 src/app/lightning/nodes-list/nodes-list.component.html @@ -6052,12 +6246,37 @@ Fee distribution + Phân bổ phí src/app/lightning/node-fee-chart/node-fee-chart.component.html 2 lightning.node-fee-distribution + + Outgoing Fees + Phí đầu ra + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 170 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 208 + + + + Incoming Fees + Phí đầu vào + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 178 + + + src/app/lightning/node-fee-chart/node-fee-chart.component.ts + 222 + + Percentage change past week Phần trăm thay đổi trong tuần trước @@ -6067,11 +6286,11 @@ src/app/lightning/node-statistics/node-statistics.component.html - 18,20 + 17,19 src/app/lightning/node-statistics/node-statistics.component.html - 30,32 + 29,31 mining.percentage-change-last-week @@ -6147,6 +6366,7 @@ Avg channel distance + Khoảng cách kênh trung bình src/app/lightning/node/node.component.html 56,57 @@ -6186,6 +6406,7 @@ Liquidity ad + Quảng cáo thanh khoản src/app/lightning/node/node.component.html 138,141 @@ -6194,6 +6415,7 @@ Lease fee rate + Giá thuê src/app/lightning/node/node.component.html 144,147 @@ -6203,6 +6425,7 @@ Lease base fee + Phí thuê cơ sở src/app/lightning/node/node.component.html 152,154 @@ -6211,6 +6434,7 @@ Funding weight + Trọng lượng nguồn quỹ src/app/lightning/node/node.component.html 158,159 @@ -6219,6 +6443,7 @@ Channel fee rate + Phí kênh src/app/lightning/node/node.component.html 168,171 @@ -6228,6 +6453,7 @@ Channel base fee + Phí kênh cơ sở src/app/lightning/node/node.component.html 176,178 @@ -6236,6 +6462,7 @@ Compact lease + Thuê gói nhỏ src/app/lightning/node/node.component.html 188,190 @@ -6244,6 +6471,7 @@ TLV extension records + Hồ sơ gia hạn TLV src/app/lightning/node/node.component.html 199,202 @@ -6310,7 +6538,7 @@ Không có sẵn dữ liệu vị trí địa lý src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts - 218,213 + 219,214 @@ -6324,6 +6552,7 @@ Indexing in progress + Đang lập chỉ mục src/app/lightning/nodes-networks-chart/nodes-networks-chart.component.ts 121,116 @@ -6591,6 +6820,7 @@ Active nodes + Các nút hoạt động src/app/lightning/nodes-per-isp/nodes-per-isp.component.html 14,18 From 2309a769cd470456ce7802e91d1013cbf00bdc8c Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 1 Mar 2023 11:30:33 -0600 Subject: [PATCH 24/47] Don't try to fetch cpfp if database disabled --- backend/src/api/bitcoin/bitcoin.routes.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/api/bitcoin/bitcoin.routes.ts b/backend/src/api/bitcoin/bitcoin.routes.ts index 78d027663..2fc497650 100644 --- a/backend/src/api/bitcoin/bitcoin.routes.ts +++ b/backend/src/api/bitcoin/bitcoin.routes.ts @@ -217,7 +217,15 @@ class BitcoinRoutes { res.json(cpfpInfo); return; } else { - const cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId); + let cpfpInfo; + if (config.DATABASE.ENABLED) { + cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId); + } else { + res.json({ + ancestors: [] + }); + return; + } if (cpfpInfo) { res.json(cpfpInfo); return; From be4bd691eec804092b263ec51cb7377dce30b12e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 2 Mar 2023 10:08:40 +0900 Subject: [PATCH 25/47] Remove useless code --- backend/src/api/blocks.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 12eb3b693..aa33f1ff7 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -748,30 +748,15 @@ class Blocks { return returnBlocks; } - // Check if block height exist in local cache to skip the hash lookup - const blockByHeight = this.getBlocks().find((b) => b.height === currentHeight); - let startFromHash: string | null = null; - if (blockByHeight) { - startFromHash = blockByHeight.id; - } else if (!Common.indexingEnabled()) { - startFromHash = await bitcoinApi.$getBlockHash(currentHeight); - } - - let nextHash = startFromHash; for (let i = 0; i < limit && currentHeight >= 0; i++) { let block = this.getBlocks().find((b) => b.height === currentHeight); if (block) { // Using the memory cache (find by height) returnBlocks.push(block); - } else if (Common.indexingEnabled()) { + } else { // Using indexing (find by height, index on the fly, save in database) block = await this.$indexBlock(currentHeight); returnBlocks.push(block); - } else if (nextHash !== null) { - // Without indexing, query block on the fly using bitoin backend, follow previous hash links - block = await this.$indexBlock(currentHeight); - nextHash = block.previousblockhash; - returnBlocks.push(block); } currentHeight--; } From 5129116fe452f68b4d23a04abe68ea6ec968718a Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 2 Mar 2023 10:45:14 +0900 Subject: [PATCH 26/47] Don't run CI on "review_requested" event --- .github/workflows/cypress.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 8c720917e..bc66678d4 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -4,7 +4,7 @@ on: push: branches: [master] pull_request: - types: [opened, review_requested, synchronize] + types: [opened, synchronize] jobs: cypress: From ec0d8b7c485ce923ccea9393d9099b986a462aca Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 2 Mar 2023 19:30:02 +0900 Subject: [PATCH 27/47] ops: Remove fork repos from upgrade script --- production/mempool-build-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/mempool-build-all b/production/mempool-build-all index aa764da7d..b45c0edc6 100755 --- a/production/mempool-build-all +++ b/production/mempool-build-all @@ -38,7 +38,7 @@ update_repo() cd "$HOME/${site}" || exit 1 git fetch origin || exit 1 - for remote in origin hunicus mononaut;do + for remote in origin;do git remote add "${remote}" "https://github.com/${remote}/mempool" >/dev/null 2>&1 git fetch "${remote}" || exit 1 done From 7b01286ed270b7646e591e02f40ad4e755e3d658 Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 2 Mar 2023 21:50:09 +0900 Subject: [PATCH 28/47] Run the go to anchor whenever data is loaded --- .../app/components/about/about.component.ts | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index 33c6ac5a2..0f71645d6 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -6,8 +6,9 @@ import { Observable } from 'rxjs'; import { ApiService } from '../../services/api.service'; import { IBackendInfo } from '../../interfaces/websocket.interface'; import { Router, ActivatedRoute } from '@angular/router'; -import { map } from 'rxjs/operators'; +import { map, tap } from 'rxjs/operators'; import { ITranslators } from '../../interfaces/node-api.interface'; +import { DOCUMENT } from '@angular/common'; @Component({ selector: 'app-about', @@ -33,6 +34,7 @@ export class AboutComponent implements OnInit { private router: Router, private route: ActivatedRoute, @Inject(LOCALE_ID) public locale: string, + @Inject(DOCUMENT) private document: Document, ) { } ngOnInit() { @@ -40,17 +42,21 @@ export class AboutComponent implements OnInit { this.seoService.setTitle($localize`:@@004b222ff9ef9dd4771b777950ca1d0e4cd4348a:About`); this.websocketService.want(['blocks']); - this.sponsors$ = this.apiService.getDonation$(); + this.sponsors$ = this.apiService.getDonation$() + .pipe( + tap(() => this.goToAnchor()) + ); this.translators$ = this.apiService.getTranslators$() .pipe( map((translators) => { for (const t in translators) { if (translators[t] === '') { - delete translators[t] + delete translators[t]; } } return translators; - }) + }), + tap(() => this.goToAnchor()) ); this.allContributors$ = this.apiService.getContributor$().pipe( map((contributors) => { @@ -58,20 +64,24 @@ export class AboutComponent implements OnInit { regular: contributors.filter((user) => !user.core_constributor), core: contributors.filter((user) => user.core_constributor), }; - }) + }), + tap(() => this.goToAnchor()) ); } - ngAfterViewInit() { - const that = this; - setTimeout( () => { - if( this.route.snapshot.fragment ) { - if (document.getElementById( this.route.snapshot.fragment )) { - document.getElementById( this.route.snapshot.fragment ).scrollIntoView({behavior: "smooth", block: "center"}); - } + ngAfterViewInit() { + this.goToAnchor(); + } + + goToAnchor() { + setTimeout(() => { + if (this.route.snapshot.fragment) { + if (this.document.getElementById(this.route.snapshot.fragment)) { + this.document.getElementById(this.route.snapshot.fragment).scrollIntoView({behavior: 'smooth'}); } - }, 1 ); - } + } + }, 1); + } sponsor(): void { if (this.officialMempoolSpace && this.stateService.env.BASE_MODULE === 'mempool') { From a54684ad7491c01d98916b91da2e0c8c6c8c059a Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 2 Mar 2023 07:51:30 -0500 Subject: [PATCH 29/47] Add promo video to about page --- .../app/components/about/about.component.html | 23 +++++++++--------- .../app/components/about/about.component.scss | 9 +++++++ frontend/src/resources/mempool-promo.jpg | Bin 0 -> 47149 bytes frontend/sync-assets.js | 10 ++++++-- 4 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 frontend/src/resources/mempool-promo.jpg diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index 03323b6ed..05167f7bb 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -13,17 +13,7 @@

Our mempool and blockchain explorer for the Bitcoin community, focusing on the transaction fee market and multi-layer ecosystem, completely self-hosted without any trusted third-parties.

- +

Enterprise Sponsors 🚀

@@ -383,6 +373,17 @@ - +

Enterprise Sponsors 🚀

diff --git a/frontend/src/app/components/about/about.component.scss b/frontend/src/app/components/about/about.component.scss index d50c09027..694c113f2 100644 --- a/frontend/src/app/components/about/about.component.scss +++ b/frontend/src/app/components/about/about.component.scss @@ -35,7 +35,9 @@ } video { - margin-top: 48px; + width: 640px; + max-width: 90%; + margin-top: 30px; } .social-icons { From bc2d8dd7c3ab912ec886b896e8bb148f5e907862 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 2 Mar 2023 22:42:56 +0900 Subject: [PATCH 31/47] Add mempool promo video (via YouTube) in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cde9b5adb..6e3652a78 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 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) +[![mempool promo video](https://raw.githubusercontent.com/mempool/mempool-promo/master/promo.jpg)](https://youtu.be/hFIF61INmQs) + 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. From 210843916e9c2292680cbbf5837abea47e3434e5 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 2 Mar 2023 22:45:51 +0900 Subject: [PATCH 32/47] Add mempool promo video (via GitHub) in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e3652a78..d2f9f9382 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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) -[![mempool promo video](https://raw.githubusercontent.com/mempool/mempool-promo/master/promo.jpg)](https://youtu.be/hFIF61INmQs) +https://user-images.githubusercontent.com/232186/222445818-234aa6c9-c233-4c52-b3f0-e32b8232893b.mp4 Mempool is the fully-featured mempool visualizer, explorer, and API service running at [mempool.space](https://mempool.space/). From 4f689885e63bc93e7f8e6d04ef468e596a47c184 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 2 Mar 2023 23:02:35 +0900 Subject: [PATCH 33/47] Remove margin from about video --- frontend/src/app/components/about/about.component.scss | 2 +- frontend/sync-assets.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/about/about.component.scss b/frontend/src/app/components/about/about.component.scss index 694c113f2..35df3fc46 100644 --- a/frontend/src/app/components/about/about.component.scss +++ b/frontend/src/app/components/about/about.component.scss @@ -37,7 +37,7 @@ video { width: 640px; max-width: 90%; - margin-top: 30px; + margin-top: 0; } .social-icons { diff --git a/frontend/sync-assets.js b/frontend/sync-assets.js index c1941a771..a39d913c8 100644 --- a/frontend/sync-assets.js +++ b/frontend/sync-assets.js @@ -92,8 +92,9 @@ console.log('Downloading testnet assets'); download(PATH + 'assets-testnet.json', testnetAssetsJsonUrl); console.log('Downloading testnet assets minimal'); download(PATH + 'assets-testnet.minimal.json', testnetAssetsMinimalJsonUrl); -console.log('Downloading promo video'); -if (!fs.existsSync(promoVideo)) +if (!fs.existsSync(promoVideo)) { + console.log('Downloading promo video'); download(promoVideo, promoVideoUrl); +} console.log('Downloading mining pool logos'); downloadMiningPoolLogos(); From 89d9c1d78d354c00da9903f9474e6231e53bf1d4 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 2 Mar 2023 23:38:47 +0900 Subject: [PATCH 34/47] Only show electrum tab on desktop --- frontend/src/app/docs/docs/docs.component.html | 2 +- frontend/src/app/docs/docs/docs.component.scss | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/docs/docs/docs.component.html b/frontend/src/app/docs/docs/docs.component.html index b0c51ad16..cf3bdb070 100644 --- a/frontend/src/app/docs/docs/docs.component.html +++ b/frontend/src/app/docs/docs/docs.component.html @@ -32,7 +32,7 @@ -
  • +