From 587952a7b340fd1b89479ca2d16b9a096236c214 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 4 Sep 2024 21:51:10 +0300 Subject: [PATCH 01/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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 dacc6dbd04b6c4f9593c7c8ab128ac1f5a094e4f Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 4 Nov 2024 18:30:19 +0700 Subject: [PATCH 11/27] fix(drive): uncommitted state if db transaction fails (#2305) --- .../src/abci/handler/finalize_block.rs | 26 +++++++++- .../rs-drive-abci/src/abci/handler/info.rs | 52 ++++++++++++++++--- .../src/abci/handler/prepare_proposal.rs | 43 +++++++++++++++ .../src/abci/handler/process_proposal.rs | 43 +++++++++++++++ 4 files changed, 157 insertions(+), 7 deletions(-) diff --git a/packages/rs-drive-abci/src/abci/handler/finalize_block.rs b/packages/rs-drive-abci/src/abci/handler/finalize_block.rs index 9653391c7d..852f85cc6b 100644 --- a/packages/rs-drive-abci/src/abci/handler/finalize_block.rs +++ b/packages/rs-drive-abci/src/abci/handler/finalize_block.rs @@ -5,6 +5,7 @@ use crate::execution::types::block_execution_context::v0::BlockExecutionContextV use crate::platform_types::cleaned_abci_messages::finalized_block_cleaned_request::v0::FinalizeBlockCleanedRequest; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::rpc::core::CoreRPCLike; +use dpp::dashcore::Network; use std::sync::atomic::Ordering; use tenderdash_abci::proto::abci as proto; @@ -66,7 +67,30 @@ where )); } - app.commit_transaction(platform_version)?; + let result = app.commit_transaction(platform_version); + + // We had a sequence of errors on the mainnet started since block 32326. + // We got RocksDB's "transaction is busy" error because of a bug (https://github.com/dashpay/platform/pull/2309). + // Due to another bug in Tenderdash (https://github.com/dashpay/tenderdash/pull/966), + // validators just proceeded to the next block partially committing the state and updating the cache. + // Full nodes are stuck and proceeded after re-sync. + // For the mainnet chain, we enable these fixes at the block when we consider the state is consistent. + let config = &app.platform().config; + + if app.platform().config.network == Network::Dash + && config.abci.chain_id == "evo1" + && block_height < 33000 + { + // Old behavior on mainnet below block 33000 + result?; + } else { + // In case if transaction commit failed we still have caches in memory that + // corresponds to the data that we weren't able to commit. + // The simplified solution is to restart the Drive, so all caches + // will be restored from the disk and try to process this block again. + // TODO: We need a better handling of the transaction is busy error with retry logic. + result.expect("commit transaction"); + } app.platform() .committed_block_height_guard diff --git a/packages/rs-drive-abci/src/abci/handler/info.rs b/packages/rs-drive-abci/src/abci/handler/info.rs index dbb8501891..9ac9d31626 100644 --- a/packages/rs-drive-abci/src/abci/handler/info.rs +++ b/packages/rs-drive-abci/src/abci/handler/info.rs @@ -3,6 +3,7 @@ use crate::abci::AbciError; use crate::error::Error; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::rpc::core::CoreRPCLike; +use dpp::dashcore::Network; use dpp::version::DESIRED_PLATFORM_VERSION; use tenderdash_abci::proto::abci as proto; @@ -21,19 +22,58 @@ where let platform_state = app.platform().state.load(); - let state_app_hash = platform_state + let last_block_height = platform_state.last_committed_block_height() as i64; + + // Verify that Platform State corresponds to Drive commited state + let platform_state_app_hash = platform_state .last_committed_block_app_hash() - .map(|app_hash| app_hash.to_vec()) .unwrap_or_default(); + let grove_version = &platform_state + .current_platform_version()? + .drive + .grove_version; + + let drive_storage_root_hash = app + .platform() + .drive + .grove + .root_hash(None, grove_version) + .unwrap()?; + + // We had a sequence of errors on the mainnet started since block 32326. + // We got RocksDB's "transaction is busy" error because of a bug (https://github.com/dashpay/platform/pull/2309). + // Due to another bug in Tenderdash (https://github.com/dashpay/tenderdash/pull/966), + // validators just proceeded to the next block partially committing the state and updating the cache. + // Full nodes are stuck and proceeded after re-sync. + // For the mainnet chain, we enable these fixes at the block when we consider the state is consistent. + let config = &app.platform().config; + + #[allow(clippy::collapsible_if)] + if !(config.network == Network::Dash + && config.abci.chain_id == "evo1" + && last_block_height < 33000) + { + // App hash in memory must be equal to app hash on disk + if drive_storage_root_hash != platform_state_app_hash { + // We panic because we can't recover from this situation. + // Better to restart the Drive, so we might self-heal the node + // reloading state form the disk + panic!( + "drive and platform state app hash mismatch: drive_storage_root_hash: {:?}, platform_state_app_hash: {:?}", + drive_storage_root_hash, platform_state_app_hash + ); + } + } + let desired_protocol_version = DESIRED_PLATFORM_VERSION.protocol_version; let response = proto::ResponseInfo { data: "".to_string(), app_version: desired_protocol_version as u64, - last_block_height: platform_state.last_committed_block_height() as i64, + last_block_height, version: env!("CARGO_PKG_VERSION").to_string(), - last_block_app_hash: state_app_hash.clone(), + last_block_app_hash: platform_state_app_hash.to_vec(), }; tracing::debug!( @@ -41,8 +81,8 @@ where software_version = env!("CARGO_PKG_VERSION"), block_version = request.block_version, p2p_version = request.p2p_version, - app_hash = hex::encode(state_app_hash), - height = platform_state.last_committed_block_height(), + app_hash = hex::encode(platform_state_app_hash), + last_block_height, "Handshake with consensus engine", ); diff --git a/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs b/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs index 18252d0d45..61f58a0196 100644 --- a/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs +++ b/packages/rs-drive-abci/src/abci/handler/prepare_proposal.rs @@ -11,6 +11,7 @@ use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; use crate::rpc::core::CoreRPCLike; use dpp::dashcore::hashes::Hash; +use dpp::dashcore::Network; use dpp::version::TryIntoPlatformVersioned; use drive::grovedb_storage::Error::RocksDBError; use tenderdash_abci::proto::abci as proto; @@ -35,6 +36,48 @@ where let platform_state = app.platform().state.load(); + // Verify that Platform State corresponds to Drive commited state + let platform_state_app_hash = platform_state + .last_committed_block_app_hash() + .unwrap_or_default(); + + let grove_version = &platform_state + .current_platform_version()? + .drive + .grove_version; + + let drive_storage_root_hash = app + .platform() + .drive + .grove + .root_hash(None, grove_version) + .unwrap()?; + + // We had a sequence of errors on the mainnet started since block 32326. + // We got RocksDB's "transaction is busy" error because of a bug (https://github.com/dashpay/platform/pull/2309). + // Due to another bug in Tenderdash (https://github.com/dashpay/tenderdash/pull/966), + // validators just proceeded to the next block partially committing the state and updating the cache. + // Full nodes are stuck and proceeded after re-sync. + // For the mainnet chain, we enable these fixes at the block when we consider the state is consistent. + let config = &app.platform().config; + + #[allow(clippy::collapsible_if)] + if !(config.network == Network::Dash + && config.abci.chain_id == "evo1" + && request.height < 33000) + { + // App hash in memory must be equal to app hash on disk + if drive_storage_root_hash != platform_state_app_hash { + // We panic because we can't recover from this situation. + // Better to restart the Drive, so we might self-heal the node + // reloading state form the disk + panic!( + "drive and platform state app hash mismatch: drive_storage_root_hash: {:?}, platform_state_app_hash: {:?}", + drive_storage_root_hash, platform_state_app_hash + ); + } + } + let last_committed_core_height = platform_state.last_committed_core_height(); let starting_platform_version = platform_state.current_platform_version()?; diff --git a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs index 5bf547e14a..d40567d3db 100644 --- a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs +++ b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs @@ -12,6 +12,7 @@ use crate::platform_types::block_execution_outcome; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; use crate::rpc::core::CoreRPCLike; +use dpp::dashcore::Network; use dpp::version::TryIntoPlatformVersioned; use drive::grovedb_storage::Error::RocksDBError; use tenderdash_abci::proto::abci as proto; @@ -179,6 +180,48 @@ where let platform_state = app.platform().state.load(); + // Verify that Platform State corresponds to Drive commited state + let platform_state_app_hash = platform_state + .last_committed_block_app_hash() + .unwrap_or_default(); + + let grove_version = &platform_state + .current_platform_version()? + .drive + .grove_version; + + let drive_storage_root_hash = app + .platform() + .drive + .grove + .root_hash(None, grove_version) + .unwrap()?; + + // We had a sequence of errors on the mainnet started since block 32326. + // We got RocksDB's "transaction is busy" error because of a bug (https://github.com/dashpay/platform/pull/2309). + // Due to another bug in Tenderdash (https://github.com/dashpay/tenderdash/pull/966), + // validators just proceeded to the next block partially committing the state and updating the cache. + // Full nodes are stuck and proceeded after re-sync. + // For the mainnet chain, we enable these fixes at the block when we consider the state is consistent. + let config = &app.platform().config; + + #[allow(clippy::collapsible_if)] + if !(app.platform().config.network == Network::Dash + && config.abci.chain_id == "evo1" + && request.height < 33000) + { + // App hash in memory must be equal to app hash on disk + if drive_storage_root_hash != platform_state_app_hash { + // We panic because we can't recover from this situation. + // Better to restart the Drive, so we might self-heal the node + // reloading state form the disk + panic!( + "drive and platform state app hash mismatch: drive_storage_root_hash: {:?}, platform_state_app_hash: {:?}", + drive_storage_root_hash, platform_state_app_hash + ); + } + } + let starting_platform_version = platform_state.current_platform_version()?; // Running the proposal executes all the state transitions for the block From 306b86cb35fce29bec2c94a660c3923bf13bedd6 Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Mon, 4 Nov 2024 12:31:37 +0100 Subject: [PATCH 12/27] fix(drive): apply batch is not using transaction in `remove_all_votes_given_by_identities` (#2309) Co-authored-by: Ivan Shumkov --- .../mod.rs | 3 +++ .../v0/mod.rs | 5 ++++ .../voting/run_dao_platform_events/v0/mod.rs | 1 + .../state_transitions/masternode_vote/mod.rs | 1 + .../mod.rs | 8 +++++++ .../v0/mod.rs | 24 +++++++++++++++++-- 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/mod.rs index 8328eb0fc1..ffd97c4292 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/mod.rs @@ -3,6 +3,7 @@ use crate::error::Error; use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; +use dpp::block::block_info::BlockInfo; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; @@ -14,6 +15,7 @@ where /// Removes the votes for removed masternodes pub(in crate::execution) fn remove_votes_for_removed_masternodes( &self, + block_info: &BlockInfo, last_committed_platform_state: &PlatformState, block_platform_state: &PlatformState, transaction: TransactionArg, @@ -26,6 +28,7 @@ where .remove_votes_for_removed_masternodes { 0 => self.remove_votes_for_removed_masternodes_v0( + block_info, last_committed_platform_state, block_platform_state, transaction, diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/v0/mod.rs index b0081570c7..04931a3928 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/remove_votes_for_removed_masternodes/v0/mod.rs @@ -3,6 +3,7 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; +use dpp::block::block_info::BlockInfo; use dpp::dashcore::hashes::Hash; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; @@ -14,6 +15,7 @@ where /// Removes the votes for removed masternodes pub(super) fn remove_votes_for_removed_masternodes_v0( &self, + block_info: &BlockInfo, last_committed_platform_state: &PlatformState, block_platform_state: &PlatformState, transaction: TransactionArg, @@ -29,6 +31,9 @@ where .iter() .map(|pro_tx_hash| pro_tx_hash.as_byte_array().to_vec()) .collect(), + block_info.height, + self.config.network, + self.config.abci.chain_id.as_str(), transaction, platform_version, )?; diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs index 2ea9357af1..57fbe635b2 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/run_dao_platform_events/v0/mod.rs @@ -21,6 +21,7 @@ where // Remove any votes that self.remove_votes_for_removed_masternodes( + block_info, last_committed_platform_state, block_platform_state, transaction, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs index fe7d8095b8..9d0394c442 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/masternode_vote/mod.rs @@ -11287,6 +11287,7 @@ mod tests { platform .remove_votes_for_removed_masternodes( + &BlockInfo::default(), &platform_state_before_masternode_identity_removals, &block_platform_state, Some(&transaction), diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/mod.rs index 0f5e0d9604..f93d92a424 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/mod.rs @@ -5,6 +5,8 @@ use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; +use dpp::dashcore::Network; +use dpp::prelude::BlockHeight; use dpp::version::PlatformVersion; use grovedb::TransactionArg; @@ -14,6 +16,9 @@ impl Drive { pub fn remove_all_votes_given_by_identities( &self, identity_ids_as_byte_arrays: Vec>, + block_height: BlockHeight, + network: Network, + chain_id: &str, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -26,6 +31,9 @@ impl Drive { { 0 => self.remove_all_votes_given_by_identities_v0( identity_ids_as_byte_arrays, + block_height, + network, + chain_id, transaction, platform_version, ), diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs index 3c36b0ec64..81b3d0fab7 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs @@ -11,7 +11,8 @@ use crate::drive::votes::paths::{ use crate::drive::votes::storage_form::contested_document_resource_reference_storage_form::ContestedDocumentResourceVoteReferenceStorageForm; use crate::query::QueryItem; use crate::util::grove_operations::BatchDeleteApplyType; -use dpp::prelude::Identifier; +use dpp::dashcore::Network; +use dpp::prelude::{BlockHeight, Identifier}; use dpp::version::PlatformVersion; use grovedb::query_result_type::QueryResultType::QueryPathKeyElementTrioResultType; use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; @@ -22,6 +23,9 @@ impl Drive { pub(super) fn remove_all_votes_given_by_identities_v0( &self, identity_ids_as_byte_arrays: Vec>, + block_height: BlockHeight, + network: Network, + chain_id: &str, transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { @@ -112,9 +116,25 @@ impl Drive { } if !deletion_batch.is_empty() { + // We had a sequence of errors on the mainnet started since block 32326. + // We got RocksDB's "transaction is busy" error because of a bug (https://github.com/dashpay/platform/pull/2309). + // Due to another bug in Tenderdash (https://github.com/dashpay/tenderdash/pull/966), + // validators just proceeded to the next block partially committing the state + // and updating the cache (https://github.com/dashpay/platform/pull/2305). + // Full nodes are stuck and proceeded after re-sync. + // For the mainnet chain, we enable this fix at the block when we consider the state is consistent. + let transaction = + if network == Network::Dash && chain_id == "evo1" && block_height < 33000 { + // Old behaviour on mainnet + None + } else { + // We should use transaction + transaction + }; + self.apply_batch_low_level_drive_operations( None, - None, + transaction, deletion_batch, &mut vec![], &platform_version.drive, From 8f924cc0ac74d044d05b68d42fe0151f5e7cd65a Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 4 Nov 2024 18:47:18 +0700 Subject: [PATCH 13/27] chore(release): update changelog and bump version to 1.5.1 (#2313) --- CHANGELOG.md | 9 ++++ Cargo.lock | 50 +++++++++---------- package.json | 2 +- packages/bench-suite/package.json | 2 +- packages/check-features/Cargo.toml | 2 +- packages/dapi-grpc/Cargo.toml | 2 +- packages/dapi-grpc/package.json | 2 +- packages/dapi/package.json | 2 +- packages/dash-spv/package.json | 2 +- packages/dashmate/package.json | 2 +- packages/dashpay-contract/Cargo.toml | 2 +- packages/dashpay-contract/package.json | 2 +- packages/data-contracts/Cargo.toml | 2 +- packages/dpns-contract/Cargo.toml | 2 +- packages/dpns-contract/package.json | 2 +- packages/feature-flags-contract/Cargo.toml | 2 +- packages/feature-flags-contract/package.json | 2 +- packages/js-dapi-client/package.json | 2 +- packages/js-dash-sdk/package.json | 2 +- packages/js-grpc-common/package.json | 2 +- .../Cargo.toml | 2 +- .../package.json | 2 +- packages/platform-test-suite/package.json | 2 +- packages/rs-dapi-client/Cargo.toml | 2 +- packages/rs-dapi-grpc-macros/Cargo.toml | 2 +- packages/rs-dpp/Cargo.toml | 2 +- packages/rs-drive-abci/Cargo.toml | 2 +- packages/rs-drive-proof-verifier/Cargo.toml | 2 +- packages/rs-drive/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../Cargo.toml | 2 +- packages/rs-platform-serialization/Cargo.toml | 2 +- .../rs-platform-value-convertible/Cargo.toml | 2 +- packages/rs-platform-value/Cargo.toml | 2 +- packages/rs-platform-version/Cargo.toml | 2 +- packages/rs-platform-versioning/Cargo.toml | 2 +- packages/rs-sdk/Cargo.toml | 2 +- packages/simple-signer/Cargo.toml | 2 +- packages/strategy-tests/Cargo.toml | 2 +- packages/wallet-lib/package.json | 2 +- packages/wasm-dpp/Cargo.toml | 2 +- packages/wasm-dpp/package.json | 2 +- packages/withdrawals-contract/Cargo.toml | 2 +- packages/withdrawals-contract/package.json | 2 +- 44 files changed, 76 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c60d45c199..5bc63c80c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### [1.5.1](https://github.com/dashpay/platform/compare/v1.5.0...v1.5.1) (2024-11-04) + + +### Bug Fixes + +* **drive:** apply batch is not using transaction in `remove_all_votes_given_by_identities` ([#2309](https://github.com/dashpay/platform/issues/2309)) +* **drive:** uncommitted state if db transaction fails ([#2305](https://github.com/dashpay/platform/issues/2305)) + + ## [1.5.0](https://github.com/dashpay/platform/compare/v1.4.1...v1.5.0) (2024-11-01) ### ⚠ BREAKING CHANGES diff --git a/Cargo.lock b/Cargo.lock index c59d07d2b4..58ec63a80f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -676,7 +676,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "1.5.0" +version = "1.5.1" dependencies = [ "toml", ] @@ -1045,7 +1045,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "1.5.0" +version = "1.5.1" dependencies = [ "dapi-grpc-macros", "futures-core", @@ -1061,7 +1061,7 @@ dependencies = [ [[package]] name = "dapi-grpc-macros" -version = "1.5.0" +version = "1.5.1" dependencies = [ "dapi-grpc", "heck 0.5.0", @@ -1106,7 +1106,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "1.5.0" +version = "1.5.1" dependencies = [ "arc-swap", "async-trait", @@ -1212,7 +1212,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "1.5.0" +version = "1.5.1" dependencies = [ "platform-value", "platform-version", @@ -1222,7 +1222,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "1.5.0" +version = "1.5.1" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1353,7 +1353,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "1.5.0" +version = "1.5.1" dependencies = [ "platform-value", "platform-version", @@ -1363,7 +1363,7 @@ dependencies = [ [[package]] name = "dpp" -version = "1.5.0" +version = "1.5.1" dependencies = [ "anyhow", "assert_matches", @@ -1413,7 +1413,7 @@ dependencies = [ [[package]] name = "drive" -version = "1.5.0" +version = "1.5.1" dependencies = [ "arc-swap", "assert_matches", @@ -1454,7 +1454,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "1.5.0" +version = "1.5.1" dependencies = [ "arc-swap", "assert_matches", @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "1.5.0" +version = "1.5.1" dependencies = [ "bincode", "dapi-grpc", @@ -1730,7 +1730,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "feature-flags-contract" -version = "1.5.0" +version = "1.5.1" dependencies = [ "platform-value", "platform-version", @@ -2595,7 +2595,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "1.5.0" +version = "1.5.1" dependencies = [ "assert_matches", "json-patch", @@ -2753,7 +2753,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "1.5.0" +version = "1.5.1" dependencies = [ "platform-value", "platform-version", @@ -3333,7 +3333,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platform-serialization" -version = "1.5.0" +version = "1.5.1" dependencies = [ "bincode", "platform-version", @@ -3341,7 +3341,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "1.5.0" +version = "1.5.1" dependencies = [ "proc-macro2", "quote", @@ -3351,7 +3351,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "1.5.0" +version = "1.5.1" dependencies = [ "base64 0.22.1", "bincode", @@ -3372,7 +3372,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "1.5.0" +version = "1.5.1" dependencies = [ "quote", "syn 2.0.75", @@ -3380,7 +3380,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "1.5.0" +version = "1.5.1" dependencies = [ "bincode", "grovedb-version", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "1.5.0" +version = "1.5.1" dependencies = [ "proc-macro2", "quote", @@ -3877,7 +3877,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "1.5.0" +version = "1.5.1" dependencies = [ "backon", "chrono", @@ -4333,7 +4333,7 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple-signer" -version = "1.5.0" +version = "1.5.1" dependencies = [ "base64 0.22.1", "bincode", @@ -4399,7 +4399,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "1.5.0" +version = "1.5.1" dependencies = [ "bincode", "dpp", @@ -5318,7 +5318,7 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-dpp" -version = "1.5.0" +version = "1.5.1" dependencies = [ "anyhow", "async-trait", @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "1.5.0" +version = "1.5.1" dependencies = [ "num_enum 0.5.11", "platform-value", diff --git a/package.json b/package.json index bb50d240c5..d75d8a0ee9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "1.5.0", + "version": "1.5.1", "private": true, "scripts": { "setup": "yarn install && yarn run build && yarn run configure", diff --git a/packages/bench-suite/package.json b/packages/bench-suite/package.json index 9fd607c221..362166e446 100644 --- a/packages/bench-suite/package.json +++ b/packages/bench-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/bench-suite", "private": true, - "version": "1.5.0", + "version": "1.5.1", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/check-features/Cargo.toml b/packages/check-features/Cargo.toml index 59befe3fe4..8f12fca91f 100644 --- a/packages/check-features/Cargo.toml +++ b/packages/check-features/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-features" -version = "1.5.0" +version = "1.5.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/dapi-grpc/Cargo.toml b/packages/dapi-grpc/Cargo.toml index 611b01a94e..446de30b50 100644 --- a/packages/dapi-grpc/Cargo.toml +++ b/packages/dapi-grpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc" description = "GRPC client for Dash Platform" -version = "1.5.0" +version = "1.5.1" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index e2481688bd..7f917c9d00 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "1.5.0", + "version": "1.5.1", "description": "DAPI GRPC definition file and generated clients", "browser": "browser.js", "main": "node.js", diff --git a/packages/dapi/package.json b/packages/dapi/package.json index 79d23a958e..b49f84fb35 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "1.5.0", + "version": "1.5.1", "description": "A decentralized API for the Dash network", "scripts": { "api": "node scripts/api.js", diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index 9769bf2791..a7b5c17505 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "2.5.0", + "version": "2.5.1", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 4ef6feac3f..62a7fe591e 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "1.5.0", + "version": "1.5.1", "description": "Distribution package for Dash node installation", "scripts": { "lint": "eslint .", diff --git a/packages/dashpay-contract/Cargo.toml b/packages/dashpay-contract/Cargo.toml index 234be65b39..186a17e7aa 100644 --- a/packages/dashpay-contract/Cargo.toml +++ b/packages/dashpay-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dashpay-contract" description = "DashPay data contract schema and tools" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index 02f96b5e84..25321078af 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "1.5.0", + "version": "1.5.1", "description": "Reference contract of the DashPay DPA on Dash Evolution", "scripts": { "lint": "eslint .", diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index 248f8886e2..4de78dcec7 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "data-contracts" description = "Dash Platform system data contracts" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index a50b3b6786..e24782cdb2 100644 --- a/packages/dpns-contract/Cargo.toml +++ b/packages/dpns-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dpns-contract" description = "DPNS data contract schema and tools" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index ea08d1101a..d86f2c43c5 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "1.5.0", + "version": "1.5.1", "description": "A contract and helper scripts for DPNS DApp", "scripts": { "lint": "eslint .", diff --git a/packages/feature-flags-contract/Cargo.toml b/packages/feature-flags-contract/Cargo.toml index a4bd7a3d1b..2a72038ced 100644 --- a/packages/feature-flags-contract/Cargo.toml +++ b/packages/feature-flags-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "feature-flags-contract" description = "Feature flags data contract schema and tools" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 6258be19c7..3079219f55 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/feature-flags-contract", - "version": "1.5.0", + "version": "1.5.1", "description": "Data Contract to store Dash Platform feature flags", "scripts": { "build": "", diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index d957664bd9..c9568844c9 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-client", - "version": "1.5.0", + "version": "1.5.1", "description": "Client library used to access Dash DAPI endpoints", "main": "lib/index.js", "contributors": [ diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index 975bb90107..7702c6759a 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "4.5.0", + "version": "4.5.1", "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)", "main": "build/index.js", "unpkg": "dist/dash.min.js", diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index 8c7b895f09..c620755f63 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/grpc-common", - "version": "1.5.0", + "version": "1.5.1", "description": "Common GRPC library", "main": "index.js", "scripts": { diff --git a/packages/masternode-reward-shares-contract/Cargo.toml b/packages/masternode-reward-shares-contract/Cargo.toml index 71dc15cc61..f2c805e606 100644 --- a/packages/masternode-reward-shares-contract/Cargo.toml +++ b/packages/masternode-reward-shares-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "masternode-reward-shares-contract" description = "Masternode reward shares data contract schema and tools" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 3f1899f461..85737a8ecb 100644 --- a/packages/masternode-reward-shares-contract/package.json +++ b/packages/masternode-reward-shares-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/masternode-reward-shares-contract", - "version": "1.5.0", + "version": "1.5.1", "description": "A contract and helper scripts for reward sharing", "scripts": { "lint": "eslint .", diff --git a/packages/platform-test-suite/package.json b/packages/platform-test-suite/package.json index 5497d529f0..23f0ba377f 100644 --- a/packages/platform-test-suite/package.json +++ b/packages/platform-test-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/platform-test-suite", "private": true, - "version": "1.5.0", + "version": "1.5.1", "description": "Dash Network end-to-end tests", "scripts": { "test": "yarn exec bin/test.sh", diff --git a/packages/rs-dapi-client/Cargo.toml b/packages/rs-dapi-client/Cargo.toml index 28cd8936b9..847b9403f5 100644 --- a/packages/rs-dapi-client/Cargo.toml +++ b/packages/rs-dapi-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dapi-client" -version = "1.5.0" +version = "1.5.1" edition = "2021" [features] diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index ce2aef48c4..b67219c562 100644 --- a/packages/rs-dapi-grpc-macros/Cargo.toml +++ b/packages/rs-dapi-grpc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc-macros" -version = "1.5.0" +version = "1.5.1" edition = "2021" description = "Macros used by dapi-grpc. Internal use only." diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index ff377de748..e9c0eed2d8 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true authors = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index b1762b8706..c8462dc0de 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-abci" -version = "1.5.0" +version = "1.5.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index 3eaa9f3bdf..8d783510c5 100644 --- a/packages/rs-drive-proof-verifier/Cargo.toml +++ b/packages/rs-drive-proof-verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-proof-verifier" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index 340ca3a9ee..337452f7b2 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "drive" description = "Dash drive built on top of GroveDB" -version = "1.5.0" +version = "1.5.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-json-schema-compatibility-validator/Cargo.toml b/packages/rs-json-schema-compatibility-validator/Cargo.toml index 6e1d43be34..94bb898e93 100644 --- a/packages/rs-json-schema-compatibility-validator/Cargo.toml +++ b/packages/rs-json-schema-compatibility-validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "json-schema-compatibility-validator" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true authors = ["Ivan Shumkov "] diff --git a/packages/rs-platform-serialization-derive/Cargo.toml b/packages/rs-platform-serialization-derive/Cargo.toml index 27d6cba787..c672d9c6f9 100644 --- a/packages/rs-platform-serialization-derive/Cargo.toml +++ b/packages/rs-platform-serialization-derive/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization-derive" authors = ["Samuel Westrich "] description = "Bincode serialization and deserialization derivations" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-serialization/Cargo.toml b/packages/rs-platform-serialization/Cargo.toml index fc4679a3fb..6a001eb453 100644 --- a/packages/rs-platform-serialization/Cargo.toml +++ b/packages/rs-platform-serialization/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization" authors = ["Samuel Westrich "] description = "Bincode based serialization and deserialization" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value-convertible/Cargo.toml b/packages/rs-platform-value-convertible/Cargo.toml index b3145a3a40..b67b0183f2 100644 --- a/packages/rs-platform-value-convertible/Cargo.toml +++ b/packages/rs-platform-value-convertible/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value-convertible" authors = ["Samuel Westrich "] description = "Convertion to and from platform values" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value/Cargo.toml b/packages/rs-platform-value/Cargo.toml index d31603fbc7..00c240ce38 100644 --- a/packages/rs-platform-value/Cargo.toml +++ b/packages/rs-platform-value/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value" authors = ["Samuel Westrich "] description = "A simple value module" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index fecc94f775..818784b2fa 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-version" authors = ["Samuel Westrich "] description = "Versioning library for Platform" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-versioning/Cargo.toml b/packages/rs-platform-versioning/Cargo.toml index 4a0f8f5a6d..2fd6d2ffa3 100644 --- a/packages/rs-platform-versioning/Cargo.toml +++ b/packages/rs-platform-versioning/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-versioning" authors = ["Samuel Westrich "] description = "Version derivation" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index ed45b0d813..b9b943726c 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-sdk" -version = "1.5.0" +version = "1.5.1" edition = "2021" [dependencies] diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index 080f921ba7..d8f05cb442 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index e3666a076e..ddfadefba0 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "1.5.0" +version = "1.5.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index 73bc0575e7..b044abe3b7 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "8.5.0", + "version": "8.5.1", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index d4c7a4eebb..2841e16c81 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index 95b70a9681..36c6cc466c 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "1.5.0", + "version": "1.5.1", "description": "The JavaScript implementation of the Dash Platform Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/withdrawals-contract/Cargo.toml b/packages/withdrawals-contract/Cargo.toml index eaef26229c..e9be9eb577 100644 --- a/packages/withdrawals-contract/Cargo.toml +++ b/packages/withdrawals-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "withdrawals-contract" description = "Witdrawals data contract schema and tools" -version = "1.5.0" +version = "1.5.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index e6031b8ab6..ecefb6502b 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "1.5.0", + "version": "1.5.1", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "", From 978929a511871ebb884d05d995b56c4280e03196 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Wed, 6 Nov 2024 19:50:21 +0700 Subject: [PATCH 14/27] 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 fa6e6bd396f239bbfbd987e45f686ba71014e8eb Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 21 Nov 2024 16:50:55 +0700 Subject: [PATCH 15/27] revert: do not run test on push (#2323) --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5092d32ede..c26e8e5289 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,12 @@ on: branches: - master - 'v[0-9]+\.[0-9]+-dev' + push: + branches: + - master + - 'v[0-9]+\.[0-9]+-dev' + schedule: + - cron: "30 4 * * *" concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 0d0f477f5d076587b946ce54032ca9a2c9142e8e Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 21 Nov 2024 18:26:29 +0700 Subject: [PATCH 16/27] fix(dashmate): various ZeroSSL cert verification errors (#2339) --- .../obtainZeroSSLCertificateTaskFactory.js | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js index 71d7b7809b..0cecce0fc5 100644 --- a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js @@ -173,29 +173,54 @@ export default function obtainZeroSSLCertificateTaskFactory( skip: (ctx) => ctx.certificate && !['pending_validation', 'draft'].includes(ctx.certificate.status), task: async (ctx, task) => { let retry; + let autoRetryCount = 0; + const MAX_AUTO_RETRIES = 3; // Adjust based on requirements do { try { await verifyDomain(ctx.certificate.id, ctx.apiKey); } catch (e) { - if (ctx.noRetry !== true) { - retry = await task.prompt({ - type: 'toggle', - header: chalk` An error occurred during verification: {red ${e.message}} + // Error: The given certificate is not ready for domain verification + // Sometimes this error means that certificate is already verified + if (e.code === 2831) { + const certificate = await getCertificate(ctx.apiKey, ctx.certificate.id); + // Just proceed on certificate download if we see it's already issued. + if (certificate.status === 'issued') { + return; + } + } + + if (e.type === 'domain_control_validation_failed') { + // Retry on this undocumented error whatever it means + if (autoRetryCount >= MAX_AUTO_RETRIES) { + throw e; + } + autoRetryCount++; + if (process.env.DEBUG) { + // eslint-disable-next-line no-console + console.warn(`Retry ${autoRetryCount}/${MAX_AUTO_RETRIES} verification due to domain_control_validation_failed error`); + } + await wait(5000); + } else { + if (ctx.noRetry !== true) { + retry = await task.prompt({ + type: 'toggle', + header: chalk` An error occurred during verification: {red ${e.message}} Please ensure that port 80 on your public IP address ${ctx.externalIp} is open for incoming HTTP connections. You may need to configure your firewall to ensure this port is accessible from the public internet. If you are using Network Address Translation (NAT), please enable port forwarding for port 80 and all Dash service ports listed above.`, - message: 'Try again?', - enabled: 'Yes', - disabled: 'No', - initial: true, - }); - } + message: 'Try again?', + enabled: 'Yes', + disabled: 'No', + initial: true, + }); + } - if (!retry) { - throw e; + if (!retry) { + throw e; + } } } } while (retry); From f36588aec5352548fcbb130db5d96c29e53e1367 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 21 Nov 2024 19:49:36 +0700 Subject: [PATCH 17/27] fix(dashmate): container name is already in use (#2341) --- .../src/listr/tasks/ssl/VerificationServer.js | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js b/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js index eba5de00e4..0e7e584f35 100644 --- a/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js +++ b/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js @@ -97,29 +97,36 @@ export default class VerificationServer { await this.dockerPull(image); - try { - this.container = await this.docker.createContainer(opts); - } catch (e) { - if (e.statusCode === 409) { + let retries = 0; + const MAX_RETRIES = 3; + while (!this.container && retries <= MAX_RETRIES) { + try { + this.container = await this.docker.createContainer(opts); + } catch (e) { + // Throw any other error except container name conflict + if (e.statusCode !== 409) { + throw e; + } + + // Container name is already in use + // Remove container const danglingContainer = await this.docker.getContainer(name); - await danglingContainer.remove({ force: true }); try { await danglingContainer.wait(); } catch (waitError) { - // Skip error if container is already removed - if (e.statusCode !== 404) { - throw e; + // Throw any other error except container not found + if (waitError.statusCode !== 404) { + throw waitError; } - } - // Try to create a container one more type - this.container = await this.docker.createContainer(opts); + // Skip error if container is already removed + } } - throw e; + retries++; } this.startedContainers.addContainer(opts.name); From 92dd8f9b411944dd5a98e1c6d17050b7c7dd82a1 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Thu, 21 Nov 2024 20:42:21 +0700 Subject: [PATCH 18/27] fix(drive): nonce already present in past internal error (#2343) --- .../check_tx_verification/v0/mod.rs | 6 +- .../state_transition/processor/v0/mod.rs | 64 ++++++-- .../drive_abci_validation_versions/mod.rs | 2 + .../drive_abci_validation_versions/v1.rs | 1 + .../drive_abci_validation_versions/v2.rs | 1 + .../drive_abci_validation_versions/v3.rs | 1 + .../drive_abci_validation_versions/v4.rs | 147 ++++++++++++++++++ .../rs-platform-version/src/version/v6.rs | 6 +- 8 files changed, 206 insertions(+), 22 deletions(-) create mode 100644 packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/check_tx_verification/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/check_tx_verification/v0/mod.rs index acd1515749..c27387ebaa 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/check_tx_verification/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/check_tx_verification/v0/mod.rs @@ -15,7 +15,7 @@ use crate::error::execution::ExecutionError; use crate::execution::check_tx::CheckTxLevel; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::execution::validation::state_transition::common::asset_lock::proof::verify_is_not_spent::AssetLockProofVerifyIsNotSpent; -use crate::execution::validation::state_transition::processor::v0::{StateTransitionIdentityBalanceValidationV0, StateTransitionBasicStructureValidationV0, StateTransitionNonceValidationV0, StateTransitionIdentityBasedSignatureValidationV0, StateTransitionStructureKnownInStateValidationV0, StateTransitionIsAllowedValidationV0}; +use crate::execution::validation::state_transition::processor::v0::{StateTransitionIdentityBalanceValidationV0, StateTransitionBasicStructureValidationV0, StateTransitionNonceValidationV0, StateTransitionIdentityBasedSignatureValidationV0, StateTransitionStructureKnownInStateValidationV0, StateTransitionIsAllowedValidationV0, StateTransitionHasNonceValidationV0}; use crate::execution::validation::state_transition::ValidationMode; pub(super) fn state_transition_to_execution_event_for_check_tx_v0<'a, C: CoreRPCLike>( @@ -45,7 +45,7 @@ pub(super) fn state_transition_to_execution_event_for_check_tx_v0<'a, C: CoreRPC } // Only identity top up and identity create do not have nonces validation - if state_transition.has_nonces_validation() { + if state_transition.has_nonce_validation(platform_version)? { let result = state_transition.validate_nonces( &platform.into(), platform.state.last_block_info(), @@ -240,7 +240,7 @@ pub(super) fn state_transition_to_execution_event_for_check_tx_v0<'a, C: CoreRPC ) } } else { - if state_transition.has_nonces_validation() { + if state_transition.has_nonce_validation(platform_version)? { let result = state_transition.validate_nonces( &platform.into(), platform.state.last_block_info(), diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs index f1210e3c0f..c3f10fa275 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs @@ -85,7 +85,7 @@ pub(super) fn process_state_transition_v0<'a, C: CoreRPCLike>( }; // Only identity top up and identity create do not have nonces validation - if state_transition.has_nonces_validation() { + if state_transition.has_nonce_validation(platform_version)? { // Validating identity contract nonce, this must happen after validating the signature let result = state_transition.validate_nonces( &platform.into(), @@ -383,12 +383,11 @@ pub(crate) trait StateTransitionNonceValidationV0 { execution_context: &mut StateTransitionExecutionContext, platform_version: &PlatformVersion, ) -> Result; +} - /// True if the state transition validates nonces, either identity nonces or identity contract - /// nonces - fn has_nonces_validation(&self) -> bool { - true - } +pub(crate) trait StateTransitionHasNonceValidationV0 { + /// True if the state transition has nonces validation. + fn has_nonce_validation(&self, platform_version: &PlatformVersion) -> Result; } /// A trait for validating state transitions within a blockchain. @@ -607,17 +606,50 @@ impl StateTransitionNonceValidationV0 for StateTransition { _ => Ok(SimpleConsensusValidationResult::new()), } } +} - fn has_nonces_validation(&self) -> bool { - matches!( - self, - StateTransition::DocumentsBatch(_) - | StateTransition::DataContractCreate(_) - | StateTransition::DataContractUpdate(_) - | StateTransition::IdentityUpdate(_) - | StateTransition::IdentityCreditTransfer(_) - | StateTransition::IdentityCreditWithdrawal(_) - ) +impl StateTransitionHasNonceValidationV0 for StateTransition { + fn has_nonce_validation(&self, platform_version: &PlatformVersion) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .has_nonce_validation + { + 0 => { + let has_nonce_validation = matches!( + self, + StateTransition::DocumentsBatch(_) + | StateTransition::DataContractCreate(_) + | StateTransition::DataContractUpdate(_) + | StateTransition::IdentityUpdate(_) + | StateTransition::IdentityCreditTransfer(_) + | StateTransition::IdentityCreditWithdrawal(_) + ); + + Ok(has_nonce_validation) + } + 1 => { + // Preferably to use match without wildcard arm (_) to avoid missing cases + // in the future when new state transitions are added + let has_nonce_validation = match self { + StateTransition::DocumentsBatch(_) + | StateTransition::DataContractCreate(_) + | StateTransition::DataContractUpdate(_) + | StateTransition::IdentityUpdate(_) + | StateTransition::IdentityCreditTransfer(_) + | StateTransition::IdentityCreditWithdrawal(_) + | StateTransition::MasternodeVote(_) => true, + StateTransition::IdentityCreate(_) | StateTransition::IdentityTopUp(_) => false, + }; + + Ok(has_nonce_validation) + } + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "StateTransition::has_nonce_validation".to_string(), + known_versions: vec![0, 1], + received: version, + })), + } } } diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs index c2044bb829..4bd5ff6269 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs @@ -1,12 +1,14 @@ pub mod v1; pub mod v2; pub mod v3; +pub mod v4; use versioned_feature_core::{FeatureVersion, OptionalFeatureVersion}; #[derive(Clone, Debug, Default)] pub struct DriveAbciValidationVersions { pub state_transitions: DriveAbciStateTransitionValidationVersions, + pub has_nonce_validation: FeatureVersion, pub process_state_transition: FeatureVersion, pub state_transition_to_execution_event_for_check_tx: FeatureVersion, pub penalties: PenaltyAmounts, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs index a617c54afb..20820165d1 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs @@ -131,6 +131,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions = document_update_price_transition_state_validation: 0, }, }, + has_nonce_validation: 0, process_state_transition: 0, state_transition_to_execution_event_for_check_tx: 0, penalties: PenaltyAmounts { diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs index 577fc0c74b..7cd1b59353 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs @@ -131,6 +131,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions = document_update_price_transition_state_validation: 0, }, }, + has_nonce_validation: 0, process_state_transition: 0, state_transition_to_execution_event_for_check_tx: 0, penalties: PenaltyAmounts { diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs index 76197377e6..42f4068cdd 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs @@ -131,6 +131,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions = document_update_price_transition_state_validation: 0, }, }, + has_nonce_validation: 0, process_state_transition: 0, state_transition_to_execution_event_for_check_tx: 0, penalties: PenaltyAmounts { diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs new file mode 100644 index 0000000000..ff70d44107 --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs @@ -0,0 +1,147 @@ +use crate::version::drive_abci_versions::drive_abci_validation_versions::{ + DriveAbciAssetLockValidationVersions, DriveAbciDocumentsStateTransitionValidationVersions, + DriveAbciStateTransitionCommonValidationVersions, DriveAbciStateTransitionValidationVersion, + DriveAbciStateTransitionValidationVersions, DriveAbciValidationConstants, + DriveAbciValidationDataTriggerAndBindingVersions, DriveAbciValidationDataTriggerVersions, + DriveAbciValidationVersions, PenaltyAmounts, +}; + +pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions = + DriveAbciValidationVersions { + state_transitions: DriveAbciStateTransitionValidationVersions { + common_validation_methods: DriveAbciStateTransitionCommonValidationVersions { + asset_locks: DriveAbciAssetLockValidationVersions { + fetch_asset_lock_transaction_output_sync: 0, + verify_asset_lock_is_not_spent_and_has_enough_balance: 0, + }, + validate_identity_public_key_contract_bounds: 0, + validate_identity_public_key_ids_dont_exist_in_state: 0, + validate_identity_public_key_ids_exist_in_state: 0, + validate_state_transition_identity_signed: 0, + validate_unique_identity_public_key_hashes_in_state: 0, + validate_master_key_uniqueness: 0, + validate_simple_pre_check_balance: 0, + }, + max_asset_lock_usage_attempts: 16, + identity_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: Some(0), + identity_signatures: Some(0), + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_top_up_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: None, + state: 0, + transform_into_action: 0, + }, + identity_credit_withdrawal_state_transition: + DriveAbciStateTransitionValidationVersion { + basic_structure: Some(1), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + identity_credit_withdrawal_state_transition_purpose_matches_requirements: 0, + identity_credit_transfer_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + masternode_vote_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: Some(0), + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_create_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: Some(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + contract_update_state_transition: DriveAbciStateTransitionValidationVersion { + basic_structure: None, + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: None, + nonce: Some(0), + state: 0, + transform_into_action: 0, + }, + documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + balance_pre_check: 0, + basic_structure: 0, + advanced_structure: 0, + state: 0, + revision: 0, + transform_into_action: 0, + data_triggers: DriveAbciValidationDataTriggerAndBindingVersions { + bindings: 0, + triggers: DriveAbciValidationDataTriggerVersions { + create_contact_request_data_trigger: 0, + create_domain_data_trigger: 0, + create_identity_data_trigger: 0, + create_feature_flag_data_trigger: 0, + create_masternode_reward_shares_data_trigger: 0, + delete_withdrawal_data_trigger: 0, + reject_data_trigger: 0, + }, + }, + is_allowed: 0, + document_create_transition_structure_validation: 0, + document_delete_transition_structure_validation: 0, + document_replace_transition_structure_validation: 0, + document_transfer_transition_structure_validation: 0, + document_purchase_transition_structure_validation: 0, + document_update_price_transition_structure_validation: 0, + document_create_transition_state_validation: 1, + document_delete_transition_state_validation: 0, + document_replace_transition_state_validation: 0, + document_transfer_transition_state_validation: 0, + document_purchase_transition_state_validation: 0, + document_update_price_transition_state_validation: 0, + }, + }, + has_nonce_validation: 1, + process_state_transition: 0, + state_transition_to_execution_event_for_check_tx: 0, + penalties: PenaltyAmounts { + identity_id_not_correct: 50000000, + unique_key_already_present: 10000000, + validation_of_added_keys_structure_failure: 10000000, + validation_of_added_keys_proof_of_possession_failure: 50000000, + }, + event_constants: DriveAbciValidationConstants { + maximum_vote_polls_to_process: 2, + maximum_contenders_to_consider: 100, + }, + }; diff --git a/packages/rs-platform-version/src/version/v6.rs b/packages/rs-platform-version/src/version/v6.rs index 2b7bec63ba..b282d1b752 100644 --- a/packages/rs-platform-version/src/version/v6.rs +++ b/packages/rs-platform-version/src/version/v6.rs @@ -16,7 +16,7 @@ use crate::version::dpp_versions::DPPVersion; use crate::version::drive_abci_versions::drive_abci_method_versions::v4::DRIVE_ABCI_METHOD_VERSIONS_V4; use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1; use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1; -use crate::version::drive_abci_versions::drive_abci_validation_versions::v3::DRIVE_ABCI_VALIDATION_VERSIONS_V3; +use crate::version::drive_abci_versions::drive_abci_validation_versions::v4::DRIVE_ABCI_VALIDATION_VERSIONS_V4; use crate::version::drive_abci_versions::drive_abci_withdrawal_constants::v2::DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2; use crate::version::drive_abci_versions::DriveAbciVersion; use crate::version::drive_versions::v2::DRIVE_VERSION_V2; @@ -28,14 +28,14 @@ use crate::version::ProtocolVersion; pub const PROTOCOL_VERSION_6: ProtocolVersion = 6; -/// This version will add multisig support and reduce withdrawal burdens +/// This version adds a fix for nonce validation. pub const PLATFORM_V6: PlatformVersion = PlatformVersion { protocol_version: PROTOCOL_VERSION_6, drive: DRIVE_VERSION_V2, drive_abci: DriveAbciVersion { structs: DRIVE_ABCI_STRUCTURE_VERSIONS_V1, methods: DRIVE_ABCI_METHOD_VERSIONS_V4, - validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V3, + validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V4, // Changed to version 4 withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2, query: DRIVE_ABCI_QUERY_VERSIONS_V1, }, From 30c0b17333b2c60b921fbf2bfee1fa9a5284ea12 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 22 Nov 2024 17:00:08 +0700 Subject: [PATCH 19/27] 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 20/27] 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 21/27] 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 22/27] 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, From f8489b802e3f0f922639944b4c73cdd8f85bde79 Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Mon, 25 Nov 2024 09:57:44 +0300 Subject: [PATCH 23/27] fix: document query start after (#2347) --- packages/rs-drive/src/query/mod.rs | 576 +++++++++++++----- packages/rs-drive/tests/query_tests.rs | 532 +++++++++++++++- .../withdrawals/withdrawals-contract.json | 141 +++++ 3 files changed, 1084 insertions(+), 165 deletions(-) create mode 100644 packages/rs-drive/tests/supporting_files/contract/withdrawals/withdrawals-contract.json diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index 7491454a64..f6aa81deb2 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -54,7 +54,7 @@ use dpp::document; use dpp::prelude::Identifier; #[cfg(feature = "server")] use { - crate::{drive::Drive, error::Error::GroveDB, fees::op::LowLevelDriveOperation}, + crate::{drive::Drive, fees::op::LowLevelDriveOperation}, dpp::block::block_info::BlockInfo, }; // Crate-local unconditional imports @@ -141,6 +141,26 @@ pub mod drive_contested_document_query; /// A query to get the block counts of proposers in an epoch pub mod proposer_block_count_query; +#[cfg(any(feature = "server", feature = "verify"))] +/// Represents a starting point for a query based on a specific document. +/// +/// This struct encapsulates all the necessary details to define the starting +/// conditions for a query, including the document to start from, its type, +/// associated index property, and whether the document itself should be included +/// in the query results. +#[derive(Debug, Clone)] +pub struct StartAtDocument<'a> { + /// The document that serves as the starting point for the query. + pub document: Document, + + /// The type of the document, providing metadata about its schema and structure. + pub document_type: DocumentTypeRef<'a>, + + /// Indicates whether the starting document itself should be included in the query results. + /// - `true`: The document is included in the results. + /// - `false`: The document is excluded, and the query starts from the next matching document. + pub included: bool, +} #[cfg(any(feature = "server", feature = "verify"))] /// Internal clauses struct #[derive(Clone, Debug, PartialEq, Default)] @@ -898,7 +918,7 @@ impl<'a> DriveDocumentQuery<'a> { let (starts_at_document, start_at_path_query) = match &self.start_at { None => Ok((None, None)), Some(starts_at) => { - // First if we have a startAt or or startsAfter we must get the element + // First if we have a startAt or startsAfter we must get the element // from the backing store let (start_at_document_path, start_at_document_key) = @@ -970,7 +990,7 @@ impl<'a> DriveDocumentQuery<'a> { vec![&start_at_path_query, &main_path_query], &platform_version.drive.grove_version, ) - .map_err(GroveDB)?; + .map_err(Error::GroveDB)?; merged.query.limit = limit.map(|a| a.saturating_add(1)); Ok(merged) } else { @@ -1252,13 +1272,16 @@ impl<'a> DriveDocumentQuery<'a> { #[cfg(any(feature = "server", feature = "verify"))] /// Returns a `Query` that either starts at or after the given document ID if given. fn inner_query_from_starts_at_for_id( - starts_at_document: &Option<(Document, DocumentTypeRef, &IndexProperty, bool)>, + starts_at_document: Option<&StartAtDocument>, left_to_right: bool, ) -> Query { // We only need items after the start at document let mut inner_query = Query::new_with_direction(left_to_right); - if let Some((document, _, _, included)) = starts_at_document { + if let Some(StartAtDocument { + document, included, .. + }) = starts_at_document + { let start_at_key = document.id().to_vec(); if *included { inner_query.insert_range_from(start_at_key..) @@ -1313,18 +1336,19 @@ impl<'a> DriveDocumentQuery<'a> { #[cfg(any(feature = "server", feature = "verify"))] /// Returns a `Query` that either starts at or after the given document if given. - // We are passing in starts_at_document 4 parameters - // The document - // The document type (borrowed) - // The index property (borrowed) - // if the element itself should be included. ie StartAt vs StartAfter fn inner_query_from_starts_at( - starts_at_document: &Option<(Document, DocumentTypeRef, &IndexProperty, bool)>, + starts_at_document: Option<&StartAtDocument>, + indexed_property: &IndexProperty, left_to_right: bool, platform_version: &PlatformVersion, ) -> Result { let mut inner_query = Query::new_with_direction(left_to_right); - if let Some((document, document_type, indexed_property, included)) = starts_at_document { + if let Some(StartAtDocument { + document, + document_type, + included, + }) = starts_at_document + { // We only need items after the start at document let start_at_key = document.get_raw_for_document_type( indexed_property.name.as_str(), @@ -1357,55 +1381,171 @@ impl<'a> DriveDocumentQuery<'a> { Ok(inner_query) } + #[cfg(any(feature = "server", feature = "verify"))] + fn recursive_create_query( + left_over_index_properties: &[&IndexProperty], + unique: bool, + starts_at_document: Option<&StartAtDocument>, //for key level, included + indexed_property: &IndexProperty, + order_by: Option<&IndexMap>, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match left_over_index_properties.split_first() { + None => Ok(None), + Some((first, left_over)) => { + let left_to_right = if let Some(order_by) = order_by { + order_by + .get(first.name.as_str()) + .map(|order_clause| order_clause.ascending) + .unwrap_or(first.ascending) + } else { + first.ascending + }; + + let mut inner_query = Self::inner_query_from_starts_at( + starts_at_document, + indexed_property, + left_to_right, + platform_version, + )?; + DriveDocumentQuery::recursive_insert_on_query( + &mut inner_query, + left_over, + unique, + starts_at_document, + left_to_right, + order_by, + platform_version, + )?; + Ok(Some(inner_query)) + } + } + } + #[cfg(any(feature = "server", feature = "verify"))] /// Recursively queries as long as there are leftover index properties. + /// The in_start_at_document_sub_path_needing_conditional is interesting. + /// It indicates whether the start at document should be applied as a conditional + /// For example if we have a tree + /// Root + /// ├── model + /// │ ├── sedan + /// │ │ ├── brand_name + /// │ │ │ ├── Honda + /// │ │ │ │ ├── car_type + /// │ │ │ │ │ ├── Accord + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ ├── a47d2... + /// │ │ │ │ │ │ │ ├── e19c8... + /// │ │ │ │ │ │ │ └── f1a7b... + /// │ │ │ │ │ └── Civic + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── b65a7... + /// │ │ │ │ │ │ └── c43de... + /// │ │ │ ├── Toyota + /// │ │ │ │ ├── car_type + /// │ │ │ │ │ ├── Camry + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ └── 1a9d2... + /// │ │ │ │ │ └── Corolla + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── 3f7b4... + /// │ │ │ │ │ │ ├── 4e8fa... + /// │ │ │ │ │ │ └── 9b1c6... + /// │ ├── suv + /// │ │ ├── brand_name + /// │ │ │ ├── Ford* + /// │ │ │ │ ├── car_type* + /// │ │ │ │ │ ├── Escape* + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ ├── 102bc... + /// │ │ │ │ │ │ │ ├── 29f8e... <- Set After this document + /// │ │ │ │ │ │ │ └── 6b1a3... + /// │ │ │ │ │ └── Explorer + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── b2a9d... + /// │ │ │ │ │ │ └── f4d5c... + /// │ │ │ ├── Nissan + /// │ │ │ │ ├── car_type + /// │ │ │ │ │ ├── Rogue + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ ├── 5a9c3... + /// │ │ │ │ │ │ │ └── 7e4b9... + /// │ │ │ │ │ └── Murano + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── 8f6a2... + /// │ │ │ │ │ │ └── 9c7d4... + /// │ ├── truck + /// │ │ ├── brand_name + /// │ │ │ ├── Ford + /// │ │ │ │ ├── car_type + /// │ │ │ │ │ ├── F-150 + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ ├── 72a3b... + /// │ │ │ │ │ │ │ └── 94c8e... + /// │ │ │ │ │ └── Ranger + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── 3f4b1... + /// │ │ │ │ │ │ ├── 6e7d2... + /// │ │ │ │ │ │ └── 8a1f5... + /// │ │ │ ├── Toyota + /// │ │ │ │ ├── car_type + /// │ │ │ │ │ ├── Tundra + /// │ │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ │ ├── 7c9a4... + /// │ │ │ │ │ │ │ └── a5d1e... + /// │ │ │ │ │ └── Tacoma + /// │ │ │ │ │ ├── 0 + /// │ │ │ │ │ │ ├── 1e7f4... + /// │ │ │ │ │ │ └── 6b9d3... + /// + /// let's say we are asking for suv's after 29f8e + /// here the * denotes the area needing a conditional + /// We need a conditional subquery on Ford to say only things after Ford (with Ford included) + /// We need a conditional subquery on Escape to say only things after Escape (with Escape included) fn recursive_insert_on_query( - query: Option<&mut Query>, + query: &mut Query, left_over_index_properties: &[&IndexProperty], unique: bool, - starts_at_document: &Option<(Document, DocumentTypeRef, &IndexProperty, bool)>, //for key level, included + starts_at_document: Option<&StartAtDocument>, //for key level, included default_left_to_right: bool, order_by: Option<&IndexMap>, platform_version: &PlatformVersion, ) -> Result, Error> { match left_over_index_properties.split_first() { None => { - if let Some(query) = query { - match unique { - true => { - query.set_subquery_key(vec![0]); - - // In the case things are NULL we allow to have multiple values - let inner_query = Self::inner_query_from_starts_at_for_id( - starts_at_document, - true, //for ids we always go left to right - ); - query.add_conditional_subquery( - QueryItem::Key(b"".to_vec()), - Some(vec![vec![0]]), - Some(inner_query), - ); - } - false => { - query.set_subquery_key(vec![0]); - // we just get all by document id order ascending - let full_query = Self::inner_query_from_starts_at_for_id( - &None, - default_left_to_right, - ); - query.set_subquery(full_query); - - let inner_query = Self::inner_query_from_starts_at_for_id( - starts_at_document, - default_left_to_right, - ); - - query.add_conditional_subquery( - QueryItem::Key(b"".to_vec()), - Some(vec![vec![0]]), - Some(inner_query), - ); - } + match unique { + true => { + query.set_subquery_key(vec![0]); + + // In the case things are NULL we allow to have multiple values + let inner_query = Self::inner_query_from_starts_at_for_id( + starts_at_document, + true, //for ids we always go left to right + ); + query.add_conditional_subquery( + QueryItem::Key(b"".to_vec()), + Some(vec![vec![0]]), + Some(inner_query), + ); + } + false => { + query.set_subquery_key(vec![0]); + // we just get all by document id order ascending + let full_query = + Self::inner_query_from_starts_at_for_id(None, default_left_to_right); + query.set_subquery(full_query); + + let inner_query = Self::inner_query_from_starts_at_for_id( + starts_at_document, + default_left_to_right, + ); + + query.add_conditional_subquery( + QueryItem::Key(b"".to_vec()), + Some(vec![vec![0]]), + Some(inner_query), + ); } } Ok(None) @@ -1420,79 +1560,223 @@ impl<'a> DriveDocumentQuery<'a> { first.ascending }; - match query { - None => { - let mut inner_query = Self::inner_query_from_starts_at( - starts_at_document, - left_to_right, - platform_version, - )?; - DriveDocumentQuery::recursive_insert_on_query( - Some(&mut inner_query), - left_over, - unique, - starts_at_document, - left_to_right, - order_by, + if let Some(start_at_document_inner) = starts_at_document { + let StartAtDocument { + document, + document_type, + included, + } = start_at_document_inner; + let start_at_key = document + .get_raw_for_document_type( + first.name.as_str(), + *document_type, + None, platform_version, - )?; - Ok(Some(inner_query)) - } - Some(query) => { - if let Some((document, document_type, _indexed_property, included)) = - starts_at_document - { - let start_at_key = document - .get_raw_for_document_type( - first.name.as_str(), - *document_type, - None, - platform_version, - ) - .ok() - .flatten(); - - // We should always include if we have left_over - let non_conditional_included = - !left_over.is_empty() | *included | start_at_key.is_none(); - - let mut non_conditional_query = Self::inner_query_starts_from_key( - start_at_key, - left_to_right, - non_conditional_included, - ); - - DriveDocumentQuery::recursive_insert_on_query( - Some(&mut non_conditional_query), - left_over, - unique, - starts_at_document, - left_to_right, - order_by, - platform_version, - )?; + ) + .ok() + .flatten(); + + // We should always include if we have left_over + let non_conditional_included = + !left_over.is_empty() || *included || start_at_key.is_none(); + + let mut non_conditional_query = Self::inner_query_starts_from_key( + start_at_key.clone(), + left_to_right, + non_conditional_included, + ); + + // We place None here on purpose, this has been well-thought-out + // and should not change. The reason is that the path of the start + // at document is used only on the conditional subquery and not on the + // main query + // for example in the following + // Our query will be with $ownerId == a3f9b81c4d7e6a9f5b1c3e8a2d9c4f7b + // With start after 8f2d5 + // We want to get from 2024-11-17T12:45:00Z + // withdrawal + // ├── $ownerId + // │ ├── a3f9b81c4d7e6a9f5b1c3e8a2d9c4f7b + // │ │ ├── $updatedAt + // │ │ │ ├── 2024-11-17T12:45:00Z <- conditional subquery here + // │ │ │ │ ├── status + // │ │ │ │ │ ├── 0 + // │ │ │ │ │ │ ├── 7a9f1... + // │ │ │ │ │ │ └── 4b8c3... + // │ │ │ │ │ ├── 1 + // │ │ │ │ │ │ ├── 8f2d5... <- start after + // │ │ │ │ │ │ └── 5c1e4... + // │ │ │ │ │ ├── 2 + // │ │ │ │ │ │ ├── 2e7a9... + // │ │ │ │ │ │ └── 1c8b3... + // │ │ │ ├── 2024-11-18T11:25:00Z <- we want all statuses here, so normal subquery, with None as start at document + // │ │ │ │ ├── status + // │ │ │ │ │ ├── 0 + // │ │ │ │ │ │ └── 1a4f2... + // │ │ │ │ │ ├── 2 + // │ │ │ │ │ │ ├── 3e7a9... + // │ │ │ │ │ │ └── 198b4... + // │ ├── b6d7e9c4a5f2b3d8e1a7c9f4b1e8a3f + // │ │ ├── $updatedAt + // │ │ │ ├── 2024-11-17T13:30:00Z + // │ │ │ │ ├── status + // │ │ │ │ │ ├── 0 + // │ │ │ │ │ │ ├── 6d7e2... + // │ │ │ │ │ │ └── 9c7f5... + // │ │ │ │ │ ├── 3 + // │ │ │ │ │ │ ├── 3a9b7... + // │ │ │ │ │ │ └── 8e5c4... + // │ │ │ │ │ ├── 4 + // │ │ │ │ │ │ ├── 1f7a8... + // │ │ │ │ │ │ └── 2c9b3... + // println!("going to call recursive_insert_on_query on non_conditional_query {} with left_over {:?}", non_conditional_query, left_over); + DriveDocumentQuery::recursive_insert_on_query( + &mut non_conditional_query, + left_over, + unique, + None, + left_to_right, + order_by, + platform_version, + )?; - query.set_subquery(non_conditional_query); - } else { - let mut inner_query = Query::new_with_direction(first.ascending); - inner_query.insert_all(); - DriveDocumentQuery::recursive_insert_on_query( - Some(&mut inner_query), - left_over, - unique, - starts_at_document, - left_to_right, - order_by, - platform_version, - )?; - query.set_subquery(inner_query); - } - query.set_subquery_key(first.name.as_bytes().to_vec()); - Ok(None) + DriveDocumentQuery::recursive_conditional_insert_on_query( + &mut non_conditional_query, + start_at_key, + left_over, + unique, + start_at_document_inner, + left_to_right, + order_by, + platform_version, + )?; + + query.set_subquery(non_conditional_query); + } else { + let mut inner_query = Query::new_with_direction(first.ascending); + inner_query.insert_all(); + DriveDocumentQuery::recursive_insert_on_query( + &mut inner_query, + left_over, + unique, + starts_at_document, + left_to_right, + order_by, + platform_version, + )?; + query.set_subquery(inner_query); + } + query.set_subquery_key(first.name.as_bytes().to_vec()); + Ok(None) + } + } + } + + #[cfg(any(feature = "server", feature = "verify"))] + fn recursive_conditional_insert_on_query( + query: &mut Query, + conditional_value: Option>, + left_over_index_properties: &[&IndexProperty], + unique: bool, + starts_at_document: &StartAtDocument, + default_left_to_right: bool, + order_by: Option<&IndexMap>, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match left_over_index_properties.split_first() { + None => { + match unique { + true => { + // In the case things are NULL we allow to have multiple values + let inner_query = Self::inner_query_from_starts_at_for_id( + Some(starts_at_document), + true, //for ids we always go left to right + ); + query.add_conditional_subquery( + QueryItem::Key(b"".to_vec()), + Some(vec![vec![0]]), + Some(inner_query), + ); + } + false => { + let inner_query = Self::inner_query_from_starts_at_for_id( + Some(starts_at_document), + default_left_to_right, + ); + + query.add_conditional_subquery( + QueryItem::Key(conditional_value.unwrap_or_default()), + Some(vec![vec![0]]), + Some(inner_query), + ); } } } + Some((first, left_over)) => { + let left_to_right = if let Some(order_by) = order_by { + order_by + .get(first.name.as_str()) + .map(|order_clause| order_clause.ascending) + .unwrap_or(first.ascending) + } else { + first.ascending + }; + + let StartAtDocument { + document, + document_type, + .. + } = starts_at_document; + + let lower_start_at_key = document + .get_raw_for_document_type( + first.name.as_str(), + *document_type, + None, + platform_version, + ) + .ok() + .flatten(); + + // We include it if we are not unique, + // or if we are unique but the value is empty + let non_conditional_included = !unique || lower_start_at_key.is_none(); + + let mut non_conditional_query = Self::inner_query_starts_from_key( + lower_start_at_key.clone(), + left_to_right, + non_conditional_included, + ); + + DriveDocumentQuery::recursive_insert_on_query( + &mut non_conditional_query, + left_over, + unique, + None, + left_to_right, + order_by, + platform_version, + )?; + + DriveDocumentQuery::recursive_conditional_insert_on_query( + &mut non_conditional_query, + lower_start_at_key, + left_over, + unique, + starts_at_document, + left_to_right, + order_by, + platform_version, + )?; + + query.add_conditional_subquery( + QueryItem::Key(conditional_value.unwrap_or_default()), + Some(vec![first.name.as_bytes().to_vec()]), + Some(non_conditional_query), + ); + } } + Ok(()) } #[cfg(any(feature = "server", feature = "verify"))] @@ -1529,8 +1813,7 @@ impl<'a> DriveDocumentQuery<'a> { !(self .internal_clauses .equal_clauses - .get(field.name.as_str()) - .is_some() + .contains_key(field.name.as_str()) || (last_clause.is_some() && last_clause.unwrap().field == field.name) || (subquery_clause.is_some() && subquery_clause.unwrap().field == field.name)) }) @@ -1569,14 +1852,17 @@ impl<'a> DriveDocumentQuery<'a> { let first_index = index.properties.first().ok_or(Error::Drive( DriveError::CorruptedContractIndexes("index must have properties".to_string()), ))?; // Index must have properties - Self::recursive_insert_on_query( - None, + Self::recursive_create_query( left_over_index_properties.as_slice(), index.unique, - &starts_at_document.map(|(document, included)| { - (document, self.document_type, first_index, included) - }), - first_index.ascending, + starts_at_document + .map(|(document, included)| StartAtDocument { + document, + document_type: self.document_type, + included, + }) + .as_ref(), + first_index, None, platform_version, )? @@ -1614,22 +1900,17 @@ impl<'a> DriveDocumentQuery<'a> { match subquery_clause { None => { - // There is a last_clause, but no subquery_clause, we should use the index property of the last clause - // We need to get the terminal indexes unused by clauses. - let last_index_property = index - .properties - .iter() - .find(|field| where_clause.field == field.name) - .ok_or(Error::Drive(DriveError::CorruptedContractIndexes( - "index must have last_clause field".to_string(), - )))?; Self::recursive_insert_on_query( - Some(&mut query), + &mut query, left_over_index_properties.as_slice(), index.unique, - &starts_at_document.map(|(document, included)| { - (document, self.document_type, last_index_property, included) - }), + starts_at_document + .map(|(document, included)| StartAtDocument { + document, + document_type: self.document_type, + included, + }) + .as_ref(), left_to_right, Some(&self.order_by), platform_version, @@ -1648,20 +1929,17 @@ impl<'a> DriveDocumentQuery<'a> { order_clause.ascending, platform_version, )?; - let last_index_property = index - .properties - .iter() - .find(|field| subquery_where_clause.field == field.name) - .ok_or(Error::Drive(DriveError::CorruptedContractIndexes( - "index must have subquery_clause field".to_string(), - )))?; Self::recursive_insert_on_query( - Some(&mut subquery), + &mut subquery, left_over_index_properties.as_slice(), index.unique, - &starts_at_document.map(|(document, included)| { - (document, self.document_type, last_index_property, included) - }), + starts_at_document + .map(|(document, included)| StartAtDocument { + document, + document_type: self.document_type, + included, + }) + .as_ref(), left_to_right, Some(&self.order_by), platform_version, diff --git a/packages/rs-drive/tests/query_tests.rs b/packages/rs-drive/tests/query_tests.rs index 23d8491885..6bad5144f9 100644 --- a/packages/rs-drive/tests/query_tests.rs +++ b/packages/rs-drive/tests/query_tests.rs @@ -68,15 +68,16 @@ use dpp::document::{DocumentV0Getters, DocumentV0Setters}; use dpp::fee::default_costs::CachedEpochIndexFeeVersions; use dpp::identity::TimestampMillis; use dpp::platform_value; +use dpp::platform_value::string_encoding::Encoding; #[cfg(feature = "server")] use dpp::prelude::DataContract; use dpp::tests::json_document::json_document_to_contract; #[cfg(feature = "server")] use dpp::util::cbor_serializer; -use once_cell::sync::Lazy; - use dpp::version::fee::FeeVersion; use dpp::version::PlatformVersion; +use once_cell::sync::Lazy; +use rand::prelude::StdRng; #[cfg(feature = "server")] use drive::drive::contract::test_helpers::add_init_contracts_structure_operations; @@ -434,12 +435,36 @@ struct Domain { subdomain_rules: SubdomainRules, } +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] +pub struct Withdrawal { + #[serde(rename = "$id")] + pub id: Identifier, // Unique identifier for the withdrawal + + #[serde(rename = "$ownerId")] + pub owner_id: Identifier, // Identity of the withdrawal owner + + #[serde(rename = "$createdAt")] + pub created_at: TimestampMillis, + + #[serde(rename = "$updatedAt")] + pub updated_at: TimestampMillis, + + pub transaction_index: Option, // Optional sequential index of the transaction + pub transaction_sign_height: Option, // Optional Core height on which the transaction was signed + pub amount: u64, // Amount to withdraw (minimum: 1000) + pub core_fee_per_byte: u32, // Fee in Duffs/Byte (minimum: 1, max: 4294967295) + pub pooling: u8, // Pooling level (enum: 0, 1, 2) + pub output_script: Vec, // Byte array (size: 23-25) + pub status: u8, // Status (enum: 0 - Pending, 1 - Signed, etc.) +} + #[cfg(feature = "server")] #[test] fn test_serialization_and_deserialization() { let platform_version = PlatformVersion::latest(); - let domains = Domain::random_domains_in_parent(20, 100, "dash"); + let domains = Domain::random_domains_in_parent(20, None, 100, "dash"); let contract = json_document_to_contract( "tests/supporting_files/contract/dpns/dpns-contract.json", false, @@ -566,8 +591,10 @@ fn test_serialization_and_deserialization_with_null_values() { #[cfg(feature = "server")] impl Domain { /// Creates `count` random names as domain names for the given parent domain + /// If total owners in None it will create a new owner id per domain. fn random_domains_in_parent( count: u32, + total_owners: Option, seed: u64, normalized_parent_domain_name: &str, ) -> Vec { @@ -575,13 +602,29 @@ impl Domain { "tests/supporting_files/contract/family/first-names.txt", ); let mut vec: Vec = Vec::with_capacity(count as usize); + let mut rng = StdRng::seed_from_u64(seed); + + let owners = if let Some(total_owners) = total_owners { + if total_owners == 0 { + return vec![]; + } + (0..total_owners) + .map(|_| Identifier::random_with_rng(&mut rng)) + .collect() + } else { + vec![] + }; - let mut rng = rand::rngs::StdRng::seed_from_u64(seed); for _i in 0..count { let label = first_names.choose(&mut rng).unwrap(); let domain = Domain { id: Identifier::random_with_rng(&mut rng), - owner_id: Identifier::random_with_rng(&mut rng), + owner_id: if let Some(_) = total_owners { + // Pick a random owner from the owners list + *owners.choose(&mut rng).unwrap() + } else { + Identifier::random_with_rng(&mut rng) + }, label: Some(label.clone()), normalized_label: Some(label.to_lowercase()), normalized_parent_domain_name: normalized_parent_domain_name.to_string(), @@ -599,6 +642,75 @@ impl Domain { } } +#[cfg(feature = "server")] +impl Withdrawal { + /// Generate `count` random withdrawals + /// If `total_owners` is provided, assigns withdrawals to random owners from a predefined set. + pub fn random_withdrawals(count: u32, total_owners: Option, seed: u64) -> Vec { + let mut rng = StdRng::seed_from_u64(seed); + + // Generate a list of random owners if `total_owners` is provided + let owners: Vec = if let Some(total) = total_owners { + (0..total) + .map(|_| Identifier::random_with_rng(&mut rng)) + .collect() + } else { + vec![] + }; + + let mut next_transaction_index = 1; // Start transaction index from 1 + + let mut next_timestamp = 1732192259000; + + (0..count) + .map(|_| { + let owner_id = if !owners.is_empty() { + *owners.choose(&mut rng).unwrap() + } else { + Identifier::random_with_rng(&mut rng) + }; + + // Determine the status randomly + let status = if rng.gen_bool(0.5) { + 0 + } else { + rng.gen_range(1..=4) + }; // 0 = Pending, 1-4 = other statuses + + // Determine transaction index and sign height based on status + let (transaction_index, transaction_sign_height) = if status == 0 { + (None, None) // No transaction index or sign height for Pending status + } else { + let index = next_transaction_index; + next_transaction_index += 1; // Increment index for next withdrawal + (Some(index), Some(rng.gen_range(1..=500000))) // Set sign height only if transaction index is set + }; + + let output_script_length = rng.gen_range(23..=25); + let output_script: Vec = (0..output_script_length).map(|_| rng.gen()).collect(); + + let created_at = next_timestamp; + + next_timestamp += rng.gen_range(0..3) * 2000; + + Withdrawal { + id: Identifier::random_with_rng(&mut rng), + owner_id, + transaction_index, + transaction_sign_height, + amount: rng.gen_range(1000..=1_000_000), // Example range (minimum: 1000) + core_fee_per_byte: 0, // Always 0 + pooling: 0, // Always 0 + output_script, + status, + created_at, + updated_at: created_at, + } + }) + .collect() + } +} + #[cfg(feature = "server")] /// Adds `count` random domain names to the given contract pub fn add_domains_to_contract( @@ -606,10 +718,11 @@ pub fn add_domains_to_contract( contract: &DataContract, transaction: TransactionArg, count: u32, + total_owners: Option, seed: u64, ) { let platform_version = PlatformVersion::latest(); - let domains = Domain::random_domains_in_parent(count, seed, "dash"); + let domains = Domain::random_domains_in_parent(count, total_owners, seed, "dash"); let document_type = contract .document_type_for_name("domain") .expect("expected to get document type"); @@ -641,9 +754,56 @@ pub fn add_domains_to_contract( } } +#[cfg(feature = "server")] +/// Adds `count` random withdrawals to the given contract +pub fn add_withdrawals_to_contract( + drive: &Drive, + contract: &DataContract, + transaction: TransactionArg, + count: u32, + total_owners: Option, + seed: u64, +) { + let platform_version = PlatformVersion::latest(); + let withdrawals = Withdrawal::random_withdrawals(count, total_owners, seed); + let document_type = contract + .document_type_for_name("withdrawal") + .expect("expected to get document type"); + for domain in withdrawals { + let value = platform_value::to_value(domain).expect("expected value"); + let document = + Document::from_platform_value(value, platform_version).expect("expected value"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract, + document_type, + }, + true, + BlockInfo::genesis(), + true, + transaction, + platform_version, + None, + ) + .expect("document should be inserted"); + } +} + #[cfg(feature = "server")] /// Sets up and inserts random domain name data to the DPNS contract to test queries on. -pub fn setup_dpns_tests_with_batches(count: u32, seed: u64) -> (Drive, DataContract) { +pub fn setup_dpns_tests_with_batches( + count: u32, + total_owners: Option, + seed: u64, +) -> (Drive, DataContract) { let drive = setup_drive(Some(DriveConfig::default())); let db_transaction = drive.grove.start_transaction(); @@ -667,7 +827,61 @@ pub fn setup_dpns_tests_with_batches(count: u32, seed: u64) -> (Drive, DataContr Some(&db_transaction), ); - add_domains_to_contract(&drive, &contract, Some(&db_transaction), count, seed); + add_domains_to_contract( + &drive, + &contract, + Some(&db_transaction), + count, + total_owners, + seed, + ); + drive + .grove + .commit_transaction(db_transaction) + .unwrap() + .expect("transaction should be committed"); + + (drive, contract) +} + +#[cfg(feature = "server")] +/// Sets up and inserts random withdrawal to the Withdrawal contract to test queries on. +pub fn setup_withdrawal_tests( + count: u32, + total_owners: Option, + seed: u64, +) -> (Drive, DataContract) { + let drive = setup_drive(Some(DriveConfig::default())); + + let db_transaction = drive.grove.start_transaction(); + + // Create contracts tree + let mut batch = GroveDbOpBatch::new(); + + add_init_contracts_structure_operations(&mut batch); + + let platform_version = PlatformVersion::latest(); + + drive + .grove_apply_batch(batch, false, Some(&db_transaction), &platform_version.drive) + .expect("expected to create contracts tree successfully"); + + // setup code + let contract = setup_contract( + &drive, + "tests/supporting_files/contract/withdrawals/withdrawals-contract.json", + None, + Some(&db_transaction), + ); + + add_withdrawals_to_contract( + &drive, + &contract, + Some(&db_transaction), + count, + total_owners, + seed, + ); drive .grove .commit_transaction(db_transaction) @@ -738,7 +952,7 @@ pub fn setup_dpns_tests_label_not_required(count: u32, seed: u64) -> (Drive, Dat Some(&db_transaction), ); - add_domains_to_contract(&drive, &contract, Some(&db_transaction), count, seed); + add_domains_to_contract(&drive, &contract, Some(&db_transaction), count, None, seed); drive .grove .commit_transaction(db_transaction) @@ -3078,7 +3292,7 @@ fn test_query_with_cached_contract() { #[cfg(feature = "server")] #[test] fn test_dpns_query_contract_verification() { - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -3155,7 +3369,7 @@ fn test_contract_keeps_history_fetch_and_verification() { #[cfg(feature = "server")] #[test] fn test_dpns_query() { - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -3707,7 +3921,7 @@ fn test_dpns_insertion_with_aliases() { #[test] fn test_dpns_query_start_at() { // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -3801,7 +4015,7 @@ fn test_dpns_query_start_at() { #[test] fn test_dpns_query_start_after() { // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -3895,7 +4109,7 @@ fn test_dpns_query_start_after() { #[test] fn test_dpns_query_start_at_desc() { // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -3989,7 +4203,7 @@ fn test_dpns_query_start_at_desc() { #[test] fn test_dpns_query_start_after_desc() { // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); let platform_version = PlatformVersion::latest(); @@ -4465,7 +4679,8 @@ fn test_dpns_query_start_after_with_null_id() { .expect("we should be able to deserialize the document"); let normalized_label_value = document .get("normalizedLabel") - .expect("we should be able to get the first name"); + .cloned() + .unwrap_or(Value::Null); if normalized_label_value.is_null() { String::from("") } else { @@ -4804,6 +5019,291 @@ fn test_dpns_query_start_after_with_null_id_desc() { assert_eq!(results, proof_results); } +#[cfg(feature = "server")] +#[test] +fn test_withdrawals_query_by_owner_id() { + // We create 10 withdrawals owned by 2 identities + let (drive, contract) = setup_withdrawal_tests(10, Some(2), 11456); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + let expected_app_hash = vec![ + 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, + 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + ]; + + assert_eq!(root_hash.as_slice(), expected_app_hash); + + // Document Ids are + // document v0 : id:2kTB6gW4wCCnySj3UFUJQM3aUYBd6qDfLCY74BnWmFKu owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:09 updated_at:2024-11-21 12:31:09 amount:(i64)646767 coreFeePerByte:(i64)0 outputScript:bytes 00952c808390e575c8dd29fc07ccfed7b428e1ec2ffcb23e pooling:(i64)0 status:(i64)1 transactionIndex:(i64)4 transactionSignHeight:(i64)303186 + // document v0 : id:3T4aKmidGKA4ETnWYSedm6ETzrcdkfPL2r3D6eg6CSib owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)971045 coreFeePerByte:(i64)0 outputScript:bytes 525dfc160c160a7a52ef3301a7e55fccf41d73857f50a55a4d pooling:(i64)0 status:(i64)1 transactionIndex:(i64)2 transactionSignHeight:(i64)248787 + // document v0 : id:3X2QfUfR8EeVZQAKmEjcue5xDv3CZXrfPTgXkZ5vQo13 owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)122155 coreFeePerByte:(i64)0 outputScript:bytes f76eb8b953ff41040d906c25a4ae42884bedb41a07fc3a pooling:(i64)0 status:(i64)3 transactionIndex:(i64)7 transactionSignHeight:(i64)310881 + // document v0 : id:5ikeRNwvFekr6ex32B4dLEcCaSsgXXHJBx5rJ2rwuhEV owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:30:59 updated_at:2024-11-21 12:30:59 amount:(i64)725014 coreFeePerByte:(i64)0 outputScript:bytes 51f203a755a7ff25ba8645841f80403ee98134690b2c0dd5e2 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)1 transactionSignHeight:(i64)4072 + // document v0 : id:74giZJn9fNczYRsxxh3wVnktJS1vzTiRWYinKK1rRcyj owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)151943 coreFeePerByte:(i64)0 outputScript:bytes 9db03f4c8a51e4e9855e008aae6121911b4831699c53ed pooling:(i64)0 status:(i64)1 transactionIndex:(i64)5 transactionSignHeight:(i64)343099 + // document v0 : id:8iqDAFxTzHYcmUWtcNnCRoj9Fss4HE1G3GP3HhVAZJhn owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:13 updated_at:2024-11-21 12:31:13 amount:(i64)409642 coreFeePerByte:(i64)0 outputScript:bytes 19fe0a2458a47e1726191f4dc94d11bcfacf821d024043 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)8 transactionSignHeight:(i64)304397 + // document v0 : id:BdH274iP17nhquQVY4KMCAM6nwyPRc8AFJkUT91vxhbc owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:03 updated_at:2024-11-21 12:31:03 amount:(i64)81005 coreFeePerByte:(i64)0 outputScript:bytes 2666e87b6cc7ddf2b63e7e52c348818c05e5562efa48f5 pooling:(i64)0 status:(i64)0 + // document v0 : id:CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)455074 coreFeePerByte:(i64)0 outputScript:bytes acde2e1652771b50a2c68fd330ee1d4b8e115631ce72375432 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)3 transactionSignHeight:(i64)261103 + // document v0 : id:DxFzXvkb2mNQHmeVknsv3gWsc6rMtLk9AsS5zMpy6hou owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:05 updated_at:2024-11-21 12:31:05 amount:(i64)271303 coreFeePerByte:(i64)0 outputScript:bytes 0b845e8c3a4679f1913172f7fd939cc153f458519de8ed3d pooling:(i64)0 status:(i64)0 + // document v0 : id:FDnvFN7e72LcZEojTWNmJTP7uzok3BtvbKnaa5gjqCpW owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)123433 coreFeePerByte:(i64)0 outputScript:bytes 82712473b2d0fc5663afb1a08006913ccccbf38e091a8cc7 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)6 transactionSignHeight:(i64)319518 + + let query_value = json!({ + "where": [ + ["$ownerId", "==", "A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ"] + ], + "limit": 2 + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let domain_document_type = contract + .document_type_for_name("withdrawal") + .expect("contract should have a domain document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + domain_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), domain_document_type, platform_version) + .expect("we should be able to deserialize the document"); + document.id().to_string(Encoding::Base58) + }) + .collect(); + + let a_names = [ + "5ikeRNwvFekr6ex32B4dLEcCaSsgXXHJBx5rJ2rwuhEV".to_string(), + "CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD".to_string(), + ]; + + assert_eq!(names, a_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + +#[cfg(feature = "server")] +#[test] +fn test_withdrawals_query_start_after_query_by_owner_id() { + // We create 10 withdrawals owned by 2 identities + let (drive, contract) = setup_withdrawal_tests(10, Some(2), 11456); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + let expected_app_hash = vec![ + 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, + 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + ]; + + assert_eq!(root_hash.as_slice(), expected_app_hash); + + // Document Ids are + // document v0 : id:2kTB6gW4wCCnySj3UFUJQM3aUYBd6qDfLCY74BnWmFKu owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:09 updated_at:2024-11-21 12:31:09 amount:(i64)646767 coreFeePerByte:(i64)0 outputScript:bytes 00952c808390e575c8dd29fc07ccfed7b428e1ec2ffcb23e pooling:(i64)0 status:(i64)1 transactionIndex:(i64)4 transactionSignHeight:(i64)303186 + // document v0 : id:3T4aKmidGKA4ETnWYSedm6ETzrcdkfPL2r3D6eg6CSib owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)971045 coreFeePerByte:(i64)0 outputScript:bytes 525dfc160c160a7a52ef3301a7e55fccf41d73857f50a55a4d pooling:(i64)0 status:(i64)1 transactionIndex:(i64)2 transactionSignHeight:(i64)248787 + // document v0 : id:3X2QfUfR8EeVZQAKmEjcue5xDv3CZXrfPTgXkZ5vQo13 owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)122155 coreFeePerByte:(i64)0 outputScript:bytes f76eb8b953ff41040d906c25a4ae42884bedb41a07fc3a pooling:(i64)0 status:(i64)3 transactionIndex:(i64)7 transactionSignHeight:(i64)310881 + // document v0 : id:5ikeRNwvFekr6ex32B4dLEcCaSsgXXHJBx5rJ2rwuhEV owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:30:59 updated_at:2024-11-21 12:30:59 amount:(i64)725014 coreFeePerByte:(i64)0 outputScript:bytes 51f203a755a7ff25ba8645841f80403ee98134690b2c0dd5e2 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)1 transactionSignHeight:(i64)4072 + // document v0 : id:74giZJn9fNczYRsxxh3wVnktJS1vzTiRWYinKK1rRcyj owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)151943 coreFeePerByte:(i64)0 outputScript:bytes 9db03f4c8a51e4e9855e008aae6121911b4831699c53ed pooling:(i64)0 status:(i64)1 transactionIndex:(i64)5 transactionSignHeight:(i64)343099 + // document v0 : id:8iqDAFxTzHYcmUWtcNnCRoj9Fss4HE1G3GP3HhVAZJhn owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:13 updated_at:2024-11-21 12:31:13 amount:(i64)409642 coreFeePerByte:(i64)0 outputScript:bytes 19fe0a2458a47e1726191f4dc94d11bcfacf821d024043 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)8 transactionSignHeight:(i64)304397 + // document v0 : id:BdH274iP17nhquQVY4KMCAM6nwyPRc8AFJkUT91vxhbc owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:03 updated_at:2024-11-21 12:31:03 amount:(i64)81005 coreFeePerByte:(i64)0 outputScript:bytes 2666e87b6cc7ddf2b63e7e52c348818c05e5562efa48f5 pooling:(i64)0 status:(i64)0 + // document v0 : id:CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)455074 coreFeePerByte:(i64)0 outputScript:bytes acde2e1652771b50a2c68fd330ee1d4b8e115631ce72375432 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)3 transactionSignHeight:(i64)261103 + // document v0 : id:DxFzXvkb2mNQHmeVknsv3gWsc6rMtLk9AsS5zMpy6hou owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:05 updated_at:2024-11-21 12:31:05 amount:(i64)271303 coreFeePerByte:(i64)0 outputScript:bytes 0b845e8c3a4679f1913172f7fd939cc153f458519de8ed3d pooling:(i64)0 status:(i64)0 + // document v0 : id:FDnvFN7e72LcZEojTWNmJTP7uzok3BtvbKnaa5gjqCpW owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)123433 coreFeePerByte:(i64)0 outputScript:bytes 82712473b2d0fc5663afb1a08006913ccccbf38e091a8cc7 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)6 transactionSignHeight:(i64)319518 + + let query_value = json!({ + "where": [ + ["$ownerId", "==", "A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ"] + ], + "startAfter": "CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD", + "limit": 3, + }); + + // This will use the identity recent index + // { + // "name": "identityRecent", + // "properties": [ + // { + // "$ownerId": "asc" + // }, + // { + // "$updatedAt": "asc" + // }, + // { + // "status": "asc" + // } + // ], + // "unique": false + // }, + + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let domain_document_type = contract + .document_type_for_name("withdrawal") + .expect("contract should have a domain document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + domain_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), domain_document_type, platform_version) + .expect("we should be able to deserialize the document"); + document.id().to_string(Encoding::Base58) + }) + .collect(); + + // We only get back 2 values, even though we put limit 3 because the time with status 0 is an + // empty tree and consumes a limit + let a_names = [ + "DxFzXvkb2mNQHmeVknsv3gWsc6rMtLk9AsS5zMpy6hou".to_string(), + "2kTB6gW4wCCnySj3UFUJQM3aUYBd6qDfLCY74BnWmFKu".to_string(), + ]; + + assert_eq!(names, a_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + +#[cfg(feature = "server")] +#[test] +fn test_withdrawals_query_start_after_query_by_owner_id_desc() { + // We create 10 withdrawals owned by 2 identities + let (drive, contract) = setup_withdrawal_tests(10, Some(2), 11456); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + let expected_app_hash = vec![ + 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, + 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + ]; + + assert_eq!(root_hash.as_slice(), expected_app_hash); + + // Document Ids are + // document v0 : id:2kTB6gW4wCCnySj3UFUJQM3aUYBd6qDfLCY74BnWmFKu owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:09 updated_at:2024-11-21 12:31:09 amount:(i64)646767 coreFeePerByte:(i64)0 outputScript:bytes 00952c808390e575c8dd29fc07ccfed7b428e1ec2ffcb23e pooling:(i64)0 status:(i64)1 transactionIndex:(i64)4 transactionSignHeight:(i64)303186 + // document v0 : id:3T4aKmidGKA4ETnWYSedm6ETzrcdkfPL2r3D6eg6CSib owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)971045 coreFeePerByte:(i64)0 outputScript:bytes 525dfc160c160a7a52ef3301a7e55fccf41d73857f50a55a4d pooling:(i64)0 status:(i64)1 transactionIndex:(i64)2 transactionSignHeight:(i64)248787 + // document v0 : id:3X2QfUfR8EeVZQAKmEjcue5xDv3CZXrfPTgXkZ5vQo13 owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)122155 coreFeePerByte:(i64)0 outputScript:bytes f76eb8b953ff41040d906c25a4ae42884bedb41a07fc3a pooling:(i64)0 status:(i64)3 transactionIndex:(i64)7 transactionSignHeight:(i64)310881 + // document v0 : id:5ikeRNwvFekr6ex32B4dLEcCaSsgXXHJBx5rJ2rwuhEV owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:30:59 updated_at:2024-11-21 12:30:59 amount:(i64)725014 coreFeePerByte:(i64)0 outputScript:bytes 51f203a755a7ff25ba8645841f80403ee98134690b2c0dd5e2 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)1 transactionSignHeight:(i64)4072 + // document v0 : id:74giZJn9fNczYRsxxh3wVnktJS1vzTiRWYinKK1rRcyj owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)151943 coreFeePerByte:(i64)0 outputScript:bytes 9db03f4c8a51e4e9855e008aae6121911b4831699c53ed pooling:(i64)0 status:(i64)1 transactionIndex:(i64)5 transactionSignHeight:(i64)343099 + // document v0 : id:8iqDAFxTzHYcmUWtcNnCRoj9Fss4HE1G3GP3HhVAZJhn owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:13 updated_at:2024-11-21 12:31:13 amount:(i64)409642 coreFeePerByte:(i64)0 outputScript:bytes 19fe0a2458a47e1726191f4dc94d11bcfacf821d024043 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)8 transactionSignHeight:(i64)304397 + // document v0 : id:BdH274iP17nhquQVY4KMCAM6nwyPRc8AFJkUT91vxhbc owner_id:CH1EHBkN5FUuQ7z8ep1abroLPzzYjagvM5XV2NYR3DEh created_at:2024-11-21 12:31:03 updated_at:2024-11-21 12:31:03 amount:(i64)81005 coreFeePerByte:(i64)0 outputScript:bytes 2666e87b6cc7ddf2b63e7e52c348818c05e5562efa48f5 pooling:(i64)0 status:(i64)0 + // document v0 : id:CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:01 updated_at:2024-11-21 12:31:01 amount:(i64)455074 coreFeePerByte:(i64)0 outputScript:bytes acde2e1652771b50a2c68fd330ee1d4b8e115631ce72375432 pooling:(i64)0 status:(i64)3 transactionIndex:(i64)3 transactionSignHeight:(i64)261103 + // document v0 : id:DxFzXvkb2mNQHmeVknsv3gWsc6rMtLk9AsS5zMpy6hou owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:05 updated_at:2024-11-21 12:31:05 amount:(i64)271303 coreFeePerByte:(i64)0 outputScript:bytes 0b845e8c3a4679f1913172f7fd939cc153f458519de8ed3d pooling:(i64)0 status:(i64)0 + // document v0 : id:FDnvFN7e72LcZEojTWNmJTP7uzok3BtvbKnaa5gjqCpW owner_id:A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ created_at:2024-11-21 12:31:11 updated_at:2024-11-21 12:31:11 amount:(i64)123433 coreFeePerByte:(i64)0 outputScript:bytes 82712473b2d0fc5663afb1a08006913ccccbf38e091a8cc7 pooling:(i64)0 status:(i64)4 transactionIndex:(i64)6 transactionSignHeight:(i64)319518 + + let query_value = json!({ + "where": [ + ["$ownerId", "==", "A8GdKdMT7eDvtjnmMXe1Z3YaTtJzZdxNDRkeLb8goFrZ"] + ], + "startAfter": "2kTB6gW4wCCnySj3UFUJQM3aUYBd6qDfLCY74BnWmFKu", + "limit": 3, + "orderBy": [ + ["$updatedAt", "desc"] + ] + }); + + // This will use the identity recent index + // { + // "name": "identityRecent", + // "properties": [ + // { + // "$ownerId": "asc" + // }, + // { + // "$updatedAt": "asc" + // }, + // { + // "status": "asc" + // } + // ], + // "unique": false + // }, + + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let domain_document_type = contract + .document_type_for_name("withdrawal") + .expect("contract should have a domain document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + domain_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), domain_document_type, platform_version) + .expect("we should be able to deserialize the document"); + document.id().to_string(Encoding::Base58) + }) + .collect(); + + // We only get back 2 values, even though we put limit 3 because the time with status 0 is an + // empty tree and consumes a limit + let a_names = [ + "DxFzXvkb2mNQHmeVknsv3gWsc6rMtLk9AsS5zMpy6hou".to_string(), + "CCjaU67Pe79Vt51oXvQ5SkyNiypofNX9DS9PYydN9tpD".to_string(), + ]; + + assert_eq!(names, a_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + #[cfg(feature = "server")] #[test] fn test_query_a_b_c_d_e_contract() { diff --git a/packages/rs-drive/tests/supporting_files/contract/withdrawals/withdrawals-contract.json b/packages/rs-drive/tests/supporting_files/contract/withdrawals/withdrawals-contract.json new file mode 100644 index 0000000000..5e12831bef --- /dev/null +++ b/packages/rs-drive/tests/supporting_files/contract/withdrawals/withdrawals-contract.json @@ -0,0 +1,141 @@ +{ + "$format_version": "0", + "id": "A6Z7WkPjzp8Qe77Av5PNxY2E8JFCYpSVdJ8tZE94PErh", + "ownerId": "B1XbULsStFtFhJoc6qmMKx8a3nH4YCsotupSWoBiFaKr", + "version": 1, + "documentSchemas": { + "withdrawal": { + "description": "Withdrawal document to track underlying withdrawal transactions. Withdrawals should be created with IdentityWithdrawalTransition", + "creationRestrictionMode": 2, + "type": "object", + "indices": [ + { + "name": "identityStatus", + "properties": [ + { + "$ownerId": "asc" + }, + { + "status": "asc" + }, + { + "$createdAt": "asc" + } + ], + "unique": false + }, + { + "name": "identityRecent", + "properties": [ + { + "$ownerId": "asc" + }, + { + "$updatedAt": "asc" + }, + { + "status": "asc" + } + ], + "unique": false + }, + { + "name": "pooling", + "properties": [ + { + "status": "asc" + }, + { + "pooling": "asc" + }, + { + "coreFeePerByte": "asc" + }, + { + "$updatedAt": "asc" + } + ], + "unique": false + }, + { + "name": "transaction", + "properties": [ + { + "status": "asc" + }, + { + "transactionIndex": "asc" + } + ], + "unique": false + } + ], + "properties": { + "transactionIndex": { + "type": "integer", + "description": "Sequential index of asset unlock (withdrawal) transaction. Populated when a withdrawal pooled into withdrawal transaction", + "minimum": 1, + "position": 0 + }, + "transactionSignHeight": { + "type": "integer", + "description": "The Core height on which transaction was signed", + "minimum": 1, + "position": 1 + }, + "amount": { + "type": "integer", + "description": "The amount to be withdrawn", + "minimum": 1000, + "position": 2 + }, + "coreFeePerByte": { + "type": "integer", + "description": "This is the fee that you are willing to spend for this transaction in Duffs/Byte", + "minimum": 1, + "maximum": 4294967295, + "position": 3 + }, + "pooling": { + "type": "integer", + "description": "This indicated the level at which Platform should try to pool this transaction", + "enum": [ + 0, + 1, + 2 + ], + "position": 4 + }, + "outputScript": { + "type": "array", + "byteArray": true, + "minItems": 23, + "maxItems": 25, + "position": 5 + }, + "status": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "description": "0 - Pending, 1 - Signed, 2 - Broadcasted, 3 - Complete, 4 - Expired", + "position": 6 + } + }, + "additionalProperties": false, + "required": [ + "$createdAt", + "$updatedAt", + "amount", + "coreFeePerByte", + "pooling", + "outputScript", + "status" + ] + } + } +} \ No newline at end of file From dd54205a026aaa716b45ebfdba325ac07975d3c5 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Nov 2024 15:32:01 +0700 Subject: [PATCH 24/27] ci: switch release workflow to github runners (#2346) --- .github/workflows/release-docker-image.yml | 11 ++++++++--- Dockerfile | 7 ++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 54e4cb465a..425b8a5f44 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -33,13 +33,13 @@ jobs: build-image: name: Build ${{ matrix.platform }} image runs-on: ${{ matrix.runner }} - timeout-minutes: 25 + timeout-minutes: 180 strategy: matrix: include: - - runner: ["self-hosted", "linux", "x64", "ubuntu-platform"] + - runner: ubuntu-24.04 platform: linux/amd64 - - runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"] + - runner: ubuntu-24.04 platform: linux/arm64 steps: - name: Check out repo @@ -54,6 +54,10 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: ${{ matrix.platform == 'linux/arm64' }} + - name: Build and push by digest uses: ./.github/actions/docker id: docker_build @@ -134,6 +138,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Create manifest list and push working-directory: ${{ env.DIGEST_DIR_PATH }} run: | diff --git a/Dockerfile b/Dockerfile index cdd7211918..b10664e8cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -318,10 +318,7 @@ COPY --parents \ packages/check-features \ /platform/ -RUN if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ - export RELEASE="--release" ; \ - fi && \ - source $HOME/.cargo/env && \ +RUN source $HOME/.cargo/env && \ source /root/env && \ cargo chef prepare $RELEASE --recipe-path recipe.json @@ -335,7 +332,7 @@ SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] WORKDIR /platform -COPY --from=build-planner /platform/recipe.json /platform/.cargo /platform/ +COPY --from=build-planner --parents /platform/recipe.json /platform/.cargo / # Build dependencies - this is the caching Docker layer! RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ From 752b1054acb185fad4bce5ab4d1ed9f3a3872679 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Nov 2024 18:47:43 +0700 Subject: [PATCH 25/27] feat: integrate wallet contract (#2345) Co-authored-by: HashEngineering --- .github/package-filters/js-packages.yml | 5 + .github/package-filters/rs-packages.yml | 5 + .pnp.cjs | 23 + Cargo.lock | 1114 ++++++++++------- Cargo.toml | 2 + Dockerfile | 6 + package.json | 1 + packages/data-contracts/Cargo.toml | 1 + packages/data-contracts/src/error.rs | 17 + packages/data-contracts/src/lib.rs | 10 + .../mod.rs | 2 +- .../v0/mod.rs | 31 + .../system_data_contract_versions/mod.rs | 1 + .../system_data_contract_versions/v1.rs | 1 + packages/wallet-utils-contract/.eslintrc | 18 + packages/wallet-utils-contract/.mocharc.yml | 2 + packages/wallet-utils-contract/Cargo.toml | 13 + packages/wallet-utils-contract/LICENSE | 20 + packages/wallet-utils-contract/README.md | 26 + .../wallet-utils-contract/lib/systemIds.js | 4 + packages/wallet-utils-contract/package.json | 29 + .../v1/wallet-utils-contract-documents.json | 49 + packages/wallet-utils-contract/src/error.rs | 17 + packages/wallet-utils-contract/src/lib.rs | 37 + packages/wallet-utils-contract/src/v1/mod.rs | 21 + packages/wallet-utils-contract/test/.eslintrc | 12 + .../wallet-utils-contract/test/bootstrap.js | 30 + .../test/unit/walletContract.spec.js | 187 +++ yarn.lock | 16 + 29 files changed, 1253 insertions(+), 447 deletions(-) create mode 100644 packages/wallet-utils-contract/.eslintrc create mode 100644 packages/wallet-utils-contract/.mocharc.yml create mode 100644 packages/wallet-utils-contract/Cargo.toml create mode 100644 packages/wallet-utils-contract/LICENSE create mode 100644 packages/wallet-utils-contract/README.md create mode 100644 packages/wallet-utils-contract/lib/systemIds.js create mode 100644 packages/wallet-utils-contract/package.json create mode 100644 packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json create mode 100644 packages/wallet-utils-contract/src/error.rs create mode 100644 packages/wallet-utils-contract/src/lib.rs create mode 100644 packages/wallet-utils-contract/src/v1/mod.rs create mode 100644 packages/wallet-utils-contract/test/.eslintrc create mode 100644 packages/wallet-utils-contract/test/bootstrap.js create mode 100644 packages/wallet-utils-contract/test/unit/walletContract.spec.js diff --git a/.github/package-filters/js-packages.yml b/.github/package-filters/js-packages.yml index d158bb39f6..b42237f81b 100644 --- a/.github/package-filters/js-packages.yml +++ b/.github/package-filters/js-packages.yml @@ -1,3 +1,7 @@ +'@dashevo/wallet-utils-contract': &wallet-utils-contract + - .github/workflows/tests* + - packages/wallet-utils-contract/** + '@dashevo/dashpay-contract': &dashpay-contract - .github/workflows/tests* - packages/dashpay-contract/** @@ -25,6 +29,7 @@ - *masternode-reward-shares-contract - *dpns-contract - *withdrawals-contract + - *wallet-utils-contract - packages/rs-platform-serialization/** - packages/rs-platform-serialization-derive/** - packages/rs-platform-value/** diff --git a/.github/package-filters/rs-packages.yml b/.github/package-filters/rs-packages.yml index f50dea216d..c813323e1d 100644 --- a/.github/package-filters/rs-packages.yml +++ b/.github/package-filters/rs-packages.yml @@ -1,3 +1,7 @@ +wallet-utils-contract: &wallet-utils-contract + - .github/workflows/tests* + - packages/wallet-utils-contract/** + dashpay-contract: &dashpay-contract - .github/workflows/tests* - packages/dashpay-contract/** @@ -25,6 +29,7 @@ dpp: &dpp - *masternode-reward-shares-contract - *dpns-contract - *withdrawals-contract + - *wallet-utils-contract - *json-schema-compatibility-validator - packages/rs-platform-serialization/** - packages/rs-platform-serialization-derive/** diff --git a/.pnp.cjs b/.pnp.cjs index e6e5c001ec..21f4c62f9a 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -69,6 +69,10 @@ const RAW_RUNTIME_STATE = "name": "@dashevo/wallet-lib",\ "reference": "workspace:packages/wallet-lib"\ },\ + {\ + "name": "@dashevo/wallet-utils-contract",\ + "reference": "workspace:packages/wallet-utils-contract"\ + },\ {\ "name": "@dashevo/wasm-dpp",\ "reference": "workspace:packages/wasm-dpp"\ @@ -94,6 +98,7 @@ const RAW_RUNTIME_STATE = ["@dashevo/platform", ["workspace:."]],\ ["@dashevo/platform-test-suite", ["workspace:packages/platform-test-suite"]],\ ["@dashevo/wallet-lib", ["workspace:packages/wallet-lib"]],\ + ["@dashevo/wallet-utils-contract", ["workspace:packages/wallet-utils-contract"]],\ ["@dashevo/wasm-dpp", ["workspace:packages/wasm-dpp"]],\ ["@dashevo/withdrawals-contract", ["workspace:packages/withdrawals-contract"]],\ ["dash", ["workspace:packages/js-dash-sdk"]],\ @@ -3086,6 +3091,24 @@ const RAW_RUNTIME_STATE = "linkType": "SOFT"\ }]\ ]],\ + ["@dashevo/wallet-utils-contract", [\ + ["workspace:packages/wallet-utils-contract", {\ + "packageLocation": "./packages/wallet-utils-contract/",\ + "packageDependencies": [\ + ["@dashevo/wallet-utils-contract", "workspace:packages/wallet-utils-contract"],\ + ["@dashevo/wasm-dpp", "workspace:packages/wasm-dpp"],\ + ["chai", "npm:4.3.10"],\ + ["dirty-chai", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:2.0.1"],\ + ["eslint", "npm:8.53.0"],\ + ["eslint-config-airbnb-base", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:15.0.0"],\ + ["eslint-plugin-import", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:2.29.0"],\ + ["mocha", "npm:10.2.0"],\ + ["sinon", "npm:17.0.1"],\ + ["sinon-chai", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:3.7.0"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ ["@dashevo/wasm-dpp", [\ ["workspace:packages/wasm-dpp", {\ "packageLocation": "./packages/wasm-dpp/",\ diff --git a/Cargo.lock b/Cargo.lock index d2e84d05c4..54155743db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -70,9 +64,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "android-tzdata" @@ -97,9 +91,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -112,49 +106,49 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -167,9 +161,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -196,9 +190,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -207,13 +201,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -224,7 +218,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -235,9 +229,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -266,7 +260,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tower", "tower-layer", @@ -276,9 +270,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -289,7 +283,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -297,21 +291,20 @@ dependencies = [ [[package]] name = "axum-macros" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" dependencies = [ - "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "backon" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fa97bb310c33c811334143cf64c5bb2b7b3c06e453db6b095d7061eff8f113" +checksum = "ba5289ec98f68f28dd809fd601059e6aa908bb8f6108620930828283d4ee23d7" dependencies = [ "fastrand", "gloo-timers", @@ -320,17 +313,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -401,15 +394,15 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.75", + "syn 2.0.89", "which", ] [[package]] name = "bindgen" -version = "0.69.4" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "bitflags 2.6.0", "cexpr", @@ -422,7 +415,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -432,7 +425,7 @@ source = "git+https://github.com/dashpay/rs-bip37-bloom-filter?branch=develop#35 dependencies = [ "bitvec", "murmur3", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -452,9 +445,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitcoin-io" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" [[package]] name = "bitcoin_hashes" @@ -500,7 +493,7 @@ dependencies = [ "arrayvec", "cc", "cfg-if", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] @@ -535,9 +528,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ "borsh-derive", "cfg_aliases", @@ -545,16 +538,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", - "syn_derive", + "syn 2.0.89", ] [[package]] @@ -608,9 +600,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -644,9 +636,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.14" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -770,9 +762,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -780,9 +772,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -792,27 +784,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -835,9 +827,9 @@ dependencies = [ [[package]] name = "console-api" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ed14aa9c9f927213c6e4f3ef75faaad3406134efe84ba2cb7983431d5f0931" +checksum = "8030735ecb0d128428b64cd379809817e620a40e5001c54465b99ec5feec2857" dependencies = [ "futures-core", "prost", @@ -848,9 +840,9 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e3a111a37f3333946ebf9da370ba5c5577b18eb342ec683eb488dd21980302" +checksum = "6539aa9c6a4cd31f4b1c040f860a1eac9aa80e7df6b05d506a6e7179936d6a01" dependencies = [ "console-api", "crossbeam-channel", @@ -886,9 +878,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -906,6 +898,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -914,9 +916,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1040,7 +1042,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1064,9 +1066,9 @@ name = "dapi-grpc-macros" version = "1.5.0" dependencies = [ "dapi-grpc", - "heck 0.5.0", + "heck", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1090,7 +1092,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1101,7 +1103,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1135,7 +1137,7 @@ dependencies = [ "serde", "serde_json", "test-case", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-test", "tokio-util", @@ -1217,7 +1219,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1231,19 +1233,20 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", + "wallet-utils-contract", "withdrawals-contract", ] [[package]] name = "delegate" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5060bb0febb73fa907273f8a7ed17ab4bf831d585eac835b28ec24a1e2460956" +checksum = "bc2323e10c92e1cf4d86e11538512e6dc03ceb586842970b6332af3d4046a046" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1268,13 +1271,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1287,7 +1290,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1307,7 +1310,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", "unicode-xid", ] @@ -1336,7 +1339,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1358,7 +1361,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1407,7 +1410,7 @@ dependencies = [ "sha2", "strum", "test-case", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -1448,7 +1451,7 @@ dependencies = [ "serde_json", "sqlparser", "tempfile", - "thiserror", + "thiserror 1.0.69", "tracing", ] @@ -1498,7 +1501,7 @@ dependencies = [ "strategy-tests", "tempfile", "tenderdash-abci", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -1522,7 +1525,7 @@ dependencies = [ "serde", "serde_json", "tenderdash-abci", - "thiserror", + "thiserror 1.0.69", "tracing", ] @@ -1533,7 +1536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9c8d6ea916fadcd87e3d1ff4802b696d717c83519b47e76f267ab77e536dd5a" dependencies = [ "ed-derive", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1580,9 +1583,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1604,7 +1607,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -1708,7 +1711,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -1718,15 +1721,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "feature-flags-contract" @@ -1735,7 +1738,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1762,12 +1765,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1785,6 +1788,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1839,9 +1848,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1854,9 +1863,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1864,15 +1873,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1881,38 +1890,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1951,9 +1960,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2001,7 +2010,7 @@ dependencies = [ "reqwest", "sha2", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tower-http", @@ -2016,7 +2025,7 @@ checksum = "360f7c8d3b20beafcbf3cde8754bbcfd201ae2a30ec7594a4b9678fd2fa3c7a8" dependencies = [ "integer-encoding", "intmap", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2029,7 +2038,7 @@ dependencies = [ "hex", "integer-encoding", "intmap", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2054,7 +2063,7 @@ dependencies = [ "integer-encoding", "num_cpus", "rand", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -2081,7 +2090,7 @@ dependencies = [ "rocksdb", "strum", "tempfile", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2090,7 +2099,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4be0c1a1ef97068fe93212e7b6f349e0b44a9fc90063c8c28e110cfb8c2fcb2" dependencies = [ - "thiserror", + "thiserror 1.0.69", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2111,14 +2120,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "921b9a29facf9d3f0de667cd1da083a34695ede9e7bfacd74bb5bd29f8f7c178" dependencies = [ "serde", - "serde_with 3.9.0", + "serde_with 3.11.0", ] [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -2165,14 +2174,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", - "allocator-api2", ] [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "hdrhistogram" @@ -2187,12 +2200,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2311,9 +2318,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2329,9 +2336,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -2350,9 +2357,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -2367,9 +2374,9 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ "hyper", "hyper-util", @@ -2396,9 +2403,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2409,7 +2416,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -2437,6 +2443,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2445,12 +2569,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2471,7 +2606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -2501,9 +2636,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -2560,9 +2695,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "jobserver" @@ -2590,7 +2725,7 @@ checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" dependencies = [ "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2602,7 +2737,7 @@ dependencies = [ "json-schema-compatibility-validator", "once_cell", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2663,9 +2798,9 @@ checksum = "744a4c881f502e98c2241d2e5f50040ac73b30194d64452bb6260393b53f0dc9" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libloading" @@ -2683,7 +2818,7 @@ version = "0.16.0+8.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c" dependencies = [ - "bindgen 0.69.4", + "bindgen 0.69.5", "bzip2-sys", "cc", "glob", @@ -2695,9 +2830,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.19" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "pkg-config", @@ -2710,6 +2845,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -2734,18 +2875,18 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.1", ] [[package]] name = "lz4-sys" -version = "1.10.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -2758,7 +2899,7 @@ dependencies = [ "platform-value", "platform-version", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2807,7 +2948,7 @@ dependencies = [ "metrics", "metrics-util", "quanta", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -2849,15 +2990,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -2881,9 +3013,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2" dependencies = [ "cfg-if", "downcast", @@ -2895,14 +3027,14 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -2924,7 +3056,7 @@ dependencies = [ "rustc_version", "smallvec", "tagptr", - "thiserror", + "thiserror 1.0.69", "triomphe", "uuid", ] @@ -2953,7 +3085,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -3037,7 +3169,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -3126,26 +3258,26 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -3155,9 +3287,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -3176,7 +3308,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -3187,9 +3319,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -3205,9 +3337,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -3285,29 +3417,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3327,9 +3459,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "platform-serialization" @@ -3345,7 +3477,7 @@ version = "1.5.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", "virtue 0.0.17", ] @@ -3366,7 +3498,7 @@ dependencies = [ "regex", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "treediff", ] @@ -3375,7 +3507,7 @@ name = "platform-value-convertible" version = "1.5.0" dependencies = [ "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -3385,7 +3517,7 @@ dependencies = [ "bincode", "grovedb-version", "once_cell", - "thiserror", + "thiserror 1.0.69", "versioned-feature-core 1.0.0 (git+https://github.com/dashpay/versioned-feature-core)", ] @@ -3395,7 +3527,7 @@ version = "1.5.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -3413,24 +3545,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -3485,12 +3617,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -3505,50 +3637,27 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit 0.22.22", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -3556,12 +3665,12 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", - "heck 0.5.0", + "heck", "itertools 0.13.0", "log", "multimap", @@ -3571,28 +3680,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.75", + "syn 2.0.89", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "prost-types" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -3679,9 +3788,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] @@ -3708,23 +3817,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -3738,13 +3847,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -3755,9 +3864,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rend" @@ -3809,7 +3918,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -3890,7 +3999,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -3935,18 +4044,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -3957,9 +4066,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" dependencies = [ "log", "once_cell", @@ -3972,38 +4081,36 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.0.1", ] [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -4012,9 +4119,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -4043,11 +4150,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4090,7 +4197,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -4098,9 +4218,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -4114,9 +4234,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -4142,20 +4262,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.126" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b863381a05ffefbc82571a2d893edf47b27fb0ebedbf582c39640e51abebef" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "indexmap 2.6.0", "itoa", @@ -4182,14 +4302,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4224,9 +4344,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", @@ -4236,7 +4356,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "serde_with_macros 3.9.0", + "serde_with_macros 3.11.0", "time", ] @@ -4249,19 +4369,19 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -4397,6 +4517,12 @@ dependencies = [ "log", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strategy-tests" version = "1.5.0" @@ -4437,11 +4563,11 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -4472,38 +4598,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.75", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -4520,6 +4628,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -4527,7 +4646,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4555,9 +4674,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -4578,7 +4697,7 @@ dependencies = [ "semver", "serde_json", "tenderdash-proto", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -4618,7 +4737,7 @@ dependencies = [ "tonic-build", "ureq", "walkdir", - "zip 2.2.0", + "zip 2.2.1", ] [[package]] @@ -4654,7 +4773,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -4665,28 +4784,48 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", "test-case-core", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.3", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] @@ -4730,6 +4869,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinytemplate" version = "1.2.1" @@ -4757,9 +4906,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -4782,7 +4931,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -4852,7 +5001,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -4877,26 +5026,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.6.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow 0.6.20", ] [[package]] @@ -4935,15 +5073,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -5020,7 +5159,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", ] [[package]] @@ -5101,39 +5240,21 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -5159,15 +5280,27 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -5176,9 +5309,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "rand", @@ -5235,6 +5368,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wallet-utils-contract" +version = "1.5.0" +dependencies = [ + "platform-value", + "platform-version", + "serde_json", + "thiserror 1.0.69", +] + [[package]] name = "want" version = "0.3.1" @@ -5271,7 +5414,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -5305,7 +5448,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5333,7 +5476,7 @@ dependencies = [ "serde", "serde-wasm-bindgen", "serde_json", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "wasm-logger", @@ -5363,9 +5506,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -5611,9 +5754,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -5628,9 +5771,21 @@ dependencies = [ "serde", "serde_json", "serde_repr", - "thiserror", + "thiserror 1.0.69", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -5646,6 +5801,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -5664,7 +5843,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure 0.13.1", ] [[package]] @@ -5685,7 +5885,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.89", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", ] [[package]] @@ -5710,9 +5932,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" dependencies = [ "arbitrary", "crc32fast", @@ -5721,7 +5943,7 @@ dependencies = [ "flate2", "indexmap 2.6.0", "memchr", - "thiserror", + "thiserror 2.0.3", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index ab03e80fb4..3b7b503758 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ members = [ "packages/simple-signer", "packages/rs-json-schema-compatibility-validator", "packages/check-features", + "packages/wallet-utils-contract" ] [workspace.package] @@ -37,3 +38,4 @@ rust-version = "1.80" tower-service = { git = "https://github.com/QuantumExplorer/tower", branch = "fix/indexMap2OnV0413" } tower-layer = { git = "https://github.com/QuantumExplorer/tower", branch = "fix/indexMap2OnV0413" } tower = { git = "https://github.com/QuantumExplorer/tower", branch = "fix/indexMap2OnV0413" } + diff --git a/Dockerfile b/Dockerfile index b10664e8cc..c729f240d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -306,6 +306,7 @@ COPY --parents \ packages/masternode-reward-shares-contract \ packages/feature-flags-contract \ packages/dpns-contract \ + packages/wallet-utils-contract \ packages/data-contracts \ packages/strategy-tests \ packages/simple-signer \ @@ -371,6 +372,7 @@ COPY --parents \ packages/rs-platform-value-convertible \ packages/rs-drive-abci \ packages/dashpay-contract \ + packages/wallet-utils-contract \ packages/withdrawals-contract \ packages/masternode-reward-shares-contract \ packages/feature-flags-contract \ @@ -459,6 +461,7 @@ COPY --parents \ packages/wasm-dpp \ packages/dashpay-contract \ packages/withdrawals-contract \ + packages/wallet-utils-contract \ packages/masternode-reward-shares-contract \ packages/feature-flags-contract \ packages/dpns-contract \ @@ -566,6 +569,7 @@ LABEL description="Dashmate Helper Node.JS" WORKDIR /platform +# TODO: Do one COPY with --parents COPY --from=build-dashmate-helper /platform/.yarn /platform/.yarn COPY --from=build-dashmate-helper /platform/package.json /platform/yarn.lock /platform/.yarnrc.yml /platform/.pnp* /platform/ @@ -577,6 +581,7 @@ COPY --from=build-dashmate-helper /platform/packages/js-dapi-client packages/js- COPY --from=build-dashmate-helper /platform/packages/js-grpc-common packages/js-grpc-common COPY --from=build-dashmate-helper /platform/packages/dapi-grpc packages/dapi-grpc COPY --from=build-dashmate-helper /platform/packages/dash-spv packages/dash-spv +COPY --from=build-dashmate-helper /platform/packages/wallet-utils-contract packages/wallet-utils-contract COPY --from=build-dashmate-helper /platform/packages/withdrawals-contract packages/withdrawals-contract COPY --from=build-dashmate-helper /platform/packages/masternode-reward-shares-contract packages/masternode-reward-shares-contract COPY --from=build-dashmate-helper /platform/packages/feature-flags-contract packages/feature-flags-contract @@ -643,6 +648,7 @@ RUN apk add --no-cache zeromq-dev WORKDIR /platform/packages/dapi +# TODO: Do one COPY with --parents COPY --from=build-dapi /platform/.yarn /platform/.yarn COPY --from=build-dapi /platform/package.json /platform/yarn.lock /platform/.yarnrc.yml /platform/.pnp* /platform/ # List of required dependencies. Based on: diff --git a/package.json b/package.json index 0c004c2077..21a1bf6ab4 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "packages/feature-flags-contract", "packages/js-dapi-client", "packages/wallet-lib", + "packages/wallet-utils-contract", "packages/js-dash-sdk", "packages/dapi", "packages/dashmate", diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index 248f8886e2..144edd198f 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -16,3 +16,4 @@ dpns-contract = { path = "../dpns-contract" } dashpay-contract = { path = "../dashpay-contract" } feature-flags-contract = { path = "../feature-flags-contract" } platform-value = { path = "../rs-platform-value" } +wallet-utils-contract = { path = "../wallet-utils-contract" } diff --git a/packages/data-contracts/src/error.rs b/packages/data-contracts/src/error.rs index b9a5dd5d24..0550873b01 100644 --- a/packages/data-contracts/src/error.rs +++ b/packages/data-contracts/src/error.rs @@ -102,3 +102,20 @@ impl From for Error { } } } + +impl From for Error { + fn from(e: wallet_utils_contract::Error) -> Self { + match e { + wallet_utils_contract::Error::UnknownVersionMismatch { + method, + known_versions, + received, + } => Error::UnknownVersionMismatch { + method, + known_versions, + received, + }, + wallet_utils_contract::Error::InvalidSchemaJson(e) => Error::InvalidSchemaJson(e), + } + } +} diff --git a/packages/data-contracts/src/lib.rs b/packages/data-contracts/src/lib.rs index f6761d1eb8..65f324137f 100644 --- a/packages/data-contracts/src/lib.rs +++ b/packages/data-contracts/src/lib.rs @@ -9,6 +9,7 @@ pub use feature_flags_contract; pub use masternode_reward_shares_contract; use platform_value::Identifier; use platform_version::version::PlatformVersion; +pub use wallet_utils_contract; pub use withdrawals_contract; #[repr(u8)] @@ -19,6 +20,7 @@ pub enum SystemDataContract { FeatureFlags = 2, DPNS = 3, Dashpay = 4, + WalletUtils = 5, } pub struct DataContractSource { @@ -37,6 +39,7 @@ impl SystemDataContract { SystemDataContract::FeatureFlags => feature_flags_contract::ID_BYTES, SystemDataContract::DPNS => dpns_contract::ID_BYTES, SystemDataContract::Dashpay => dashpay_contract::ID_BYTES, + SystemDataContract::WalletUtils => wallet_utils_contract::ID_BYTES, }; Identifier::new(bytes) } @@ -82,6 +85,13 @@ impl SystemDataContract { definitions: dashpay_contract::load_definitions(platform_version)?, document_schemas: dashpay_contract::load_documents_schemas(platform_version)?, }, + SystemDataContract::WalletUtils => DataContractSource { + id_bytes: wallet_utils_contract::ID_BYTES, + owner_id_bytes: wallet_utils_contract::OWNER_ID_BYTES, + version: platform_version.system_data_contracts.wallet as u32, + definitions: wallet_utils_contract::load_definitions(platform_version)?, + document_schemas: wallet_utils_contract::load_documents_schemas(platform_version)?, + }, }; Ok(data) diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/mod.rs index 56c1e17c6a..7a101b4e34 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/mod.rs @@ -61,7 +61,7 @@ impl Platform { previous_protocol_version, platform_version, ), - None => return Ok(()), + None => Ok(()), Some(version) => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "perform_events_on_first_block_of_protocol_change".to_string(), known_versions: vec![0], diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs index f5cf202665..d36250ea3e 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs @@ -4,6 +4,8 @@ use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use dpp::block::block_info::BlockInfo; use dpp::dashcore::hashes::Hash; +use dpp::data_contracts::SystemDataContract; +use dpp::system_data_contracts::load_system_data_contract; use dpp::version::PlatformVersion; use dpp::version::ProtocolVersion; use drive::drive::identity::key::fetch::{ @@ -52,6 +54,35 @@ impl Platform { )?; } + if previous_protocol_version < 6 && platform_version.protocol_version >= 6 { + self.transition_to_version_6(block_info, transaction, platform_version)?; + } + + Ok(()) + } + + /// Initializes the wallet contract that supports mobile wallets with additional + /// functionality + /// + /// This function is called during the transition from protocol version 5 to protocol version 6 + /// and higher to set up the wallet contract in the platform. + fn transition_to_version_6( + &self, + block_info: &BlockInfo, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let contract = + load_system_data_contract(SystemDataContract::WalletUtils, platform_version)?; + + self.drive.insert_contract( + &contract, + *block_info, + true, + Some(transaction), + platform_version, + )?; + Ok(()) } diff --git a/packages/rs-platform-version/src/version/system_data_contract_versions/mod.rs b/packages/rs-platform-version/src/version/system_data_contract_versions/mod.rs index 53af3b5ce0..cc444b25e9 100644 --- a/packages/rs-platform-version/src/version/system_data_contract_versions/mod.rs +++ b/packages/rs-platform-version/src/version/system_data_contract_versions/mod.rs @@ -9,4 +9,5 @@ pub struct SystemDataContractVersions { pub dashpay: FeatureVersion, pub masternode_reward_shares: FeatureVersion, pub feature_flags: FeatureVersion, + pub wallet: FeatureVersion, } diff --git a/packages/rs-platform-version/src/version/system_data_contract_versions/v1.rs b/packages/rs-platform-version/src/version/system_data_contract_versions/v1.rs index 205d6fda2a..a55db9a296 100644 --- a/packages/rs-platform-version/src/version/system_data_contract_versions/v1.rs +++ b/packages/rs-platform-version/src/version/system_data_contract_versions/v1.rs @@ -7,4 +7,5 @@ pub const SYSTEM_DATA_CONTRACT_VERSIONS_V1: SystemDataContractVersions = dashpay: 1, masternode_reward_shares: 1, feature_flags: 1, + wallet: 1, }; diff --git a/packages/wallet-utils-contract/.eslintrc b/packages/wallet-utils-contract/.eslintrc new file mode 100644 index 0000000000..cb6c7636b6 --- /dev/null +++ b/packages/wallet-utils-contract/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "airbnb-base", + "rules": { + "no-plusplus": 0, + "eol-last": [ + "error", + "always" + ], + "class-methods-use-this": "off", + "curly": [ + "error", + "all" + ] + }, + "globals": { + "BigInt": true + } +} diff --git a/packages/wallet-utils-contract/.mocharc.yml b/packages/wallet-utils-contract/.mocharc.yml new file mode 100644 index 0000000000..164b941c1b --- /dev/null +++ b/packages/wallet-utils-contract/.mocharc.yml @@ -0,0 +1,2 @@ +require: test/bootstrap.js +recursive: true diff --git a/packages/wallet-utils-contract/Cargo.toml b/packages/wallet-utils-contract/Cargo.toml new file mode 100644 index 0000000000..5286e0e5ea --- /dev/null +++ b/packages/wallet-utils-contract/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "wallet-utils-contract" +description = "Wallet data contract schema and tools" +version = "1.5.0" +edition = "2021" +rust-version.workspace = true +license = "MIT" + +[dependencies] +thiserror = "1.0.64" +platform-version = { path = "../rs-platform-version" } +serde_json = { version = "1.0" } +platform-value = { path = "../rs-platform-value" } diff --git a/packages/wallet-utils-contract/LICENSE b/packages/wallet-utils-contract/LICENSE new file mode 100644 index 0000000000..3be9583375 --- /dev/null +++ b/packages/wallet-utils-contract/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Dash Core Group, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/wallet-utils-contract/README.md b/packages/wallet-utils-contract/README.md new file mode 100644 index 0000000000..ce6b5a6233 --- /dev/null +++ b/packages/wallet-utils-contract/README.md @@ -0,0 +1,26 @@ +# Wallet Utils Contract + +[![Build Status](https://github.com/dashpay/platform/actions/workflows/release.yml/badge.svg)](https://github.com/dashpay/platform/actions/workflows/release.yml) +[![NPM version](https://img.shields.io/npm/v/@dashevo/wallet-contract.svg?style=flat-square)](https://npmjs.org/package/@dashevo/wallet-contract) + +JSON Contracts for Dash Wallet apps + +## Table of Contents + +- [Install](#install) +- [Contributing](#contributing) +- [License](#license) + +## Install + +```sh +npm install @dashevo/wallet-contract +``` + +## Contributing + +Feel free to dive in! [Open an issue](https://github.com/dashpay/platform/issues/new/choose) or submit PRs. + +## License + +[MIT](LICENSE) © Dash Core Group, Inc. diff --git a/packages/wallet-utils-contract/lib/systemIds.js b/packages/wallet-utils-contract/lib/systemIds.js new file mode 100644 index 0000000000..f1aa5b80c0 --- /dev/null +++ b/packages/wallet-utils-contract/lib/systemIds.js @@ -0,0 +1,4 @@ +module.exports = { + ownerId: '11111111111111111111111111111111', + contractId: '7CSFGeF4WNzgDmx94zwvHkYaG3Dx4XEe5LFsFgJswLbm', +}; diff --git a/packages/wallet-utils-contract/package.json b/packages/wallet-utils-contract/package.json new file mode 100644 index 0000000000..fd7ff2fc80 --- /dev/null +++ b/packages/wallet-utils-contract/package.json @@ -0,0 +1,29 @@ +{ + "name": "@dashevo/wallet-utils-contract", + "version": "1.5.0", + "description": "A contract and helper scripts for Wallet DApp", + "scripts": { + "lint": "eslint .", + "test": "yarn run test:unit", + "test:unit": "mocha 'test/unit/**/*.spec.js'" + }, + "contributors": [ + { + "name": "Eric Britten", + "email": "eric.britten@dash.org", + "url": "https://github.com/hashengineering" + } + ], + "license": "MIT", + "devDependencies": { + "@dashevo/wasm-dpp": "workspace:*", + "chai": "^4.3.10", + "dirty-chai": "^2.0.1", + "eslint": "^8.53.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.29.0", + "mocha": "^10.2.0", + "sinon": "^17.0.1", + "sinon-chai": "^3.7.0" + } +} diff --git a/packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json b/packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json new file mode 100644 index 0000000000..b1a012e26f --- /dev/null +++ b/packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json @@ -0,0 +1,49 @@ +{ + "txMetadata": { + "type": "object", + "documentsMutable": true, + "canBeDeleted": true, + "indices": [ + { + "name": "updated", + "properties": [ + { + "$ownerId": "asc" + }, + { + "$updatedAt": "asc" + } + ] + } + ], + "properties": { + "keyIndex": { + "type": "integer", + "minimum": 0, + "description": "The derivation index used to create the encryption key.", + "position": 0 + }, + "encryptionKeyIndex": { + "type": "integer", + "minimum": 0, + "description": "The secondary index used to derive the encryption key that is used to encrypt and decrypt encryptedData.", + "position": 1 + }, + "encryptedMetadata": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 4096, + "description": "encrypted metadata using AES-CBC-256", + "position": 2 + } + }, + "required": [ + "keyIndex", + "encryptionKeyIndex", + "encryptedMetadata", + "$updatedAt" + ], + "additionalProperties": false + } +} diff --git a/packages/wallet-utils-contract/src/error.rs b/packages/wallet-utils-contract/src/error.rs new file mode 100644 index 0000000000..d01bbcc91c --- /dev/null +++ b/packages/wallet-utils-contract/src/error.rs @@ -0,0 +1,17 @@ +use platform_version::version::FeatureVersion; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + /// Platform expected some specific versions + #[error("platform unknown version on {method}, received: {received}")] + UnknownVersionMismatch { + /// method + method: String, + /// the allowed versions for this method + known_versions: Vec, + /// requested core height + received: FeatureVersion, + }, + #[error("schema deserialize error: {0}")] + InvalidSchemaJson(#[from] serde_json::Error), +} diff --git a/packages/wallet-utils-contract/src/lib.rs b/packages/wallet-utils-contract/src/lib.rs new file mode 100644 index 0000000000..70dafcc26f --- /dev/null +++ b/packages/wallet-utils-contract/src/lib.rs @@ -0,0 +1,37 @@ +mod error; +pub mod v1; + +pub use crate::error::Error; +use platform_value::{Identifier, IdentifierBytes32}; +use platform_version::version::PlatformVersion; +use serde_json::Value; + +pub const ID_BYTES: [u8; 32] = [ + 92, 20, 14, 101, 92, 2, 101, 187, 194, 168, 8, 113, 109, 225, 132, 121, 133, 19, 89, 24, 173, + 81, 205, 253, 11, 118, 102, 75, 169, 91, 163, 124, +]; + +pub const OWNER_ID_BYTES: [u8; 32] = [0; 32]; + +pub const ID: Identifier = Identifier(IdentifierBytes32(ID_BYTES)); +pub const OWNER_ID: Identifier = Identifier(IdentifierBytes32(OWNER_ID_BYTES)); +pub fn load_definitions(platform_version: &PlatformVersion) -> Result, Error> { + match platform_version.system_data_contracts.withdrawals { + 1 => Ok(None), + version => Err(Error::UnknownVersionMismatch { + method: "wallet_contract::load_definitions".to_string(), + known_versions: vec![1], + received: version, + }), + } +} +pub fn load_documents_schemas(platform_version: &PlatformVersion) -> Result { + match platform_version.system_data_contracts.withdrawals { + 1 => v1::load_documents_schemas(), + version => Err(Error::UnknownVersionMismatch { + method: "wallet_contract::load_documents_schemas".to_string(), + known_versions: vec![1], + received: version, + }), + } +} diff --git a/packages/wallet-utils-contract/src/v1/mod.rs b/packages/wallet-utils-contract/src/v1/mod.rs new file mode 100644 index 0000000000..c6e5034231 --- /dev/null +++ b/packages/wallet-utils-contract/src/v1/mod.rs @@ -0,0 +1,21 @@ +use crate::Error; +use serde_json::Value; + +pub mod document_types { + pub mod tx_metadata { + pub const NAME: &str = "tx_metadata"; + + pub mod properties { + pub const KEY_INDEX: &str = "keyIndex"; + pub const ENCRYPTION_KEY_INDEX: &str = "encryptionKeyIndex"; + pub const ENCRYPTED_METADATA: &str = "encryptedMetadata"; + } + } +} + +pub fn load_documents_schemas() -> Result { + serde_json::from_str(include_str!( + "../../schema/v1/wallet-utils-contract-documents.json" + )) + .map_err(Error::InvalidSchemaJson) +} diff --git a/packages/wallet-utils-contract/test/.eslintrc b/packages/wallet-utils-contract/test/.eslintrc new file mode 100644 index 0000000000..720ced7385 --- /dev/null +++ b/packages/wallet-utils-contract/test/.eslintrc @@ -0,0 +1,12 @@ +{ + "env": { + "node": true, + "mocha": true + }, + "rules": { + "import/no-extraneous-dependencies": "off" + }, + "globals": { + "expect": true + } +} diff --git a/packages/wallet-utils-contract/test/bootstrap.js b/packages/wallet-utils-contract/test/bootstrap.js new file mode 100644 index 0000000000..7af04f464d --- /dev/null +++ b/packages/wallet-utils-contract/test/bootstrap.js @@ -0,0 +1,30 @@ +const sinon = require('sinon'); +const sinonChai = require('sinon-chai'); + +const { expect, use } = require('chai'); +const dirtyChai = require('dirty-chai'); + +const { + default: loadWasmDpp, +} = require('@dashevo/wasm-dpp'); + +use(dirtyChai); +use(sinonChai); + +exports.mochaHooks = { + beforeAll: loadWasmDpp, + + beforeEach() { + if (!this.sinon) { + this.sinon = sinon.createSandbox(); + } else { + this.sinon.restore(); + } + }, + + afterEach() { + this.sinon.restore(); + }, +}; + +global.expect = expect; diff --git a/packages/wallet-utils-contract/test/unit/walletContract.spec.js b/packages/wallet-utils-contract/test/unit/walletContract.spec.js new file mode 100644 index 0000000000..5b3efe97af --- /dev/null +++ b/packages/wallet-utils-contract/test/unit/walletContract.spec.js @@ -0,0 +1,187 @@ +const crypto = require('crypto'); + +const { + DashPlatformProtocol, + JsonSchemaError, +} = require('@dashevo/wasm-dpp'); +const generateRandomIdentifier = require('@dashevo/wasm-dpp/lib/test/utils/generateRandomIdentifierAsync'); + +const { expect } = require('chai'); +const walletContractDocumentsSchema = require('../../schema/v1/wallet-utils-contract-documents.json'); + +const expectJsonSchemaError = (validationResult, errorCount = 1) => { + const errors = validationResult.getErrors(); + expect(errors) + .to + .have + .length(errorCount); + + const error = validationResult.getErrors()[0]; + expect(error) + .to + .be + .instanceof(JsonSchemaError); + + return error; +}; + +describe('Wallet Contract', () => { + let dpp; + let dataContract; + let identityId; + + beforeEach(async () => { + dpp = new DashPlatformProtocol( + { generate: () => crypto.randomBytes(32) }, + ); + + identityId = await generateRandomIdentifier(); + + dataContract = dpp.dataContract.create(identityId, BigInt(1), walletContractDocumentsSchema); + }); + + it('should have a valid contract definition', async () => { + expect(() => dpp.dataContract.create(identityId, BigInt(1), walletContractDocumentsSchema)) + .to + .not + .throw(); + }); + + describe('documents', () => { + describe('txMetadata', () => { + let rawTxMetadataDocument; + + beforeEach(() => { + rawTxMetadataDocument = { + keyIndex: 0, + encryptionKeyIndex: 100, + encryptedMetadata: crypto.randomBytes(64), + }; + }); + + describe('keyIndex', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.keyIndex; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('keyIndex'); + }); + + it('should be a non-negative integer', async () => { + rawTxMetadataDocument.keyIndex = -1; + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('encryptionKeyIndex', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.encryptionKeyIndex; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('encryptionKeyIndex'); + }); + + it('should be a non-negative integer', async () => { + rawTxMetadataDocument.encryptionKeyIndex = -1; + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('encryptedMetadata', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.encryptedMetadata; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('encryptedMetadata'); + }); + + it('should be not shorter than 32 bytes', async () => { + rawTxMetadataDocument.encryptedMetadata = crypto.randomBytes(31); + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('minItems'); + expect(error.instancePath) + .to + .equal('/encryptedMetadata'); + }); + + it('should be not longer than 4096 bytes', async () => { + rawTxMetadataDocument.encryptedMetadata = crypto.randomBytes(4097); + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('maxItems'); + expect(error.instancePath) + .to + .equal('/encryptedMetadata'); + }); + }); + + it('should not have additional properties', async () => { + rawTxMetadataDocument.someOtherProperty = 42; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('additionalProperties'); + expect(error.params.additionalProperties) + .to + .deep + .equal(['someOtherProperty']); + }); + + it('should be valid', async () => { + const txMetadata = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + + const result = await txMetadata.validate(dpp.protocolVersion); + + expect(result.isValid()) + .to + .be + .true(); + }); + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index 1ea5015fe3..e9661201c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1935,6 +1935,22 @@ __metadata: languageName: unknown linkType: soft +"@dashevo/wallet-utils-contract@workspace:packages/wallet-utils-contract": + version: 0.0.0-use.local + resolution: "@dashevo/wallet-utils-contract@workspace:packages/wallet-utils-contract" + dependencies: + "@dashevo/wasm-dpp": "workspace:*" + chai: "npm:^4.3.10" + dirty-chai: "npm:^2.0.1" + eslint: "npm:^8.53.0" + eslint-config-airbnb-base: "npm:^15.0.0" + eslint-plugin-import: "npm:^2.29.0" + mocha: "npm:^10.2.0" + sinon: "npm:^17.0.1" + sinon-chai: "npm:^3.7.0" + languageName: unknown + linkType: soft + "@dashevo/wasm-dpp@workspace:*, @dashevo/wasm-dpp@workspace:packages/wasm-dpp": version: 0.0.0-use.local resolution: "@dashevo/wasm-dpp@workspace:packages/wasm-dpp" From c913fdaf93addf42a5f9b47da3b0607b55ab2e0a Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Nov 2024 19:06:09 +0700 Subject: [PATCH 26/27] fix(dashmate): failing doctor with drive metrics enabled (#2348) --- .../src/listr/tasks/doctor/collectSamplesTaskFactory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js index 3909edff78..b36def7246 100644 --- a/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js @@ -296,7 +296,7 @@ export default function collectSamplesTaskFactory( // eslint-disable-next-line no-param-reassign task.output = 'Reading Drive metrics'; - const url = `http://${config.get('platform.drive.abci.rpc.host')}:${config.get('platform.drive.abci.rpc.port')}/metrics`; + const url = `http://${config.get('platform.drive.abci.metrics.host')}:${config.get('platform.drive.abci.metrics.port')}/metrics`; const result = fetchTextOrError(url); From f72bbef9a0241091a518ea0928d1cc42c1c6bfb5 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Nov 2024 20:48:09 +0700 Subject: [PATCH 27/27] chore(release): update changelog and bump version to 1.6.0-dev.1 (#2350) --- CHANGELOG.md | 49 ++++++++++++++++- Cargo.lock | 52 +++++++++---------- package.json | 2 +- packages/bench-suite/package.json | 2 +- packages/check-features/Cargo.toml | 2 +- packages/dapi-grpc/Cargo.toml | 2 +- packages/dapi-grpc/package.json | 2 +- packages/dapi/package.json | 2 +- packages/dash-spv/package.json | 2 +- .../configs/getConfigFileMigrationsFactory.js | 2 + packages/dashmate/package.json | 2 +- packages/dashpay-contract/Cargo.toml | 2 +- packages/dashpay-contract/package.json | 2 +- packages/data-contracts/Cargo.toml | 2 +- packages/dpns-contract/Cargo.toml | 2 +- packages/dpns-contract/package.json | 2 +- packages/feature-flags-contract/Cargo.toml | 2 +- packages/feature-flags-contract/package.json | 2 +- packages/js-dapi-client/package.json | 2 +- packages/js-dash-sdk/package.json | 2 +- packages/js-grpc-common/package.json | 2 +- .../Cargo.toml | 2 +- .../package.json | 2 +- packages/platform-test-suite/package.json | 2 +- packages/rs-dapi-client/Cargo.toml | 2 +- packages/rs-dapi-grpc-macros/Cargo.toml | 2 +- packages/rs-dpp/Cargo.toml | 2 +- packages/rs-drive-abci/Cargo.toml | 2 +- packages/rs-drive-proof-verifier/Cargo.toml | 2 +- packages/rs-drive/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../Cargo.toml | 2 +- packages/rs-platform-serialization/Cargo.toml | 2 +- .../rs-platform-value-convertible/Cargo.toml | 2 +- packages/rs-platform-value/Cargo.toml | 2 +- packages/rs-platform-version/Cargo.toml | 2 +- packages/rs-platform-versioning/Cargo.toml | 2 +- packages/rs-sdk/Cargo.toml | 2 +- packages/simple-signer/Cargo.toml | 2 +- packages/strategy-tests/Cargo.toml | 2 +- packages/wallet-lib/package.json | 2 +- packages/wallet-utils-contract/Cargo.toml | 2 +- packages/wallet-utils-contract/package.json | 2 +- packages/wasm-dpp/Cargo.toml | 2 +- packages/wasm-dpp/package.json | 2 +- packages/withdrawals-contract/Cargo.toml | 2 +- packages/withdrawals-contract/package.json | 2 +- 47 files changed, 120 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bc63c80c9..197c1ef1e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,59 @@ -### [1.5.1](https://github.com/dashpay/platform/compare/v1.5.0...v1.5.1) (2024-11-04) +## [1.6.0-dev.1](https://github.com/dashpay/platform/compare/v1.5.1...v1.6.0-dev.1) (2024-11-25) + + +### Features + +* integrate wallet contract ([#2345](https://github.com/dashpay/platform/issues/2345)) +* **sdk:** fetch many and return metadata and proof to client ([#2331](https://github.com/dashpay/platform/issues/2331)) +* **sdk:** including grovedb proof bytes when error in proof verification ([#2332](https://github.com/dashpay/platform/issues/2332)) + + +### Bug Fixes + +* **dashmate:** container name is already in use ([#2341](https://github.com/dashpay/platform/issues/2341)) +* **dashmate:** failing doctor with drive metrics enabled ([#2348](https://github.com/dashpay/platform/issues/2348)) +* **dashmate:** various ZeroSSL cert verification errors ([#2339](https://github.com/dashpay/platform/issues/2339)) +* document query start after ([#2347](https://github.com/dashpay/platform/issues/2347)) +* **drive:** nonce already present in past internal error ([#2343](https://github.com/dashpay/platform/issues/2343)) + + +### Build System + +* adjust docker build context ([#2336](https://github.com/dashpay/platform/issues/2336)) +* use cargo binstall to speed up builds ([#2321](https://github.com/dashpay/platform/issues/2321)) + + +### Miscellaneous Chores + +* **dashmate:** update Core to 21.2 nightly +* **sdk:** expose proof verifier errors ([#2333](https://github.com/dashpay/platform/issues/2333)) +* **sdk:** vote poll queries encoding ([#2334](https://github.com/dashpay/platform/issues/2334)) + + +### Continuous Integration + +* improve caching ([#2329](https://github.com/dashpay/platform/issues/2329)) +* prebuilt librocksdb in docker image ([#2318](https://github.com/dashpay/platform/issues/2318)) +* run devcontainers workflow only on push to master ([#2295](https://github.com/dashpay/platform/issues/2295)) +* switch release workflow to github runners ([#2346](https://github.com/dashpay/platform/issues/2346)) +* switch test workflow to github runners ([#2319](https://github.com/dashpay/platform/issues/2319)) +* use prebuilt librocksdb in github actions ([#2316](https://github.com/dashpay/platform/issues/2316)) +### Tests + +* hardcoded identity transfers in strategy tests ([#2322](https://github.com/dashpay/platform/issues/2322)) + + +### [1.5.1](https://github.com/dashpay/platform/compare/v1.5.0...v1.5.1) (2024-11-04) + ### Bug Fixes * **drive:** apply batch is not using transaction in `remove_all_votes_given_by_identities` ([#2309](https://github.com/dashpay/platform/issues/2309)) * **drive:** uncommitted state if db transaction fails ([#2305](https://github.com/dashpay/platform/issues/2305)) + ## [1.5.0](https://github.com/dashpay/platform/compare/v1.4.1...v1.5.0) (2024-11-01) ### ⚠ BREAKING CHANGES diff --git a/Cargo.lock b/Cargo.lock index 9830c784da..27dd9589d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -668,7 +668,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "toml", ] @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "dapi-grpc-macros", "futures-core", @@ -1063,7 +1063,7 @@ dependencies = [ [[package]] name = "dapi-grpc-macros" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "dapi-grpc", "heck", @@ -1108,7 +1108,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "arc-swap", "async-trait", @@ -1214,7 +1214,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "platform-value", "platform-version", @@ -1224,7 +1224,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1356,7 +1356,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "platform-value", "platform-version", @@ -1366,7 +1366,7 @@ dependencies = [ [[package]] name = "dpp" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "anyhow", "assert_matches", @@ -1416,7 +1416,7 @@ dependencies = [ [[package]] name = "drive" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "arc-swap", "assert_matches", @@ -1457,7 +1457,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "arc-swap", "assert_matches", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "bincode", "dapi-grpc", @@ -1733,7 +1733,7 @@ checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "feature-flags-contract" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "platform-value", "platform-version", @@ -2730,7 +2730,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "assert_matches", "json-patch", @@ -2894,7 +2894,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "platform-value", "platform-version", @@ -3465,7 +3465,7 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "platform-serialization" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "bincode", "platform-version", @@ -3473,7 +3473,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "proc-macro2", "quote", @@ -3483,7 +3483,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "base64 0.22.1", "bincode", @@ -3504,7 +3504,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "quote", "syn 2.0.89", @@ -3512,7 +3512,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "bincode", "grovedb-version", @@ -3523,7 +3523,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "proc-macro2", "quote", @@ -3986,7 +3986,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "backon", "chrono", @@ -4453,7 +4453,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple-signer" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "base64 0.22.1", "bincode", @@ -4525,7 +4525,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strategy-tests" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "bincode", "dpp", @@ -5370,7 +5370,7 @@ dependencies = [ [[package]] name = "wallet-utils-contract" -version = "1.5.0" +version = "1.6.0-dev.1" dependencies = [ "platform-value", "platform-version", @@ -5461,7 +5461,7 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-dpp" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "anyhow", "async-trait", @@ -5763,7 +5763,7 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "1.5.1" +version = "1.6.0-dev.1" dependencies = [ "num_enum 0.5.11", "platform-value", diff --git a/package.json b/package.json index 967a0f9727..71079f5ed3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "1.5.1", + "version": "1.6.0-dev.1", "private": true, "scripts": { "setup": "yarn install && yarn run build && yarn run configure", diff --git a/packages/bench-suite/package.json b/packages/bench-suite/package.json index 362166e446..07194147f3 100644 --- a/packages/bench-suite/package.json +++ b/packages/bench-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/bench-suite", "private": true, - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/check-features/Cargo.toml b/packages/check-features/Cargo.toml index 8f12fca91f..dd6736e50c 100644 --- a/packages/check-features/Cargo.toml +++ b/packages/check-features/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-features" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/dapi-grpc/Cargo.toml b/packages/dapi-grpc/Cargo.toml index 446de30b50..4821ce056b 100644 --- a/packages/dapi-grpc/Cargo.toml +++ b/packages/dapi-grpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc" description = "GRPC client for Dash Platform" -version = "1.5.1" +version = "1.6.0-dev.1" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index 7f917c9d00..e1e607e61b 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "DAPI GRPC definition file and generated clients", "browser": "browser.js", "main": "node.js", diff --git a/packages/dapi/package.json b/packages/dapi/package.json index b49f84fb35..83aeec225a 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "A decentralized API for the Dash network", "scripts": { "api": "node scripts/api.js", diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index a7b5c17505..504eb20790 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "2.5.1", + "version": "2.6.0-dev.1", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index bed2e0ef2e..e7ae9b67a5 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1035,6 +1035,8 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) '1.6.0': (configFile) => { Object.entries(configFile.configs) .forEach(([, options]) => { + options.platform.drive.abci.docker.image = 'dashpay/drive:1-dev'; + options.platform.dapi.api.docker.image = 'dashpay/dapi:1-dev'; options.core.docker.image = 'dashpay/dashd:22.0.0-rc.1'; }); return configFile; diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 62a7fe591e..bbab4721fb 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Distribution package for Dash node installation", "scripts": { "lint": "eslint .", diff --git a/packages/dashpay-contract/Cargo.toml b/packages/dashpay-contract/Cargo.toml index 186a17e7aa..36b20b6c06 100644 --- a/packages/dashpay-contract/Cargo.toml +++ b/packages/dashpay-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dashpay-contract" description = "DashPay data contract schema and tools" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index 25321078af..b83eb9a8a2 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Reference contract of the DashPay DPA on Dash Evolution", "scripts": { "lint": "eslint .", diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index 1168076570..dd847b2e71 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "data-contracts" description = "Dash Platform system data contracts" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index e24782cdb2..23ef9d8256 100644 --- a/packages/dpns-contract/Cargo.toml +++ b/packages/dpns-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dpns-contract" description = "DPNS data contract schema and tools" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index d86f2c43c5..5f2d25ffe0 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "A contract and helper scripts for DPNS DApp", "scripts": { "lint": "eslint .", diff --git a/packages/feature-flags-contract/Cargo.toml b/packages/feature-flags-contract/Cargo.toml index 2a72038ced..9e9a65d44a 100644 --- a/packages/feature-flags-contract/Cargo.toml +++ b/packages/feature-flags-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "feature-flags-contract" description = "Feature flags data contract schema and tools" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 3079219f55..aa89968e20 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/feature-flags-contract", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Data Contract to store Dash Platform feature flags", "scripts": { "build": "", diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index c9568844c9..de88b0a74f 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-client", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Client library used to access Dash DAPI endpoints", "main": "lib/index.js", "contributors": [ diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index 7702c6759a..30a3397902 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "4.5.1", + "version": "4.6.0-dev.1", "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)", "main": "build/index.js", "unpkg": "dist/dash.min.js", diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index c620755f63..c0669a90fa 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/grpc-common", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Common GRPC library", "main": "index.js", "scripts": { diff --git a/packages/masternode-reward-shares-contract/Cargo.toml b/packages/masternode-reward-shares-contract/Cargo.toml index f2c805e606..146529becf 100644 --- a/packages/masternode-reward-shares-contract/Cargo.toml +++ b/packages/masternode-reward-shares-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "masternode-reward-shares-contract" description = "Masternode reward shares data contract schema and tools" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 85737a8ecb..21402d8958 100644 --- a/packages/masternode-reward-shares-contract/package.json +++ b/packages/masternode-reward-shares-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/masternode-reward-shares-contract", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "A contract and helper scripts for reward sharing", "scripts": { "lint": "eslint .", diff --git a/packages/platform-test-suite/package.json b/packages/platform-test-suite/package.json index 23f0ba377f..01550492f6 100644 --- a/packages/platform-test-suite/package.json +++ b/packages/platform-test-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/platform-test-suite", "private": true, - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Dash Network end-to-end tests", "scripts": { "test": "yarn exec bin/test.sh", diff --git a/packages/rs-dapi-client/Cargo.toml b/packages/rs-dapi-client/Cargo.toml index 847b9403f5..0f3ad4c88f 100644 --- a/packages/rs-dapi-client/Cargo.toml +++ b/packages/rs-dapi-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dapi-client" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" [features] diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index b67219c562..f3fca5cd91 100644 --- a/packages/rs-dapi-grpc-macros/Cargo.toml +++ b/packages/rs-dapi-grpc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc-macros" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" description = "Macros used by dapi-grpc. Internal use only." diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index e9c0eed2d8..09a402cacc 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true authors = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index c8462dc0de..1fa91f030d 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-abci" -version = "1.5.1" +version = "1.6.0-dev.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index 8d783510c5..49d44c078c 100644 --- a/packages/rs-drive-proof-verifier/Cargo.toml +++ b/packages/rs-drive-proof-verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-proof-verifier" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index 337452f7b2..afc459b03b 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "drive" description = "Dash drive built on top of GroveDB" -version = "1.5.1" +version = "1.6.0-dev.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-json-schema-compatibility-validator/Cargo.toml b/packages/rs-json-schema-compatibility-validator/Cargo.toml index 94bb898e93..85bb554577 100644 --- a/packages/rs-json-schema-compatibility-validator/Cargo.toml +++ b/packages/rs-json-schema-compatibility-validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "json-schema-compatibility-validator" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true authors = ["Ivan Shumkov "] diff --git a/packages/rs-platform-serialization-derive/Cargo.toml b/packages/rs-platform-serialization-derive/Cargo.toml index c672d9c6f9..8cb9dfc271 100644 --- a/packages/rs-platform-serialization-derive/Cargo.toml +++ b/packages/rs-platform-serialization-derive/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization-derive" authors = ["Samuel Westrich "] description = "Bincode serialization and deserialization derivations" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-serialization/Cargo.toml b/packages/rs-platform-serialization/Cargo.toml index 6a001eb453..7cc5a69027 100644 --- a/packages/rs-platform-serialization/Cargo.toml +++ b/packages/rs-platform-serialization/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization" authors = ["Samuel Westrich "] description = "Bincode based serialization and deserialization" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value-convertible/Cargo.toml b/packages/rs-platform-value-convertible/Cargo.toml index b67b0183f2..fa088be8cb 100644 --- a/packages/rs-platform-value-convertible/Cargo.toml +++ b/packages/rs-platform-value-convertible/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value-convertible" authors = ["Samuel Westrich "] description = "Convertion to and from platform values" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value/Cargo.toml b/packages/rs-platform-value/Cargo.toml index 00c240ce38..e1f8430584 100644 --- a/packages/rs-platform-value/Cargo.toml +++ b/packages/rs-platform-value/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value" authors = ["Samuel Westrich "] description = "A simple value module" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index 818784b2fa..022bec36c9 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-version" authors = ["Samuel Westrich "] description = "Versioning library for Platform" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-versioning/Cargo.toml b/packages/rs-platform-versioning/Cargo.toml index 2fd6d2ffa3..2dcb011cd5 100644 --- a/packages/rs-platform-versioning/Cargo.toml +++ b/packages/rs-platform-versioning/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-versioning" authors = ["Samuel Westrich "] description = "Version derivation" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index b9b943726c..847f93686f 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-sdk" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" [dependencies] diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index d8f05cb442..5c3cc1fe20 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index ddfadefba0..a8387c0651 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "1.5.1" +version = "1.6.0-dev.1" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index b044abe3b7..fa3a02a8ef 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "8.5.1", + "version": "8.6.0-dev.1", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", diff --git a/packages/wallet-utils-contract/Cargo.toml b/packages/wallet-utils-contract/Cargo.toml index 5286e0e5ea..254be712c6 100644 --- a/packages/wallet-utils-contract/Cargo.toml +++ b/packages/wallet-utils-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wallet-utils-contract" description = "Wallet data contract schema and tools" -version = "1.5.0" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/wallet-utils-contract/package.json b/packages/wallet-utils-contract/package.json index fd7ff2fc80..80f12786a9 100644 --- a/packages/wallet-utils-contract/package.json +++ b/packages/wallet-utils-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-utils-contract", - "version": "1.5.0", + "version": "1.6.0-dev.1", "description": "A contract and helper scripts for Wallet DApp", "scripts": { "lint": "eslint .", diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index 2841e16c81..4545bb2b4d 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index 36c6cc466c..d6bcdccccf 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "The JavaScript implementation of the Dash Platform Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/withdrawals-contract/Cargo.toml b/packages/withdrawals-contract/Cargo.toml index e9be9eb577..84fb6ea4f0 100644 --- a/packages/withdrawals-contract/Cargo.toml +++ b/packages/withdrawals-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "withdrawals-contract" description = "Witdrawals data contract schema and tools" -version = "1.5.1" +version = "1.6.0-dev.1" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index ecefb6502b..a6bd4c082f 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "1.5.1", + "version": "1.6.0-dev.1", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "",