From 54cf5ea75e8b2c91e18490b02dc1d9c3086fde9b Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 25 Mar 2025 23:04:52 +0700 Subject: [PATCH 01/16] Fix database diabled --- backend/src/api/blocks.ts | 4 ++-- backend/src/api/common.ts | 7 +++++++ backend/src/api/websocket-handler.ts | 18 +++++++++++++----- backend/src/index.ts | 4 +++- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 102601594..581850277 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -1391,7 +1391,7 @@ class Blocks { } public async $getBlockAuditSummary(hash: string): Promise { - if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) { + if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) && Common.auditIndexingEnabled()) { return BlocksAuditsRepository.$getBlockAudit(hash); } else { return null; @@ -1399,7 +1399,7 @@ class Blocks { } public async $getBlockTxAuditSummary(hash: string, txid: string): Promise { - if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) { + if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) && Common.auditIndexingEnabled()) { return BlocksAuditsRepository.$getBlockTxAudit(hash, txid); } else { return null; diff --git a/backend/src/api/common.ts b/backend/src/api/common.ts index 50de63afc..f3569c44c 100644 --- a/backend/src/api/common.ts +++ b/backend/src/api/common.ts @@ -722,6 +722,13 @@ export class Common { ); } + static auditIndexingEnabled(): boolean { + return ( + Common.indexingEnabled() && + config.MEMPOOL.AUDIT === true + ); + } + static gogglesIndexingEnabled(): boolean { return ( Common.blocksSummariesIndexingEnabled() && diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts index 390896caa..09e56630a 100644 --- a/backend/src/api/websocket-handler.ts +++ b/backend/src/api/websocket-handler.ts @@ -1011,15 +1011,19 @@ class WebsocketHandler { const blockTransactions = structuredClone(transactions); this.printLogs(); - await statistics.runStatistics(); + if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) { + await statistics.runStatistics(); + } const _memPool = memPool.getMempool(); const candidateTxs = await memPool.getMempoolCandidates(); let candidates: GbtCandidates | undefined = (memPool.limitGBT && candidateTxs) ? { txs: candidateTxs, added: [], removed: [] } : undefined; let transactionIds: string[] = (memPool.limitGBT) ? Object.keys(candidates?.txs || {}) : Object.keys(_memPool); - const accelerations = Object.values(mempool.getAccelerations()); - await accelerationRepository.$indexAccelerationsForBlock(block, accelerations, structuredClone(transactions)); + if (config.DATABASE.ENABLED) { + const accelerations = Object.values(mempool.getAccelerations()); + await accelerationRepository.$indexAccelerationsForBlock(block, accelerations, structuredClone(transactions)); + } const rbfTransactions = Common.findMinedRbfTransactions(transactions, memPool.getSpendMap()); memPool.handleRbfTransactions(rbfTransactions); @@ -1095,7 +1099,9 @@ class WebsocketHandler { if (config.CORE_RPC.DEBUG_LOG_PATH && block.extras) { const firstSeen = getRecentFirstSeen(block.id); if (firstSeen) { - BlocksRepository.$saveFirstSeenTime(block.id, firstSeen); + if (config.DATABASE.ENABLED) { + BlocksRepository.$saveFirstSeenTime(block.id, firstSeen); + } block.extras.firstSeen = firstSeen; } } @@ -1392,7 +1398,9 @@ class WebsocketHandler { }); } - await statistics.runStatistics(); + if (config.STATISTICS.ENABLED && config.DATABASE.ENABLED) { + await statistics.runStatistics(); + } } public handleNewStratumJob(job: StratumJob): void { diff --git a/backend/src/index.ts b/backend/src/index.ts index dc6a8ae1a..1b2204c28 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -153,7 +153,9 @@ class Server { await poolsUpdater.updatePoolsJson(); // Needs to be done before loading the disk cache because we sometimes wipe it await syncAssets.syncAssets$(); - await mempoolBlocks.updatePools$(); + if (config.DATABASE.ENABLED) { + await mempoolBlocks.updatePools$(); + } if (config.MEMPOOL.ENABLED) { if (config.MEMPOOL.CACHE_ENABLED) { await diskCache.$loadMempoolCache(); From 1c9b422db41cea2b095910612b65c55341bc96ee Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 1 Apr 2025 06:42:05 +0000 Subject: [PATCH 02/16] fix pool update retry delay --- backend/src/tasks/pools-updater.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/tasks/pools-updater.ts b/backend/src/tasks/pools-updater.ts index 38e816d74..1d015cb11 100644 --- a/backend/src/tasks/pools-updater.ts +++ b/backend/src/tasks/pools-updater.ts @@ -98,7 +98,8 @@ class PoolsUpdater { logger.info(`Mining pools-v2.json (${githubSha}) import completed`, this.tag); } catch (e) { - this.lastRun = now - 600; // Try again in 10 minutes + // fast-forward lastRun to 10 minutes before the next scheduled update + this.lastRun = now - (config.MEMPOOL.POOLS_UPDATE_DELAY - 600); logger.err(`PoolsUpdater failed. Will try again in 10 minutes. Exception: ${JSON.stringify(e)}`, this.tag); } } From ab5c49ea7a7469b28b14d713a65f11cf4fd5a494 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 1 Apr 2025 07:34:49 +0000 Subject: [PATCH 03/16] Reset block cache after updating pools --- backend/src/api/pools-parser.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backend/src/api/pools-parser.ts b/backend/src/api/pools-parser.ts index 2fd55d6c5..2895da5a5 100644 --- a/backend/src/api/pools-parser.ts +++ b/backend/src/api/pools-parser.ts @@ -8,6 +8,7 @@ import mining from './mining/mining'; import transactionUtils from './transaction-utils'; import BlocksRepository from '../repositories/BlocksRepository'; import redisCache from './redis-cache'; +import blocks from './blocks'; class PoolsParser { miningPools: any[] = []; @@ -42,6 +43,8 @@ class PoolsParser { await this.$insertUnknownPool(); let reindexUnknown = false; + let clearCache = false; + for (const pool of this.miningPools) { if (!pool.id) { @@ -78,17 +81,20 @@ class PoolsParser { logger.debug(`Inserting new mining pool ${pool.name}`); await PoolsRepository.$insertNewMiningPool(pool, slug); reindexUnknown = true; + clearCache = true; } else { if (poolDB.name !== pool.name) { // Pool has been renamed const newSlug = pool.name.replace(/[^a-z0-9]/gi, '').toLowerCase(); logger.warn(`Renaming ${poolDB.name} mining pool to ${pool.name}. Slug has been updated. Maybe you want to make a redirection from 'https://mempool.space/mining/pool/${poolDB.slug}' to 'https://mempool.space/mining/pool/${newSlug}`); await PoolsRepository.$renameMiningPool(poolDB.id, newSlug, pool.name); + clearCache = true; } if (poolDB.link !== pool.link) { // Pool link has changed logger.debug(`Updating link for ${pool.name} mining pool`); await PoolsRepository.$updateMiningPoolLink(poolDB.id, pool.link); + clearCache = true; } if (JSON.stringify(pool.addresses) !== poolDB.addresses || JSON.stringify(pool.regexes) !== poolDB.regexes) { @@ -96,6 +102,7 @@ class PoolsParser { logger.notice(`Updating addresses and/or coinbase tags for ${pool.name} mining pool.`); await PoolsRepository.$updateMiningPoolTags(poolDB.id, pool.addresses, pool.regexes); reindexUnknown = true; + clearCache = true; await this.$reindexBlocksForPool(poolDB.id); } } @@ -111,6 +118,19 @@ class PoolsParser { } await this.$reindexBlocksForPool(unknownPool.id); } + + // refresh the in-memory block cache with the reindexed data + if (clearCache) { + for (const block of blocks.getBlocks()) { + const reindexedBlock = await blocks.$indexBlock(block.height); + if (reindexedBlock.id === block.id) { + block.extras.pool = reindexedBlock.extras.pool; + } + } + // update persistent cache with the reindexed data + diskCache.$saveCacheToDisk(); + redisCache.$updateBlocks(blocks.getBlocks()); + } } public matchBlockMiner(scriptsig: string, addresses: string[], pools: PoolTag[]): PoolTag | undefined { From 9f5c654b52284b9b584e9b1a5af317b125237950 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 1 Apr 2025 11:31:37 +0000 Subject: [PATCH 04/16] clamp min pool update delay --- backend/src/tasks/pools-updater.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/tasks/pools-updater.ts b/backend/src/tasks/pools-updater.ts index 1d015cb11..8a1a779a1 100644 --- a/backend/src/tasks/pools-updater.ts +++ b/backend/src/tasks/pools-updater.ts @@ -99,7 +99,7 @@ class PoolsUpdater { } catch (e) { // fast-forward lastRun to 10 minutes before the next scheduled update - this.lastRun = now - (config.MEMPOOL.POOLS_UPDATE_DELAY - 600); + this.lastRun = now - Math.max(config.MEMPOOL.POOLS_UPDATE_DELAY - 600, 600); logger.err(`PoolsUpdater failed. Will try again in 10 minutes. Exception: ${JSON.stringify(e)}`, this.tag); } } From f0224b0bf02ca536d2fba2f90fe45d225c290bf7 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Wed, 2 Apr 2025 13:42:25 +0900 Subject: [PATCH 05/16] Bump node version to v22 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/e2e_parameterized.yml | 2 +- .nvmrc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 864151951..842fe56f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: if: "(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')) || github.event_name == 'push'" strategy: matrix: - node: ["20", "21"] + node: ["22"] flavor: ["dev", "prod"] fail-fast: false runs-on: ubuntu-latest @@ -266,7 +266,7 @@ jobs: - name: Setup node uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 22 cache: "npm" cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json diff --git a/.github/workflows/e2e_parameterized.yml b/.github/workflows/e2e_parameterized.yml index da1814b84..a53677a80 100644 --- a/.github/workflows/e2e_parameterized.yml +++ b/.github/workflows/e2e_parameterized.yml @@ -151,7 +151,7 @@ jobs: - name: Setup node uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 22 cache: "npm" cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json diff --git a/.nvmrc b/.nvmrc index a9b234d51..53d1c14db 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.8.0 +v22 From f41c9a0e57707cbc95f6eada02568e235f435979 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Wed, 2 Apr 2025 15:45:21 +0900 Subject: [PATCH 06/16] Update missing node matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 842fe56f0..68ffa840a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -163,7 +163,7 @@ jobs: if: "(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')) || github.event_name == 'push'" strategy: matrix: - node: ["20", "21"] + node: ["22"] flavor: ["dev", "prod"] fail-fast: false runs-on: ubuntu-latest From 05e407ff0f185d475cda545fa3c32af1de0f1d54 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Wed, 2 Apr 2025 19:26:46 +0900 Subject: [PATCH 07/16] Add a test for the RBF page updates --- frontend/cypress/e2e/mainnet/mainnet.spec.ts | 37 ++++++++++ .../cypress/fixtures/rbf_page/rbf_01.json | 37 ++++++++++ .../cypress/fixtures/rbf_page/rbf_02.json | 68 +++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 frontend/cypress/fixtures/rbf_page/rbf_01.json create mode 100644 frontend/cypress/fixtures/rbf_page/rbf_02.json diff --git a/frontend/cypress/e2e/mainnet/mainnet.spec.ts b/frontend/cypress/e2e/mainnet/mainnet.spec.ts index 0d3b0a72b..a664f333c 100644 --- a/frontend/cypress/e2e/mainnet/mainnet.spec.ts +++ b/frontend/cypress/e2e/mainnet/mainnet.spec.ts @@ -561,6 +561,43 @@ describe('Mainnet', () => { }); describe('RBF transactions', () => { + it('RBF page gets updated over websockets', () => { + cy.intercept('/api/v1/replacements', { + statusCode: 200, + body: [] + }); + + cy.intercept('/api/v1/fullrbf/replacements', { + statusCode: 200, + body: [] + }); + + cy.mockMempoolSocketV2(); + + cy.visit('/rbf'); + cy.get('.no-replacements'); + cy.get('.tree').should('have.length', 0); + + receiveWebSocketMessageFromServer({ + params: { + file: { + path: 'rbf_page/rbf_01.json' + } + } + }); + + cy.get('.tree').should('have.length', 1); + + receiveWebSocketMessageFromServer({ + params: { + file: { + path: 'rbf_page/rbf_02.json' + } + } + }); + cy.get('.tree').should('have.length', 2); + }); + it('shows RBF transactions properly (mobile - details)', () => { cy.intercept('/api/v1/tx/21518a98d1aa9df524865d2f88c578499f524eb1d0c4d3e70312ab863508692f/cached', { fixture: 'mainnet_tx_cached.json' diff --git a/frontend/cypress/fixtures/rbf_page/rbf_01.json b/frontend/cypress/fixtures/rbf_page/rbf_01.json new file mode 100644 index 000000000..2c79f142a --- /dev/null +++ b/frontend/cypress/fixtures/rbf_page/rbf_01.json @@ -0,0 +1,37 @@ +{ + "rbfLatest": [ + { + "tx": { + "txid": "f4bae4f626036250fd00d68490e572f65f66417452003a0f4c4d76f17a9fde68", + "fee": 1185, + "vsize": 223, + "value": 41729, + "rate": 5.313901345291479, + "time": 1743587177, + "rbf": true, + "fullRbf": false, + "mined": true + }, + "time": 1743587177, + "fullRbf": true, + "replaces": [ + { + "tx": { + "txid": "12945412dfc455e0ed6049dc2ee8737756c8d9e2d9a2eb26f366cd5019a0369f", + "fee": 504, + "vsize": 222, + "value": 42410, + "rate": 2.27027027027027, + "time": 1743586081, + "rbf": true + }, + "time": 1743586081, + "interval": 1096, + "fullRbf": false, + "replaces": [] + } + ], + "mined": true + } + ] +} \ No newline at end of file diff --git a/frontend/cypress/fixtures/rbf_page/rbf_02.json b/frontend/cypress/fixtures/rbf_page/rbf_02.json new file mode 100644 index 000000000..3b5011002 --- /dev/null +++ b/frontend/cypress/fixtures/rbf_page/rbf_02.json @@ -0,0 +1,68 @@ +{ + "rbfLatest": [ + { + "tx": { + "txid": "d313b479acfbae719afb488a078e0fe0e052a67b9f65f73f7c75d3d95fd36acc", + "fee": 672, + "vsize": 167.25, + "value": 29996328, + "rate": 4.017937219730942, + "time": 1743587365, + "rbf": true, + "fullRbf": false + }, + "time": 1743587365, + "fullRbf": false, + "replaces": [ + { + "tx": { + "txid": "eb5aa786cabda307cc9642cfb9c41a3b405ac20a391eefbe54be7930bea61865", + "fee": 336, + "vsize": 167.5, + "value": 29996664, + "rate": 2.005970149253731, + "time": 1743586424, + "rbf": true + }, + "time": 1743586424, + "interval": 941, + "fullRbf": false, + "replaces": [] + } + ] + }, + { + "tx": { + "txid": "f4bae4f626036250fd00d68490e572f65f66417452003a0f4c4d76f17a9fde68", + "fee": 1185, + "vsize": 223, + "value": 41729, + "rate": 5.313901345291479, + "time": 1743587177, + "rbf": true, + "fullRbf": false, + "mined": true + }, + "time": 1743587177, + "fullRbf": true, + "replaces": [ + { + "tx": { + "txid": "12945412dfc455e0ed6049dc2ee8737756c8d9e2d9a2eb26f366cd5019a0369f", + "fee": 504, + "vsize": 222, + "value": 42410, + "rate": 2.27027027027027, + "time": 1743586081, + "rbf": true + }, + "time": 1743586081, + "interval": 1096, + "fullRbf": false, + "replaces": [] + } + ], + "mined": true + } + ] +} \ No newline at end of file From 1790c83babd9b3d4d643dc5d4bd3274767b77c71 Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 2 Apr 2025 20:08:09 +0900 Subject: [PATCH 08/16] ops: Bump NodeJS to v22 for install and start scripts --- production/README.md | 4 ++-- production/install | 6 +++--- production/mempool-start-all | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/production/README.md b/production/README.md index 2805cde81..bf281fb1b 100644 --- a/production/README.md +++ b/production/README.md @@ -84,11 +84,11 @@ pkg install -y zsh sudo git screen curl wget neovim rsync nginx openssl openssh- ### Node.js + npm -Build Node.js v20.17.0 and npm v9 from source using `nvm`: +Build Node.js v22.14.0 and npm v9 from source using `nvm`: ``` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | zsh source $HOME/.zshrc -nvm install v20.17.0 --shared-zlib +nvm install v22.14.0 --shared-zlib nvm alias default node ``` diff --git a/production/install b/production/install index f3bebb4e7..95b38369b 100755 --- a/production/install +++ b/production/install @@ -1116,8 +1116,8 @@ echo "[*] Installing nvm.sh from GitHub" osSudo "${MEMPOOL_USER}" sh -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | zsh' echo "[*] Building NodeJS via nvm.sh" -osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm install v20.12.0 --shared-zlib' -osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm alias default 20.12.0' +osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm install v22.14.0 --shared-zlib' +osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm alias default 22.14.0' #################### # Tor installation # @@ -1565,7 +1565,7 @@ EOF osSudo "${UNFURL_USER}" sh -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | zsh' echo "[*] Building NodeJS via nvm.sh" - osSudo "${UNFURL_USER}" zsh -c 'source ~/.zshrc ; nvm install v20.12.0 --shared-zlib' + osSudo "${UNFURL_USER}" zsh -c 'source ~/.zshrc ; nvm install v22.14.0 --shared-zlib' ;; esac diff --git a/production/mempool-start-all b/production/mempool-start-all index 9d4c6ee58..f6c3c76c2 100755 --- a/production/mempool-start-all +++ b/production/mempool-start-all @@ -1,7 +1,7 @@ #!/usr/bin/env zsh export NVM_DIR="$HOME/.nvm" source "$NVM_DIR/nvm.sh" -nvm use v20.12.0 +nvm use v22.14.0 # start all mempool backends that exist for site in mainnet mainnet-lightning testnet testnet-lightning testnet4 signet signet-lightning liquid liquidtestnet;do From 1baae6474be831ab783cbf82699120bf84927700 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 3 Apr 2025 19:19:55 +0900 Subject: [PATCH 09/16] ops: Bump elements to v23.2.7 --- production/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/install b/production/install index 95b38369b..aadb8005e 100755 --- a/production/install +++ b/production/install @@ -378,7 +378,7 @@ ELEMENTS_REPO_URL=https://github.com/ElementsProject/elements ELEMENTS_REPO_NAME=elements ELEMENTS_REPO_BRANCH=master #ELEMENTS_LATEST_RELEASE=$(curl -s https://api.github.com/repos/ElementsProject/elements/releases/latest|grep tag_name|head -1|cut -d '"' -f4) -ELEMENTS_LATEST_RELEASE=elements-23.2.6 +ELEMENTS_LATEST_RELEASE=elements-23.2.7 echo -n '.' BITCOIN_ELECTRS_REPO_URL=https://github.com/mempool/electrs From d3d7829fee3a456863c17a2b33c835f228cac310 Mon Sep 17 00:00:00 2001 From: natsoni Date: Thu, 3 Apr 2025 18:00:45 +0200 Subject: [PATCH 10/16] FIx pool page CSS --- .../app/components/pool/pool.component.scss | 117 +++++++++--------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/frontend/src/app/components/pool/pool.component.scss b/frontend/src/app/components/pool/pool.component.scss index 26e6008b6..f09ac0d65 100644 --- a/frontend/src/app/components/pool/pool.component.scss +++ b/frontend/src/app/components/pool/pool.component.scss @@ -84,74 +84,79 @@ div.scrollable { text-align: right; } } +} - .progress { - background-color: var(--secondary); +.progress { + background-color: var(--secondary); +} + +.coinbase { + width: 20%; + @media (max-width: 875px) { + display: none; } +} - .coinbase { - width: 20%; - @media (max-width: 875px) { - display: none; - } +.health { + @media (max-width: 1150px) { + display: none; } +} - .height { - width: 10%; +.height { + width: 10%; +} + +.timestamp { + @media (max-width: 875px) { + padding-left: 50px; } - - .timestamp { - @media (max-width: 875px) { - padding-left: 50px; - } - @media (max-width: 685px) { - display: none; - } + @media (max-width: 625px) { + display: none; } +} - .mined { - width: 13%; - @media (max-width: 1100px) { - display: none; - } +.mined { + width: 13%; +} + +.txs { + @media (max-width: 938px) { + display: none; } - - .txs { - padding-right: 40px; - @media (max-width: 1100px) { - padding-right: 10px; - } - @media (max-width: 875px) { - padding-right: 20px; - } - @media (max-width: 567px) { - padding-right: 10px; - } + padding-right: 40px; + @media (max-width: 1100px) { + padding-right: 10px; } - - .size { - width: 12%; - @media (max-width: 1000px) { - width: 15%; - } - @media (max-width: 875px) { - width: 20%; - } - @media (max-width: 650px) { - width: 20%; - } - @media (max-width: 450px) { - display: none; - } + @media (max-width: 875px) { + padding-right: 20px; } + @media (max-width: 567px) { + padding-right: 10px; + } +} - .scriptmessage { - overflow: hidden; - display: inline-block; - text-overflow: ellipsis; - vertical-align: middle; - width: auto; - text-align: left; +.size { + min-width: 80px; + width: 12%; + @media (max-width: 1000px) { + width: 15%; + } +} + +.scriptmessage { + max-width: 340px; + overflow: hidden; + display: inline-block; + text-overflow: ellipsis; + vertical-align: middle; + width: auto; + text-align: left; +} + +.reward { + @media (max-width: 1035px) { + display: none; } } From 22af7de5bd8ae2affd096fed97d644eac930fbc3 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sat, 5 Apr 2025 20:03:14 +0900 Subject: [PATCH 11/16] Bump package.json versions ahead of the official release --- backend/package-lock.json | 4 ++-- backend/package.json | 4 ++-- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- unfurler/package-lock.json | 4 ++-- unfurler/package.json | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index a4963d6f0..7138c59e1 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "mempool-backend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mempool-backend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "hasInstallScript": true, "license": "GNU Affero General Public License v3.0", "dependencies": { diff --git a/backend/package.json b/backend/package.json index bcbc0f256..f039ccad2 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "mempool-backend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "description": "Bitcoin mempool visualizer and blockchain explorer backend", "license": "GNU Affero General Public License v3.0", "homepage": "https://mempool.space", @@ -68,4 +68,4 @@ "ts-jest": "^29.1.1", "ts-node": "^10.9.1" } -} +} \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 932979e2b..148c08751 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "mempool-frontend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mempool-frontend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "license": "GNU Affero General Public License v3.0", "dependencies": { "@angular-devkit/build-angular": "^17.3.1", diff --git a/frontend/package.json b/frontend/package.json index 8d4ee6e27..a8abf1d4b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "mempool-frontend", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "description": "Bitcoin mempool visualizer and blockchain explorer backend", "license": "GNU Affero General Public License v3.0", "homepage": "https://mempool.space", diff --git a/unfurler/package-lock.json b/unfurler/package-lock.json index 799148486..8f8373a36 100644 --- a/unfurler/package-lock.json +++ b/unfurler/package-lock.json @@ -1,12 +1,12 @@ { "name": "mempool-unfurl", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mempool-unfurl", - "version": "3.0.0", + "version": "3.2.0-dev", "dependencies": { "@types/node": "^16.11.41", "ejs": "^3.1.10", diff --git a/unfurler/package.json b/unfurler/package.json index bf3dad55b..968334f22 100644 --- a/unfurler/package.json +++ b/unfurler/package.json @@ -1,6 +1,6 @@ { "name": "mempool-unfurl", - "version": "3.1.0-dev", + "version": "3.2.0-dev", "description": "Renderer for mempool open graph link preview images", "repository": { "type": "git", @@ -32,4 +32,4 @@ "eslint-config-prettier": "^8.5.0", "prettier": "^2.7.1" } -} +} \ No newline at end of file From 05d2aa73f85e7c9994f88a873a8cc912bc11c4f8 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sun, 6 Apr 2025 06:55:27 +0000 Subject: [PATCH 12/16] pump up monitoring frequency --- backend/src/api/bitcoin/esplora-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/bitcoin/esplora-api.ts b/backend/src/api/bitcoin/esplora-api.ts index 8035d92c0..30a6822d5 100644 --- a/backend/src/api/bitcoin/esplora-api.ts +++ b/backend/src/api/bitcoin/esplora-api.ts @@ -36,7 +36,7 @@ class FailoverRouter { maxHeight: number = 0; hosts: FailoverHost[]; multihost: boolean; - gitHashInterval: number = 600000; // 10 minutes + gitHashInterval: number = 60000; // 1 minute pollInterval: number = 60000; // 1 minute pollTimer: NodeJS.Timeout | null = null; pollConnection = axios.create(); From b73f93e1cde277c6c7d3f87af880fe61251bac1f Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 6 Apr 2025 17:51:14 +0900 Subject: [PATCH 13/16] ops: Use gcc to build NodeJS v22 on FreeBSD 14 --- production/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/production/install b/production/install index aadb8005e..f4b2c10ed 100755 --- a/production/install +++ b/production/install @@ -1113,10 +1113,10 @@ echo "[*] Installing Mempool crontab" osSudo "${ROOT_USER}" crontab -u "${MEMPOOL_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/mempool.crontab" echo "[*] Installing nvm.sh from GitHub" -osSudo "${MEMPOOL_USER}" sh -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | zsh' +osSudo "${MEMPOOL_USER}" sh -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | zsh' echo "[*] Building NodeJS via nvm.sh" -osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm install v22.14.0 --shared-zlib' +osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; CC=gcc CXX=g++ nvm install v22.14.0 --shared-zlib' osSudo "${MEMPOOL_USER}" zsh -c 'source ~/.zshrc ; nvm alias default 22.14.0' #################### From 849eebe5837ab8d8018c7ca0f2db704f740329e4 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sun, 6 Apr 2025 08:53:35 +0000 Subject: [PATCH 14/16] Fix axios unix sockets --- backend/src/api/bitcoin/esplora-api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api/bitcoin/esplora-api.ts b/backend/src/api/bitcoin/esplora-api.ts index 30a6822d5..6ee51fda4 100644 --- a/backend/src/api/bitcoin/esplora-api.ts +++ b/backend/src/api/bitcoin/esplora-api.ts @@ -111,7 +111,7 @@ class FailoverRouter { for (const host of this.hosts) { try { const result = await (host.socket - ? this.pollConnection.get('/blocks/tip/height', { socketPath: host.host, timeout: config.ESPLORA.FALLBACK_TIMEOUT }) + ? this.pollConnection.get('http://api/blocks/tip/height', { socketPath: host.host, timeout: config.ESPLORA.FALLBACK_TIMEOUT }) : this.pollConnection.get(host.host + '/blocks/tip/height', { timeout: config.ESPLORA.FALLBACK_TIMEOUT }) ); if (result) { @@ -288,7 +288,7 @@ class FailoverRouter { let url; if (host.socket) { axiosConfig = { socketPath: host.host, timeout: config.ESPLORA.REQUEST_TIMEOUT, responseType }; - url = path; + url = 'http://api' + path; } else { axiosConfig = { timeout: config.ESPLORA.REQUEST_TIMEOUT, responseType }; url = host.host + path; From 3df953c0a8c478951d859acaba7fbcb7c10c0653 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 6 Apr 2025 18:02:22 +0900 Subject: [PATCH 15/16] Pin GitHub actions to node 22.14.0 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/e2e_parameterized.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ffa840a..976fe5a7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: if: "(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')) || github.event_name == 'push'" strategy: matrix: - node: ["22"] + node: ["22.14.0"] flavor: ["dev", "prod"] fail-fast: false runs-on: ubuntu-latest @@ -163,7 +163,7 @@ jobs: if: "(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')) || github.event_name == 'push'" strategy: matrix: - node: ["22"] + node: ["22.14.0"] flavor: ["dev", "prod"] fail-fast: false runs-on: ubuntu-latest diff --git a/.github/workflows/e2e_parameterized.yml b/.github/workflows/e2e_parameterized.yml index a53677a80..8b07ffe82 100644 --- a/.github/workflows/e2e_parameterized.yml +++ b/.github/workflows/e2e_parameterized.yml @@ -43,7 +43,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 22.14.0 registry-url: "https://registry.npmjs.org" - name: Install (Prod dependencies only) @@ -151,7 +151,7 @@ jobs: - name: Setup node uses: actions/setup-node@v3 with: - node-version: 22 + node-version: 22.14.0 cache: "npm" cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json From 84c9a01b6df64d7b78faca98448e078ec882c4b6 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 6 Apr 2025 18:03:03 +0900 Subject: [PATCH 16/16] Pin Node versions to 22.14.0 on the Docker images --- docker/backend/Dockerfile | 4 ++-- docker/frontend/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index e56b07da3..942a8f9c8 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /build RUN apt-get update && \ apt-get install -y curl ca-certificates && \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ - apt-get install -y nodejs build-essential python3 pkg-config && \ + apt-get install -y nodejs=22.14.0-1nodesource1 build-essential python3 pkg-config && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -29,7 +29,7 @@ FROM rust:1.84-bookworm AS runtime RUN apt-get update && \ apt-get install -y curl ca-certificates && \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ - apt-get install -y nodejs && \ + apt-get install -y nodejs=22.14.0-1nodesource1 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 8d97c9dc6..23c1da3d4 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-bookworm-slim AS builder +FROM node:22.14.0-bookworm-slim AS builder ARG commitHash ENV DOCKER_COMMIT_HASH=${commitHash}