From 587952a7b340fd1b89479ca2d16b9a096236c214 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 4 Sep 2024 21:51:10 +0300 Subject: [PATCH 01/15] chore(dashmate): update Core to 21.2 nightly --- packages/dashmate/configs/defaults/getBaseConfigFactory.js | 2 +- .../dashmate/configs/getConfigFileMigrationsFactory.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index 3d689e1b78..d0e77e22ec 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -54,7 +54,7 @@ export default function getBaseConfigFactory(homeDir) { port: 3001, }, docker: { - image: 'dashpay/dashd:21', + image: 'dashpay/dashd:21.2.0-nightly.2024.09.0', commandArgs: [], }, p2p: { diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 5e7763009c..670405c7dd 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -853,6 +853,13 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) }); return configFile; }, + '1.3.0-dev.1': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + options.core.docker.image = 'dashpay/dashd:21.2.0-nightly.2024.09.0'; + }); + return configFile; + }, }; } From 36f493162f5349dc72a9c226615ee9b9462a360f Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 5 Sep 2024 15:19:46 +0300 Subject: [PATCH 02/15] fix: incorrect dashd tag --- packages/dashmate/configs/defaults/getBaseConfigFactory.js | 2 +- packages/dashmate/configs/getConfigFileMigrationsFactory.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index d0e77e22ec..0afdde2144 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -54,7 +54,7 @@ export default function getBaseConfigFactory(homeDir) { port: 3001, }, docker: { - image: 'dashpay/dashd:21.2.0-nightly.2024.09.0', + image: 'dashpay/dashd:21.2.0-nightly.2024.09.04', commandArgs: [], }, p2p: { diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 670405c7dd..da34e47ff9 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -856,7 +856,7 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) '1.3.0-dev.1': (configFile) => { Object.entries(configFile.configs) .forEach(([, options]) => { - options.core.docker.image = 'dashpay/dashd:21.2.0-nightly.2024.09.0'; + options.core.docker.image = 'dashpay/dashd:21.2.0-nightly.2024.09.04'; }); return configFile; }, From 43759fb9b206468cc8c13ee2a83c7612cb4d3d32 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 16 Sep 2024 13:42:43 +0300 Subject: [PATCH 03/15] chore: update Core only for testnet/local/devnet --- .../dashmate/configs/defaults/getBaseConfigFactory.js | 2 +- .../dashmate/configs/defaults/getLocalConfigFactory.js | 3 +++ .../configs/defaults/getTestnetConfigFactory.js | 3 +++ .../dashmate/configs/getConfigFileMigrationsFactory.js | 10 ++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index 0afdde2144..3d689e1b78 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -54,7 +54,7 @@ export default function getBaseConfigFactory(homeDir) { port: 3001, }, docker: { - image: 'dashpay/dashd:21.2.0-nightly.2024.09.04', + image: 'dashpay/dashd:21', commandArgs: [], }, p2p: { diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index 42254deb5d..52d00a6c2a 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -24,6 +24,9 @@ export default function getLocalConfigFactory(getBaseConfig) { }, }, core: { + docker: { + image: 'dashpay/dashd:21.2.0-nightly.2024.09.12', + }, p2p: { port: 20001, }, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index a818991202..e57e6c50b4 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -24,6 +24,9 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { }, }, core: { + docker: { + image: 'dashpay/dashd:21.2.0-nightly.2024.09.12', + }, p2p: { port: 19999, }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index a3bcf67897..6c7700835e 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -4,6 +4,7 @@ import lodash from 'lodash'; import path from 'path'; import { + NETWORK_DEVNET, NETWORK_LOCAL, NETWORK_MAINNET, NETWORK_TESTNET, @@ -861,6 +862,15 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) }); return configFile; }, + '1.3.0-dev.3': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + if ([NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_DEVNET].includes(options.network)) { + options.core.docker.image = 'dashpay/dashd:21.2.0-nightly.2024.09.12'; + } + }); + return configFile; + }, }; } From 4ff7a80518acc639c5d3c762b0857dc3af0310d9 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 29 Oct 2024 12:41:02 +0700 Subject: [PATCH 04/15] chore: update the image to recent nightly --- packages/dashmate/configs/defaults/getLocalConfigFactory.js | 2 +- packages/dashmate/configs/defaults/getTestnetConfigFactory.js | 2 +- packages/dashmate/configs/getConfigFileMigrationsFactory.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index 52d00a6c2a..9e1a6c6429 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -25,7 +25,7 @@ export default function getLocalConfigFactory(getBaseConfig) { }, core: { docker: { - image: 'dashpay/dashd:21.2.0-nightly.2024.09.12', + image: 'dashpay/dashd:22.0.0-nightly.2024.10.29', }, p2p: { port: 20001, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index e57e6c50b4..1d50db5619 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -25,7 +25,7 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { }, core: { docker: { - image: 'dashpay/dashd:21.2.0-nightly.2024.09.12', + image: 'dashpay/dashd:22.0.0-nightly.2024.10.29', }, p2p: { port: 19999, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 6c7700835e..d6bf874295 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -866,7 +866,7 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) Object.entries(configFile.configs) .forEach(([, options]) => { if ([NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_DEVNET].includes(options.network)) { - options.core.docker.image = 'dashpay/dashd:21.2.0-nightly.2024.09.12'; + options.core.docker.image = 'dashpay/dashd:22.0.0-nightly.2024.10.29'; } }); return configFile; From 80df04d0c287afc49234e7c91c838e6c300f52fa Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 29 Oct 2024 13:35:36 +0700 Subject: [PATCH 05/15] fix: wrong migration version --- .../dashmate/configs/getConfigFileMigrationsFactory.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 51c8834625..ce45406b25 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1030,12 +1030,7 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) if (options.network === NETWORK_TESTNET && name !== 'base') { options.platform.drive.tenderdash.p2p.seeds = testnet.get('platform.drive.tenderdash.p2p.seeds'); } - }); - return configFile; - }, - '1.3.0-dev.3': (configFile) => { - Object.entries(configFile.configs) - .forEach(([, options]) => { + if ([NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_DEVNET].includes(options.network)) { options.core.docker.image = 'dashpay/dashd:22.0.0-nightly.2024.10.29'; } From 176d00934cc113931420a2550a7c07be6c140e7d Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 29 Oct 2024 13:59:41 +0700 Subject: [PATCH 06/15] chore: remove `deprecatedrpc=hpmn` --- packages/dashmate/templates/core/dash.conf.dot | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dashmate/templates/core/dash.conf.dot b/packages/dashmate/templates/core/dash.conf.dot index cbc0b93373..a51b604b06 100644 --- a/packages/dashmate/templates/core/dash.conf.dot +++ b/packages/dashmate/templates/core/dash.conf.dot @@ -31,7 +31,6 @@ debuglogfile=/var/log/dash/debug.log # JSON RPC server=1 rpcwallet=main -deprecatedrpc=hpmn rpcworkqueue=64 rpcthreads=16 rpcwhitelistdefault=0 From d6f2d3b0758ef1e898bdf8161c824220744d8a92 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 29 Oct 2024 22:59:12 +0700 Subject: [PATCH 07/15] pref(dashmate): simplify local network setup process --- .../setup/local/configureCoreTaskFactory.js | 213 +++--------------- 1 file changed, 33 insertions(+), 180 deletions(-) diff --git a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js index d059e9c860..920038d877 100644 --- a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js @@ -93,9 +93,40 @@ export default function configureCoreTaskFactory( }, }, { - title: 'Activating DIP3', + title: 'Create wallet', + task: async () => { + const disablePrivateKeys = false; + const createBlankWallet = false; + const walletPassphrase = ''; + const avoidReuse = false; + const loadOnStartup = true; + const descriptors = false; + + await ctx.coreService.getRpcClient().createWallet( + 'main', + disablePrivateKeys, + createBlankWallet, + walletPassphrase, + avoidReuse, + descriptors, + loadOnStartup, + ); + }, + }, + { + title: 'Generating funds to use as a collateral for masternodes', + task: () => { + const amount = HPMN_COLLATERAL_AMOUNT * configGroup.length; + return generateToAddressTask( + configGroup.find((c) => c.getName() === 'local_seed'), + amount, + ); + }, + }, + { + title: 'Activating forks', task: () => new Observable(async (observer) => { - const dip3ActivationHeight = 1000; + const dip3ActivationHeight = 901; const blocksToGenerateInOneStep = 10; let blocksGenerated = 0; @@ -126,37 +157,6 @@ export default function configureCoreTaskFactory( return this; }), }, - { - title: 'Create wallet', - task: async () => { - const disablePrivateKeys = false; - const createBlankWallet = false; - const walletPassphrase = ''; - const avoidReuse = false; - const loadOnStartup = true; - const descriptors = false; - - await ctx.coreService.getRpcClient().createWallet( - 'main', - disablePrivateKeys, - createBlankWallet, - walletPassphrase, - avoidReuse, - descriptors, - loadOnStartup, - ); - }, - }, - { - title: 'Generating funds to use as a collateral for masternodes', - task: () => { - const amount = HPMN_COLLATERAL_AMOUNT * configGroup.length; - return generateToAddressTask( - configGroup.find((c) => c.getName() === 'local_seed'), - amount, - ); - }, - }, { title: 'Register masternodes', task: async () => { @@ -276,51 +276,6 @@ export default function configureCoreTaskFactory( ); }, }, - { - title: 'Wait for nodes to have the same sporks', - task: () => waitForNodesToHaveTheSameSporks(ctx.coreServices), - }, - { - title: 'Activating DIP8 to enable ChainLocks', - task: () => new Observable(async (observer) => { - let isDip8Activated = false; - let blockchainInfo; - - let blocksGenerated = 0; - - const blocksToGenerateInOneStep = 10; - - do { - ({ - result: blockchainInfo, - } = await ctx.seedCoreService.getRpcClient().getBlockchainInfo()); - - isDip8Activated = blockchainInfo.softforks.dip0008.active; - - if (isDip8Activated) { - break; - } - - await generateBlocks( - ctx.seedCoreService, - blocksToGenerateInOneStep, - NETWORK_LOCAL, - // eslint-disable-next-line no-loop-func - (blocks) => { - blocksGenerated += blocks; - - observer.next(`${blocksGenerated} blocks generated`); - }, - ); - } while (!isDip8Activated); - - observer.next(`DIP8 has been activated at height ${blockchainInfo.softforks.dip0008.height}`); - - observer.complete(); - - return this; - }), - }, { title: 'Wait for nodes to have the same height', task: () => waitForNodesToHaveTheSameHeight( @@ -347,108 +302,6 @@ export default function configureCoreTaskFactory( title: 'Wait for quorums to be enabled', task: () => enableCoreQuorumsTask(), }, - { - title: 'Activating V20 fork', - task: () => new Observable(async (observer) => { - let isV20Activated = false; - let blockchainInfo; - - let blocksGenerated = 0; - - const blocksToGenerateInOneStep = 10; - - do { - ({ - result: blockchainInfo, - } = await ctx.seedCoreService.getRpcClient().getBlockchainInfo()); - - isV20Activated = blockchainInfo.softforks && blockchainInfo.softforks.v20 - && blockchainInfo.softforks.v20.active; - if (isV20Activated) { - break; - } - - await generateBlocks( - ctx.seedCoreService, - blocksToGenerateInOneStep, - NETWORK_LOCAL, - // eslint-disable-next-line no-loop-func - (blocks) => { - blocksGenerated += blocks; - - observer.next(`${blocksGenerated} blocks generated`); - }, - ); - } while (!isV20Activated); - - observer.next(`V20 fork has been activated at height ${blockchainInfo.softforks.v20.height}`); - - observer.complete(); - - return this; - }), - }, - { - title: 'Wait for nodes to have the same height', - task: () => waitForNodesToHaveTheSameHeight( - ctx.rpcClients, - WAIT_FOR_NODES_TIMEOUT, - ), - }, - { - title: 'Enable EHF spork', - task: async () => new Observable(async (observer) => { - const seedRpcClient = ctx.seedCoreService.getRpcClient(); - const { - result: initialCoreChainLockedHeight, - } = await seedRpcClient.getBlockCount(); - - await activateCoreSpork( - seedRpcClient, - 'SPORK_24_TEST_EHF', - initialCoreChainLockedHeight, - ); - - let isEhfActivated = false; - let blockchainInfo; - - let blocksGenerated = 0; - - const blocksToGenerateInOneStep = 48; - - do { - ({ - result: blockchainInfo, - } = await ctx.seedCoreService.getRpcClient().getBlockchainInfo()); - - isEhfActivated = blockchainInfo.softforks && blockchainInfo.softforks.mn_rr - && blockchainInfo.softforks.mn_rr.active; - if (isEhfActivated) { - break; - } - - await ctx.bumpMockTime(blocksToGenerateInOneStep); - - await generateBlocks( - ctx.seedCoreService, - blocksToGenerateInOneStep, - NETWORK_LOCAL, - // eslint-disable-next-line no-loop-func - (blocks) => { - blocksGenerated += blocks; - - observer.next(`${blocksGenerated} blocks generated`); - }, - ); - } while (!isEhfActivated); - - observer.next(`EHF has been activated at height ${blockchainInfo.softforks.mn_rr.height}`); - - observer.complete(); - - return this; - }), - }, { title: 'Wait for nodes to have the same height', task: () => waitForNodesToHaveTheSameHeight( From c6bfcc1d4b592c42d8783530e2485364f7fb40ba Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 30 Oct 2024 19:57:37 +0700 Subject: [PATCH 08/15] fix: mn_rr activated before we have quorums --- packages/dashmate/templates/core/dash.conf.dot | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/dashmate/templates/core/dash.conf.dot b/packages/dashmate/templates/core/dash.conf.dot index a51b604b06..c63987d4ae 100644 --- a/packages/dashmate/templates/core/dash.conf.dot +++ b/packages/dashmate/templates/core/dash.conf.dot @@ -92,6 +92,7 @@ fallbackfee=0.00001 {{?? it.network === 'local'}} regtest=1 [regtest] +testactivationheight=mn_rr@1000 {{? it.core.spork.address}}sporkaddr={{=it.core.spork.address}}{{?}} {{? it.core.spork.privateKey}}sporkkey={{=it.core.spork.privateKey}}{{?}} {{? it.core.miner.mediantime}}mocktime={{=it.core.miner.mediantime}}{{?}} From 9f01b42b0e12db114d1ac2fcf480861403885afd Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 30 Oct 2024 22:02:19 +0700 Subject: [PATCH 09/15] chore: make sure we activated mn_rr --- .../setup/local/configureCoreTaskFactory.js | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js index 920038d877..522509b739 100644 --- a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js @@ -2,7 +2,6 @@ import { Listr } from 'listr2'; import { Observable } from 'rxjs'; import DashCoreLib from '@dashevo/dashcore-lib'; import waitForNodesToHaveTheSameHeight from '../../../../core/waitForNodesToHaveTheSameHeight.js'; -import waitForNodesToHaveTheSameSporks from '../../../../core/waitForNodesToHaveTheSameSporks.js'; import { NETWORK_LOCAL, HPMN_COLLATERAL_AMOUNT } from '../../../../constants.js'; @@ -124,7 +123,7 @@ export default function configureCoreTaskFactory( }, }, { - title: 'Activating forks', + title: 'Activating v19 and v20', task: () => new Observable(async (observer) => { const dip3ActivationHeight = 901; const blocksToGenerateInOneStep = 10; @@ -309,6 +308,47 @@ export default function configureCoreTaskFactory( WAIT_FOR_NODES_TIMEOUT, ), }, + { + title: 'Activating v21 fork', + task: () => new Observable(async (observer) => { + const dip3ActivationHeight = 1001; + const blocksToGenerateInOneStep = 10; + + let blocksGenerated = 0; + let { + result: currentBlockHeight, + } = await ctx.coreService.getRpcClient().getBlockCount(); + + do { + ({ + result: currentBlockHeight, + } = await ctx.coreService.getRpcClient().getBlockCount()); + + await generateBlocks( + ctx.coreService, + blocksToGenerateInOneStep, + NETWORK_LOCAL, + // eslint-disable-next-line no-loop-func + (blocks) => { + blocksGenerated += blocks; + + observer.next(`${blocksGenerated} blocks generated`); + }, + ); + } while (dip3ActivationHeight > currentBlockHeight); + + observer.complete(); + + return this; + }), + }, + { + title: 'Wait for nodes to have the same height', + task: () => waitForNodesToHaveTheSameHeight( + ctx.rpcClients, + WAIT_FOR_NODES_TIMEOUT, + ), + }, { title: 'Stopping nodes', task: async () => (Promise.all( From eb4534e0712ca58fb88c148edf62cf393ff12f57 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 1 Nov 2024 20:06:40 +0700 Subject: [PATCH 10/15] chore: update core image --- packages/dashmate/configs/defaults/getLocalConfigFactory.js | 2 +- packages/dashmate/configs/defaults/getTestnetConfigFactory.js | 2 +- packages/dashmate/configs/getConfigFileMigrationsFactory.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index 9e1a6c6429..c94ddb3622 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -25,7 +25,7 @@ export default function getLocalConfigFactory(getBaseConfig) { }, core: { docker: { - image: 'dashpay/dashd:22.0.0-nightly.2024.10.29', + image: 'dashpay/dashd:22.0.0-devpr6375.dde1edf3', }, p2p: { port: 20001, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index 0389716578..070feb4b46 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -25,7 +25,7 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { }, core: { docker: { - image: 'dashpay/dashd:22.0.0-nightly.2024.10.29', + image: 'dashpay/dashd:22.0.0-devpr6375.dde1edf3', }, p2p: { port: 19999, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index ce45406b25..045e5c828f 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1032,7 +1032,7 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) } if ([NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_DEVNET].includes(options.network)) { - options.core.docker.image = 'dashpay/dashd:22.0.0-nightly.2024.10.29'; + options.core.docker.image = 'dashpay/dashd:22.0.0-devpr6375.dde1edf3'; } }); return configFile; From 978929a511871ebb884d05d995b56c4280e03196 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 6 Nov 2024 19:50:21 +0700 Subject: [PATCH 11/15] fix: platform status --- packages/dashmate/src/status/scopes/platform.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/dashmate/src/status/scopes/platform.js b/packages/dashmate/src/status/scopes/platform.js index c3fe48d8e8..04532b327f 100644 --- a/packages/dashmate/src/status/scopes/platform.js +++ b/packages/dashmate/src/status/scopes/platform.js @@ -312,11 +312,7 @@ export default function getPlatformScopeFactory( if (mnRRSoftFork.active) { scope.platformActivation = `Activated (at height ${mnRRSoftFork.height})`; } else { - const startTime = mnRRSoftFork.bip9.start_time; - - const diff = (new Date().getTime() - startTime) / 1000; - - scope.platformActivation = `Waiting for activation (approximately in ${prettyMs(diff, { compact: true })})`; + scope.platformActivation = `Waiting for activation on height ${mnRRSoftFork.height}`; } const [tenderdash, drive] = await Promise.all([ From 30c0b17333b2c60b921fbf2bfee1fa9a5284ea12 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 17:00:08 +0700 Subject: [PATCH 12/15] chore: switch core to 22 rc1 --- packages/dashmate/configs/defaults/getBaseConfigFactory.js | 2 +- .../dashmate/configs/defaults/getLocalConfigFactory.js | 3 --- .../dashmate/configs/defaults/getTestnetConfigFactory.js | 3 --- .../dashmate/configs/getConfigFileMigrationsFactory.js | 7 +++++++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index e26e67ca50..d3784f6f3c 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -53,7 +53,7 @@ export default function getBaseConfigFactory() { port: 3001, }, docker: { - image: 'dashpay/dashd:21', + image: 'dashpay/dashd:22.0.0-rc.1', commandArgs: [], }, p2p: { diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index c94ddb3622..42254deb5d 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -24,9 +24,6 @@ export default function getLocalConfigFactory(getBaseConfig) { }, }, core: { - docker: { - image: 'dashpay/dashd:22.0.0-devpr6375.dde1edf3', - }, p2p: { port: 20001, }, diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index 070feb4b46..3422ad2438 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -24,9 +24,6 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { }, }, core: { - docker: { - image: 'dashpay/dashd:22.0.0-devpr6375.dde1edf3', - }, p2p: { port: 19999, }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 045e5c828f..2d60195e05 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1037,6 +1037,13 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) }); return configFile; }, + '1.6.0': (configFile) => { + Object.entries(configFile.configs) + .forEach(([, options]) => { + options.core.docker.image = 'dashpay/dashd:22.0.0-rc.1'; + }); + return configFile; + }, }; } From 0ab0f0dafba8ec63899cfa5d589bf9d7ef6c0169 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 17:00:34 +0700 Subject: [PATCH 13/15] refactor: remove unused import --- packages/dashmate/src/status/scopes/platform.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dashmate/src/status/scopes/platform.js b/packages/dashmate/src/status/scopes/platform.js index 04532b327f..4cb70187c1 100644 --- a/packages/dashmate/src/status/scopes/platform.js +++ b/packages/dashmate/src/status/scopes/platform.js @@ -1,4 +1,3 @@ -import prettyMs from 'pretty-ms'; import { PortStateEnum } from '../enums/portState.js'; import DockerComposeError from '../../docker/errors/DockerComposeError.js'; import providers from '../providers.js'; From 58bfec22088c580e37c7b62096797d0483d1252f Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 17:26:50 +0700 Subject: [PATCH 14/15] chore: remove unnecessary migration --- packages/dashmate/configs/getConfigFileMigrationsFactory.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 2d60195e05..5eb36841b5 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1030,10 +1030,6 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) if (options.network === NETWORK_TESTNET && name !== 'base') { options.platform.drive.tenderdash.p2p.seeds = testnet.get('platform.drive.tenderdash.p2p.seeds'); } - - if ([NETWORK_LOCAL, NETWORK_TESTNET, NETWORK_DEVNET].includes(options.network)) { - options.core.docker.image = 'dashpay/dashd:22.0.0-devpr6375.dde1edf3'; - } }); return configFile; }, From e165edce71d34057d7a63feff3e3cef907481425 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 18:15:25 +0700 Subject: [PATCH 15/15] refactor: remove unused import --- packages/dashmate/configs/getConfigFileMigrationsFactory.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 5eb36841b5..bed2e0ef2e 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -4,7 +4,6 @@ import lodash from 'lodash'; import path from 'path'; import { - NETWORK_DEVNET, NETWORK_LOCAL, NETWORK_MAINNET, NETWORK_TESTNET,