From 8dda51a92a5140b6a585e10d49ea3faf27107b10 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 7 Jul 2022 19:33:43 +0200 Subject: [PATCH 1/4] Remove unused deps from backend/package-lock.json --- backend/package-lock.json | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index 30e8b4290..494aa7cf2 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -33,32 +33,6 @@ "prettier": "^2.7.1" } }, - "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, - "node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", From 4345661a0b2c06d549af47f9afc6db5412897340 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:30:31 +0000 Subject: [PATCH 2/4] Translate /frontend/src/locale/messages.xlf in nb review completed for the source file '/frontend/src/locale/messages.xlf' on the 'nb' language. --- frontend/src/locale/messages.nb.xlf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/locale/messages.nb.xlf b/frontend/src/locale/messages.nb.xlf index 75a0afbf5..ea3d6338f 100644 --- a/frontend/src/locale/messages.nb.xlf +++ b/frontend/src/locale/messages.nb.xlf @@ -1993,6 +1993,7 @@ At block: + I blokk: src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 188 @@ -2016,6 +2017,7 @@ Around block: + Rundt blokk: src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 190 @@ -2240,6 +2242,7 @@ Block Prediction Accuracy + Blokkprediksjonsnøyaktighet src/app/components/block-prediction-graph/block-prediction-graph.component.html 5,7 @@ -2256,6 +2259,7 @@ Match rate + Samsvarsfrekvens src/app/components/block-prediction-graph/block-prediction-graph.component.ts 176,174 @@ -2873,6 +2877,7 @@ Usually places your transaction in between the second and third mempool blocks + Plasserer vanligvis transaksjonen din mellom andre og tredje mempool-blokken src/app/components/fees-box/fees-box.component.html 8,9 @@ -2894,6 +2899,7 @@ Usually places your transaction in between the first and second mempool blocks + Plasserer vanligvis transaksjonen mellom den første og andre mempool-blokken src/app/components/fees-box/fees-box.component.html 9,10 @@ -3078,6 +3084,7 @@ Hashrate (MA) + Hashrate (MA) src/app/components/hashrate-chart/hashrate-chart.component.ts 288,287 @@ -3250,6 +3257,7 @@ Pools luck (1 week) + Pools-flaks (1 uke) src/app/components/pool-ranking/pool-ranking.component.html 9 @@ -3258,6 +3266,7 @@ Pools luck + Pools-flaks src/app/components/pool-ranking/pool-ranking.component.html 9,11 @@ -3266,6 +3275,7 @@ The overall luck of all mining pools over the past week. A luck bigger than 100% means the average block time for the current epoch is less than 10 minutes. + Den generelle flaksen til alle utvinningspools den siste uken. En flaks større enn 100 % betyr at den gjennomsnittlige blokktiden for gjeldende epoke er mindre enn 10 minutter. src/app/components/pool-ranking/pool-ranking.component.html 11,15 @@ -3274,6 +3284,7 @@ Pools count (1w) + Antall pools (1uke) src/app/components/pool-ranking/pool-ranking.component.html 17 @@ -3282,6 +3293,7 @@ Pools count + Antall pools src/app/components/pool-ranking/pool-ranking.component.html 17,19 @@ -3290,6 +3302,7 @@ How many unique pools found at least one block over the past week. + Antall unike pools som har funnet minst én blokk i løpet av den siste uken. src/app/components/pool-ranking/pool-ranking.component.html 19,23 @@ -3315,6 +3328,7 @@ The number of blocks found over the past week. + Antall blokker funnet den siste uken. src/app/components/pool-ranking/pool-ranking.component.html 27,31 @@ -4471,6 +4485,7 @@ REST API service + REST API-tjeneste src/app/docs/api-docs/api-docs.component.html 34,35 From 50cd8c80d89c3ead43d128fe862060fa719913fd Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:55:27 +0000 Subject: [PATCH 3/4] Translate /frontend/src/locale/messages.xlf in fr review completed for the source file '/frontend/src/locale/messages.xlf' on the 'fr' language. --- frontend/src/locale/messages.fr.xlf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/locale/messages.fr.xlf b/frontend/src/locale/messages.fr.xlf index 101dffc51..305d95eb3 100644 --- a/frontend/src/locale/messages.fr.xlf +++ b/frontend/src/locale/messages.fr.xlf @@ -1993,6 +1993,7 @@ At block: + Au bloc : src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 188 @@ -2016,6 +2017,7 @@ Around block: + Autour du bloc : src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts 190 @@ -2240,6 +2242,7 @@ Block Prediction Accuracy + Précision de prédiction de bloc src/app/components/block-prediction-graph/block-prediction-graph.component.html 5,7 @@ -2256,6 +2259,7 @@ Match rate + Taux de réussite src/app/components/block-prediction-graph/block-prediction-graph.component.ts 176,174 @@ -2873,6 +2877,7 @@ Usually places your transaction in between the second and third mempool blocks + Place généralement votre transaction entre les deuxième et troisième blocs mempool src/app/components/fees-box/fees-box.component.html 8,9 @@ -2894,6 +2899,7 @@ Usually places your transaction in between the first and second mempool blocks + Place généralement votre transaction entre les premier et deuxième blocs mempool src/app/components/fees-box/fees-box.component.html 9,10 @@ -3078,6 +3084,7 @@ Hashrate (MA) + Taux de hachage (moy) src/app/components/hashrate-chart/hashrate-chart.component.ts 288,287 @@ -3250,6 +3257,7 @@ Pools luck (1 week) + Chance des pools (1 semaine) src/app/components/pool-ranking/pool-ranking.component.html 9 @@ -3258,6 +3266,7 @@ Pools luck + Chance des pools src/app/components/pool-ranking/pool-ranking.component.html 9,11 @@ -3266,6 +3275,7 @@ The overall luck of all mining pools over the past week. A luck bigger than 100% means the average block time for the current epoch is less than 10 minutes. + La chance globale des pools de minage au cours de la semaine dernière. Une chance supérieure à 100% signifie que le temps moyen entre chaque bloc pour l'époque actuelle est inférieur à 10 minutes. src/app/components/pool-ranking/pool-ranking.component.html 11,15 @@ -3274,6 +3284,7 @@ Pools count (1w) + Pools de minage (1w) src/app/components/pool-ranking/pool-ranking.component.html 17 @@ -3282,6 +3293,7 @@ Pools count + Pools de minage src/app/components/pool-ranking/pool-ranking.component.html 17,19 @@ -3290,6 +3302,7 @@ How many unique pools found at least one block over the past week. + Combien de pools ont trouvé au moins un bloc au cours de la semaine dernière. src/app/components/pool-ranking/pool-ranking.component.html 19,23 @@ -3315,6 +3328,7 @@ The number of blocks found over the past week. + Le nombre de blocs trouvés au cours de la semaine dernière. src/app/components/pool-ranking/pool-ranking.component.html 27,31 @@ -4471,6 +4485,7 @@ REST API service + Service d'API REST src/app/docs/api-docs/api-docs.component.html 34,35 From 5943b88ffee79cd7e362d67ba08729c2b9a8b1f7 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 7 Jul 2022 21:55:28 +0200 Subject: [PATCH 4/4] [Hashrate indexing] - Signet started in 2020 and not in 2009 --- backend/src/api/mining.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/api/mining.ts b/backend/src/api/mining.ts index e9fe6bae7..d2504274c 100644 --- a/backend/src/api/mining.ts +++ b/backend/src/api/mining.ts @@ -298,7 +298,7 @@ class Mining { try { const indexedTimestamp = (await HashratesRepository.$getNetworkDailyHashrate(null)).map(hashrate => hashrate.timestamp); - const genesisTimestamp = 1231006505000; // bitcoin-cli getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f + const genesisTimestamp = (config.MEMPOOL.NETWORK === 'signet') ? 1598918400000 : 1231006505000; // bitcoin-cli getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f const lastMidnight = this.getDateMidnight(new Date()); let toTimestamp = Math.round(lastMidnight.getTime()); const hashrates: any[] = []; @@ -368,8 +368,8 @@ class Mining { ++totalIndexed; } - // Add genesis block manually - if (toTimestamp <= genesisTimestamp && !indexedTimestamp.includes(genesisTimestamp)) { + // Add genesis block manually on mainnet and testnet + if ('signet' !== config.MEMPOOL.NETWORK && toTimestamp <= genesisTimestamp && !indexedTimestamp.includes(genesisTimestamp)) { hashrates.push({ hashrateTimestamp: genesisTimestamp / 1000, avgHashrate: await bitcoinClient.getNetworkHashPs(1, 1), @@ -409,11 +409,11 @@ class Mining { let currentDifficulty = 0; let totalIndexed = 0; - if (indexedHeights[0] === false) { + if (indexedHeights[0] !== true) { await DifficultyAdjustmentsRepository.$saveAdjustments({ - time: 1231006505, + time: (config.MEMPOOL.NETWORK === 'signet') ? 1598918400 : 1231006505, height: 0, - difficulty: 1.0, + difficulty: (config.MEMPOOL.NETWORK === 'signet') ? 0.001126515290698186 : 1.0, adjustment: 0.0, }); }