From b4255f50f7872de4f29983eee62bf9a12d4fc2bf Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Fri, 30 Aug 2024 19:27:41 +0700 Subject: [PATCH 1/4] chore(release): update changelog and bump version to 1.2.0 (#2095) --- CHANGELOG.md | 28 +++++++++-- 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 +- .../defaults/getTestnetConfigFactory.js | 1 - .../configs/getConfigFileMigrationsFactory.js | 3 ++ 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 +- 46 files changed, 95 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd142c36cda..f8306af518f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,31 @@ -## [1.2.0-rc.1](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0-rc.1) (2024-08-30) +## [1.2.0](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0) (2024-08-30) -### ⚠ BREAKING CHANGES +### Features + +* **dapi:** serve even if tenderdash is not connected ([#2086](https://github.com/dashpay/platform/issues/2086)) +* **dashmate:** validate SSL certificate files ([#2089](https://github.com/dashpay/platform/issues/2089)) +* platform status endpoint ([#2088](https://github.com/dashpay/platform/issues/2088)) +* script to check which nodes are updated to v1.1 ([#2083](https://github.com/dashpay/platform/issues/2083)) + + +### Bug Fixes + +* **dashmate:** docker-compose version is obsolete ([#2073](https://github.com/dashpay/platform/issues/2073)) +* replay issue when round is 0 on replay. ([#2091](https://github.com/dashpay/platform/issues/2091)) +* security vulnerability in webpack ([#2090](https://github.com/dashpay/platform/issues/2090)) + + +### Miscellaneous Chores + +* **dashmate:** update tenderdash version ([#2093](https://github.com/dashpay/platform/issues/2093)) +* **dashmate:** update tenderdash version to 1.2.0 ([#2078](https://github.com/dashpay/platform/issues/2078)) +* update rust to 1.80 ([#2070](https://github.com/dashpay/platform/issues/2070)) + + + +## [1.2.0-rc.1](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0-rc.1) (2024-08-30) -* replay issue when round is 0 on replay. (#2091) ### Features diff --git a/Cargo.lock b/Cargo.lock index bb388399385..4202127bf14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -781,7 +781,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "toml", ] @@ -1147,7 +1147,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "dapi-grpc-macros", "futures-core", @@ -1163,7 +1163,7 @@ dependencies = [ [[package]] name = "dapi-grpc-macros" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "dapi-grpc", "heck 0.5.0", @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "arc-swap", "async-trait", @@ -1308,7 +1308,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "platform-value", "platform-version", @@ -1318,7 +1318,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1434,7 +1434,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "platform-value", "platform-version", @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "dpp" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "anyhow", "assert_matches", @@ -1496,7 +1496,7 @@ dependencies = [ [[package]] name = "drive" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "arc-swap", "base64 0.22.1", @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "arc-swap", "assert_matches", @@ -1593,7 +1593,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "bincode", "dapi-grpc", @@ -1807,7 +1807,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "feature-flags-contract" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "platform-value", "platform-version", @@ -2751,7 +2751,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "assert_matches", "json-patch", @@ -2924,7 +2924,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "platform-value", "platform-version", @@ -3498,7 +3498,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platform-serialization" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "bincode", "platform-version", @@ -3506,7 +3506,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "proc-macro2", "quote", @@ -3516,7 +3516,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "base64 0.22.1", "bincode", @@ -3537,7 +3537,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "quote", "syn 2.0.75", @@ -3545,7 +3545,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "bincode", "grovedb-version", @@ -3556,7 +3556,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "proc-macro2", "quote", @@ -4169,7 +4169,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "backon", "chrono", @@ -4686,7 +4686,7 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple-signer" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "base64 0.22.1", "bincode", @@ -4777,7 +4777,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "bincode", "dpp", @@ -5821,7 +5821,7 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-dpp" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "anyhow", "async-trait", @@ -6123,7 +6123,7 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "1.2.0-rc.1" +version = "1.2.0" dependencies = [ "num_enum", "platform-value", diff --git a/package.json b/package.json index 7cbc78e6ba2..867ef341a03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 3feeba1dfe3..6ffcf72bf03 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.2.0-rc.1", + "version": "1.2.0", "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 2f9973a4448..4424fda535c 100644 --- a/packages/check-features/Cargo.toml +++ b/packages/check-features/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-features" -version = "1.2.0-rc.1" +version = "1.2.0" 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 1dbb12fa79a..619322f8604 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.2.0-rc.1" +version = "1.2.0" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index 127ee327159..dee6105ae4e 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 2b85b563b68..5cd25232e30 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 d5ccf155a90..a3c91c351c1 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "2.2.0-rc.1", + "version": "2.2.0", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index f7c7baca5cc..a8189912023 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -115,7 +115,6 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { genesis: { chain_id: 'dash-testnet-51', validator_quorum_type: 6, - initial_core_chain_locked_height: 918609, }, }, }, diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index c940d9d252d..5e7763009ca 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -847,6 +847,9 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) if (options.network === NETWORK_MAINNET && name !== 'base') { options.platform.drive.tenderdash.genesis.chain_id = 'evo1'; } + if (options.network === NETWORK_TESTNET) { + delete options.platform.drive.tenderdash.genesis.initial_core_chain_locked_height; + } }); return configFile; }, diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 6ba6ecca3ec..7eb809be737 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 9866c723810..506ba5147c0 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index 2ecf3537199..f3433093c6c 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 abbd512df81..0fb8ca270bb 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index eddaf11afe8..04640230018 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index fd88ea746cb..8f2de0a9ea9 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 b340a0b1a2e..e84ed5c5eda 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.2.0-rc.1" +version = "1.2.0" 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 3365bcef266..3b6830aa494 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.2.0-rc.1", + "version": "1.2.0", "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 731aed66c5c..28fa1c445de 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.2.0-rc.1", + "version": "1.2.0", "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 f409115faed..f74effe667a 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "4.2.0-rc.1", + "version": "4.2.0", "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 7656a64a6d6..33b06aed4dc 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.2.0-rc.1", + "version": "1.2.0", "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 3d79034588a..b9784e87b27 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.2.0-rc.1" +version = "1.2.0" 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 d583e18aa5c..7f42654e1ab 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.2.0-rc.1", + "version": "1.2.0", "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 ca79e84a131..4483fbcdb4f 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.2.0-rc.1", + "version": "1.2.0", "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 990859eb5e9..aa67ac0bf2c 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.2.0-rc.1" +version = "1.2.0" edition = "2021" [features] diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index 8d7c6a915ad..48b887a01c1 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.2.0-rc.1" +version = "1.2.0" 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 2e8fe009c3b..fe0394492ed 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "1.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true authors = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 9dd8d586b8a..8d3509e1707 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.2.0-rc.1" +version = "1.2.0" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index b1db9dea152..22d4de4bda4 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index b4116add27c..f60700c9ffa 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.2.0-rc.1" +version = "1.2.0" 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 76905d0f9b1..28533ae2d90 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.2.0-rc.1" +version = "1.2.0" 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 b9beb973d0f..5d77a23fac4 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.2.0-rc.1" +version = "1.2.0" 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 ac5cb91d673..aa090bd2c1d 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.2.0-rc.1" +version = "1.2.0" 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 a027b4f201c..8f4ef3db784 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.2.0-rc.1" +version = "1.2.0" 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 09ec4275828..c5a0266c12c 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.2.0-rc.1" +version = "1.2.0" 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 6f082f32345..f59f96aa15f 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.2.0-rc.1" +version = "1.2.0" 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 8cbda11d645..277009f17c8 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index 07a4b610eb3..ed4fdacd1a7 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-sdk" -version = "1.2.0-rc.1" +version = "1.2.0" edition = "2021" [dependencies] diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index 9bff98c7208..1dfaa156915 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "1.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index 3a88313d9c0..8bf350fda30 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "1.2.0-rc.1" +version = "1.2.0" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index c3984f6701a..849633cf253 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "8.2.0-rc.1", + "version": "8.2.0", "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 4ab4f2e372f..9a7a71206d1 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "1.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index d2567834a08..d4a1cd27d6a 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "1.2.0-rc.1", + "version": "1.2.0", "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 8cfa4a0e0cd..fef63810eca 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.2.0-rc.1" +version = "1.2.0" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index 09bab9ca50f..ba75585db5d 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "1.2.0-rc.1", + "version": "1.2.0", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "", From 0294c9080834e5e0c64f0a363a7e6f57d5f2bbdb Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:44:04 +0200 Subject: [PATCH 2/4] build(drive-abci): debug docker image with grovedb visualizer and tokio console (#2012) --- .cargo/config-release.toml | 11 +++++ .github/workflows/release-docker-image.yml | 47 ++++++++++------------ .github/workflows/release.yml | 37 +++++++++++++++-- Dockerfile | 15 ++++++- package.json | 2 +- packages/rs-drive-abci/Cargo.toml | 5 +-- packages/rs-drive-abci/src/main.rs | 19 +++++++++ 7 files changed, 100 insertions(+), 36 deletions(-) create mode 100644 .cargo/config-release.toml diff --git a/.cargo/config-release.toml b/.cargo/config-release.toml new file mode 100644 index 00000000000..faab5e6c572 --- /dev/null +++ b/.cargo/config-release.toml @@ -0,0 +1,11 @@ +# This is a config file used by Docker build process when building release version of drive-abci. +# Hopefully it can be removed once profile-rustflags is stabilized, see https://github.com/rust-lang/cargo/issues/10271 + +[target.aarch64-unknown-linux-musl] +rustflags = ["-C", "target-feature=-crt-static"] + +[target.x86_64-unknown-linux-musl] +rustflags = ["-C", "target-feature=-crt-static"] + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index a8ed8273ca9..5c56ade272f 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -17,8 +17,16 @@ on: type: string description: Image target. i.e. drive-abci, dapi required: true + tag: + type: string + description: Image tag, i.e. v0.1.0; note it can be inherited from 'workflow_dispatch' event + default: ${{ github.event.inputs.tag || github.event.release.tag_name }} + cargo_profile: + type: string + description: Cargo profile. i.e. release, dev + default: release env: - DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ github.sha }} + DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }} DIGEST_DIR_PATH: /tmp/digests jobs: @@ -29,9 +37,9 @@ jobs: strategy: matrix: include: - - runner: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + - runner: ["self-hosted", "linux", "x64", "ubuntu-platform"] platform: linux/amd64 - - runner: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ] + - runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"] platform: linux/arm64 steps: - name: Check out repo @@ -52,10 +60,10 @@ jobs: with: image_name: ${{ inputs.image_name }} image_org: ${{ inputs.image_org }} - image_version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }} + image_version: ${{ inputs.tag }} target: ${{ inputs.target }} platform: ${{ matrix.platform }} - cargo_profile: release + cargo_profile: ${{ inputs.cargo_profile }} dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} region: ${{ secrets.AWS_REGION }} @@ -92,29 +100,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Get image version - uses: actions/github-script@v6 - id: version - with: - result-encoding: string - script: | - return ( - context.eventName === 'workflow_dispatch' - ? '${{ github.event.inputs.tag }}' - : context.payload.release.tag_name - ); - - name: Set suffix uses: actions/github-script@v6 id: suffix with: result-encoding: string script: | - const fullTag = '${{ steps.version.outputs.result }}'; + const fullTag = '${{ inputs.tag }}'; if (fullTag.includes('-')) { - const [, fullSuffix] = fullTag.split('-'); - const [suffix] = fullSuffix.split('.'); - return `-${suffix}`; + const suffixes = fullTag.split('-').slice(1); + const firstElements = suffixes.map(suffix => suffix.split('.')[0]); + return `-${firstElements.join('-')}`; } else { return ''; } @@ -125,10 +121,10 @@ jobs: with: images: ${{ inputs.image_org }}/${{ inputs.image_name }} tags: | - type=match,pattern=v(\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(\d+.\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ steps.version.outputs.result }} - type=match,pattern=v(.*),group=1,value=${{ steps.version.outputs.result }},suffix= + type=match,pattern=v(.*),group=1,value=${{ inputs.tag }},priority=910,suffix= + type=match,pattern=v(\d+),group=1,value=${{ inputs.tag }} + type=match,pattern=v(\d+.\d+),group=1,value=${{ inputs.tag }} + type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ inputs.tag }} flavor: | suffix=${{ steps.suffix.outputs.result }},onlatest=true latest=${{ github.event_name == 'release' }} @@ -138,7 +134,6 @@ 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/.github/workflows/release.yml b/.github/workflows/release.yml index 036e6ac49c4..3f6f9810a6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,10 @@ on: tag: description: "Version (i.e. v0.22.3-pre.2)" required: true + only_drive: + type: boolean + description: Only build Drive image + default: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -17,7 +21,7 @@ concurrency: jobs: release-npm: name: Release NPM packages - runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ] + runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"] timeout-minutes: 15 if: github.event_name != 'workflow_dispatch' steps: @@ -81,7 +85,7 @@ jobs: with: result-encoding: string script: | - const fullTag = context.payload.release.tag_name; + const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name; if (fullTag.includes('-')) { const [, fullSuffix] = fullTag.split('-'); const [suffix] = fullSuffix.split('.'); @@ -96,10 +100,15 @@ jobs: with: result-encoding: string script: | - const tag = context.payload.release.tag_name; + const tag = "${{ inputs.tag }}" || context.payload.release.tag_name; const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/); return (tag.includes('-') ? `${major}.${minor}-${{steps.suffix.outputs.result}}` : 'latest'); + - name: Show NPM release tag + run: | + echo "NPM suffix: ${{ steps.suffix.outputs.result }}" + echo "NPM release tag: ${{ steps.tag.outputs.result }}" + - name: Configure NPM auth token run: yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }} @@ -136,9 +145,23 @@ jobs: image_org: dashpay image_name: drive target: drive-abci + tag: ${{ inputs.tag || github.event.release.tag_name }} + + release-drive-image-debug: + name: Release Drive debug image + secrets: inherit + uses: ./.github/workflows/release-docker-image.yml + with: + name: Drive + image_org: dashpay + image_name: drive + target: drive-abci + cargo_profile: dev + tag: ${{ inputs.tag || github.event.release.tag_name }}-debug release-dapi-image: name: Release DAPI image + if: ${{ !inputs.only_drive }} secrets: inherit uses: ./.github/workflows/release-docker-image.yml with: @@ -146,9 +169,11 @@ jobs: image_org: dashpay image_name: dapi target: dapi + tag: ${{ inputs.tag || github.event.release.tag_name }} release-test-suite-image: name: Release Test Suite image + if: ${{ !inputs.only_drive }} secrets: inherit uses: ./.github/workflows/release-docker-image.yml with: @@ -156,20 +181,24 @@ jobs: image_org: dashpay image_name: platform-test-suite target: test-suite + tag: ${{ inputs.tag || github.event.release.tag_name }} release-dashmate-helper-image: name: Release Dashmate Helper image secrets: inherit + if: ${{ !inputs.only_drive }} uses: ./.github/workflows/release-docker-image.yml with: name: Dashmate Helper image_org: dashpay image_name: dashmate-helper target: dashmate-helper + tag: ${{ inputs.tag || github.event.release.tag_name }} release-dashmate-packages: name: Release Dashmate packages runs-on: ${{ matrix.os }} + if: ${{ !inputs.only_drive }} needs: release-npm permissions: id-token: write # s3 cache @@ -190,7 +219,7 @@ jobs: - name: Check out repo uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - name: Configure AWS credentials and bucket region uses: aws-actions/configure-aws-credentials@v4 diff --git a/Dockerfile b/Dockerfile index 7d45dee9533..e8ec328bfde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,6 +190,8 @@ RUN touch /platform/packages/dapi-grpc/build.rs # This will prebuild majority of dependencies FROM sources AS build-drive-abci +SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] + ARG SCCACHE_S3_KEY_PREFIX ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl @@ -201,12 +203,21 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ source $HOME/.cargo/env && \ export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ + if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ + mv .cargo/config-release.toml .cargo/config.toml && \ + export OUT_DIRECTORY=release ; \ + else \ + export FEATURES_FLAG="--features=console,grovedbg" ; \ + export OUT_DIRECTORY=debug ; \ + + fi && \ if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ cargo build \ - --profile "$CARGO_BUILD_PROFILE" \ + --profile "${CARGO_BUILD_PROFILE}" \ --package drive-abci \ + ${FEATURES_FLAG} \ --locked && \ - cp /platform/target/*/drive-abci /artifacts/ && \ + cp /platform/target/${OUT_DIRECTORY}/drive-abci /artifacts/ && \ if [[ "${RUSTC_WRAPPER}" == "sccache" ]] ; then sccache --show-stats; fi # diff --git a/package.json b/package.json index 867ef341a03..675284275f1 100644 --- a/package.json +++ b/package.json @@ -94,4 +94,4 @@ "dependencies": { "node-gyp": "^10.0.1" } -} +} \ No newline at end of file diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 8d3509e1707..501620e32ac 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -103,8 +103,8 @@ rocksdb = { version = "0.22.0" } integer-encoding = { version = "4.0.0" } [features] -# TODO: Remove console for production -default = ["mocks", "console"] + +default = ["mocks"] mocks = ["mockall", "drive/fixtures-and-mocks"] console = ["console-subscriber", "tokio/tracing"] testing-config = [] @@ -113,4 +113,3 @@ grovedbg = ["drive/grovedbg"] [[bin]] name = "drive-abci" path = "src/main.rs" -required-features = ["console"] diff --git a/packages/rs-drive-abci/src/main.rs b/packages/rs-drive-abci/src/main.rs index fee28d30861..eae82f9a660 100644 --- a/packages/rs-drive-abci/src/main.rs +++ b/packages/rs-drive-abci/src/main.rs @@ -201,6 +201,12 @@ fn main() -> Result<(), ExitCode> { install_panic_hook(cancel.clone()); // Start runtime in the main thread + tracing::info!( + version = env!("CARGO_PKG_VERSION"), + features = list_enabled_features().join(","), + rust = env!("CARGO_PKG_RUST_VERSION"), + "drive-abci server initializing", + ); let runtime_guard = runtime.enter(); @@ -282,6 +288,19 @@ fn dump_config(config: &PlatformConfig) -> Result<(), String> { Ok(()) } +fn list_enabled_features() -> Vec<&'static str> { + vec![ + #[cfg(feature = "console")] + "console", + #[cfg(feature = "testing-config")] + "testing-config", + #[cfg(feature = "grovedbg")] + "grovedbg", + #[cfg(feature = "mocks")] + "mocks", + ] +} + /// Check status of ABCI server. fn check_status(config: &PlatformConfig) -> Result<(), String> { if let Some(prometheus_addr) = &config.prometheus_bind_address { From 76cfbd9ed7af9fa5ae14ae43a8376575f776b976 Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Wed, 4 Sep 2024 16:06:39 +0700 Subject: [PATCH 3/4] chore: creation of protocol V2 (#2104) --- .../rs-platform-version/src/version/mod.rs | 5 +- .../rs-platform-version/src/version/v2.rs | 1252 +++++++++++++++++ 2 files changed, 1255 insertions(+), 2 deletions(-) create mode 100644 packages/rs-platform-version/src/version/v2.rs diff --git a/packages/rs-platform-version/src/version/mod.rs b/packages/rs-platform-version/src/version/mod.rs index 6422228b1d0..232f8ced5e3 100644 --- a/packages/rs-platform-version/src/version/mod.rs +++ b/packages/rs-platform-version/src/version/mod.rs @@ -1,5 +1,5 @@ mod protocol_version; -use crate::version::v1::PROTOCOL_VERSION_1; +use crate::version::v2::PROTOCOL_VERSION_2; pub use protocol_version::*; pub mod contracts; @@ -12,8 +12,9 @@ mod limits; pub mod mocks; pub mod patches; pub mod v1; +pub mod v2; pub type ProtocolVersion = u32; -pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_1; +pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_2; pub const INITIAL_PROTOCOL_VERSION: ProtocolVersion = 1; diff --git a/packages/rs-platform-version/src/version/v2.rs b/packages/rs-platform-version/src/version/v2.rs new file mode 100644 index 00000000000..91e6e24672e --- /dev/null +++ b/packages/rs-platform-version/src/version/v2.rs @@ -0,0 +1,1252 @@ +use crate::version::contracts::SystemDataContractVersions; +use crate::version::dpp_versions::{ + AssetLockVersions, ContractVersions, CostVersions, DPPMethodVersions, DPPValidationVersions, + DPPVersion, DataContractMethodVersions, DataContractValidationVersions, + DocumentFeatureVersionBounds, DocumentMethodVersions, DocumentTransitionVersions, + DocumentTypeClassMethodVersions, DocumentTypeIndexVersions, DocumentTypeMethodVersions, + DocumentTypeSchemaVersions, DocumentTypeValidationVersions, DocumentTypeVersions, + DocumentVersions, DocumentsBatchTransitionValidationVersions, DocumentsBatchTransitionVersions, + IdentityKeyTypeMethodVersions, IdentityTransitionAssetLockVersions, IdentityTransitionVersions, + IdentityVersions, JsonSchemaValidatorVersions, PublicKeyInCreationMethodVersions, + RecursiveSchemaValidatorVersions, StateTransitionConversionVersions, + StateTransitionMethodVersions, StateTransitionSerializationVersions, StateTransitionVersions, + VotingValidationVersions, VotingVersions, +}; +use crate::version::drive_abci_versions::{ + DriveAbciAssetLockValidationVersions, DriveAbciBlockEndMethodVersions, + DriveAbciBlockFeeProcessingMethodVersions, DriveAbciBlockStartMethodVersions, + DriveAbciCoreBasedUpdatesMethodVersions, DriveAbciCoreChainLockMethodVersionsAndConstants, + DriveAbciCoreInstantSendLockMethodVersions, + DriveAbciDocumentsStateTransitionValidationVersions, DriveAbciEngineMethodVersions, + DriveAbciEpochMethodVersions, DriveAbciFeePoolInwardsDistributionMethodVersions, + DriveAbciFeePoolOutwardsDistributionMethodVersions, + DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, + DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, + DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, + DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, + DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, + DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciStateTransitionCommonValidationVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciStateTransitionValidationVersion, + DriveAbciStateTransitionValidationVersions, DriveAbciStructureVersions, + DriveAbciValidationConstants, DriveAbciValidationDataTriggerAndBindingVersions, + DriveAbciValidationDataTriggerVersions, DriveAbciValidationVersions, DriveAbciVersion, + DriveAbciVotingMethodVersions, PenaltyAmounts, +}; +use crate::version::drive_versions::{ + DriveAssetLockMethodVersions, DriveBalancesMethodVersions, DriveBatchOperationsMethodVersion, + DriveContractApplyMethodVersions, DriveContractCostsMethodVersions, + DriveContractGetMethodVersions, DriveContractInsertMethodVersions, DriveContractMethodVersions, + DriveContractProveMethodVersions, DriveContractUpdateMethodVersions, + DriveCreditPoolEpochsMethodVersions, DriveCreditPoolMethodVersions, + DriveCreditPoolPendingEpochRefundsMethodVersions, + DriveCreditPoolStorageFeeDistributionPoolMethodVersions, + DriveCreditPoolUnpaidEpochMethodVersions, DriveDataContractOperationMethodVersions, + DriveDocumentDeleteMethodVersions, DriveDocumentEstimationCostsMethodVersions, + DriveDocumentIndexUniquenessMethodVersions, DriveDocumentInsertContestedMethodVersions, + DriveDocumentInsertMethodVersions, DriveDocumentMethodVersions, + DriveDocumentQueryMethodVersions, DriveDocumentUpdateMethodVersions, + DriveEstimatedCostsMethodVersions, DriveFeesMethodVersions, DriveFetchMethodVersions, + DriveGroveApplyMethodVersions, DriveGroveBasicMethodVersions, DriveGroveBatchMethodVersions, + DriveGroveCostMethodVersions, DriveGroveMethodVersions, + DriveIdentityContractInfoMethodVersions, DriveIdentityCostEstimationMethodVersions, + DriveIdentityFetchAttributesMethodVersions, DriveIdentityFetchFullIdentityMethodVersions, + DriveIdentityFetchMethodVersions, DriveIdentityFetchPartialIdentityMethodVersions, + DriveIdentityFetchPublicKeyHashesMethodVersions, DriveIdentityInsertMethodVersions, + DriveIdentityKeyHashesToIdentityInsertMethodVersions, DriveIdentityKeysFetchMethodVersions, + DriveIdentityKeysInsertMethodVersions, DriveIdentityKeysMethodVersions, + DriveIdentityKeysProveMethodVersions, DriveIdentityMethodVersions, + DriveIdentityProveMethodVersions, DriveIdentityUpdateMethodVersions, + DriveIdentityWithdrawalDocumentMethodVersions, DriveIdentityWithdrawalMethodVersions, + DriveIdentityWithdrawalTransactionIndexMethodVersions, + DriveIdentityWithdrawalTransactionMethodVersions, + DriveIdentityWithdrawalTransactionQueueMethodVersions, DriveInitializationMethodVersions, + DriveMethodVersions, DriveOperationsMethodVersion, DrivePlatformStateMethodVersions, + DrivePlatformSystemMethodVersions, DrivePrefundedSpecializedMethodVersions, + DriveProtocolUpgradeVersions, DriveProveMethodVersions, + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions, + DriveStateTransitionMethodVersions, DriveStateTransitionOperationMethodVersions, + DriveStructureVersion, DriveSystemEstimationCostsMethodVersions, + DriveVerifyContractMethodVersions, DriveVerifyDocumentMethodVersions, + DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, + DriveVerifySingleDocumentMethodVersions, DriveVerifyStateTransitionMethodVersions, + DriveVerifySystemMethodVersions, DriveVerifyVoteMethodVersions, DriveVersion, + DriveVoteCleanupMethodVersions, DriveVoteContestedResourceInsertMethodVersions, + DriveVoteFetchMethodVersions, DriveVoteInsertMethodVersions, DriveVoteMethodVersions, + DriveVoteSetupMethodVersions, DriveVoteStorageFormMethodVersions, +}; +use crate::version::fee::v1::FEE_VERSION1; +use crate::version::limits::SystemLimits; +use crate::version::protocol_version::{FeatureVersionBounds, PlatformVersion}; +use crate::version::{PlatformArchitectureVersion, ProtocolVersion}; +use grovedb_version::version::v1::GROVE_V1; + +pub const PROTOCOL_VERSION_2: ProtocolVersion = 1; + +pub const PLATFORM_V2: PlatformVersion = PlatformVersion { + protocol_version: 1, + proofs: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + drive: DriveVersion { + structure: DriveStructureVersion { + document_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_indexes: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + pools: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DriveMethodVersions { + initialization: DriveInitializationMethodVersions { + create_initial_state_structure: 0, + }, + credit_pools: DriveCreditPoolMethodVersions { + epochs: DriveCreditPoolEpochsMethodVersions { + get_epochs_infos: 0, + get_epochs_protocol_versions: 0, + prove_epochs_infos: 0, + get_epoch_fee_multiplier: 0, + get_epoch_processing_credits_for_distribution: 0, + get_epoch_storage_credits_for_distribution: 0, + get_epoch_total_credits_for_distribution: 0, + get_storage_credits_for_distribution_for_epochs_in_range: 0, + get_epoch_start_time: 0, + get_epoch_start_block_core_height: 0, + get_epoch_start_block_height: 0, + get_first_epoch_start_block_info_between_epochs: 0, + get_epoch_proposers: 0, + get_epochs_proposer_block_count: 0, + add_update_pending_epoch_refunds_operations: 0, + is_epochs_proposers_tree_empty: 0, + }, + pending_epoch_refunds: DriveCreditPoolPendingEpochRefundsMethodVersions { + add_delete_pending_epoch_refunds_except_specified: 0, + fetch_and_add_pending_epoch_refunds_to_collection: 0, + fetch_pending_epoch_refunds: 0, + add_update_pending_epoch_refunds_operations: 0, + }, + storage_fee_distribution_pool: + DriveCreditPoolStorageFeeDistributionPoolMethodVersions { + get_storage_fees_from_distribution_pool: 0, + }, + unpaid_epoch: DriveCreditPoolUnpaidEpochMethodVersions { + get_unpaid_epoch_index: 0, + }, + }, + protocol_upgrade: DriveProtocolUpgradeVersions { + clear_version_information: 0, + fetch_versions_with_counter: 0, + fetch_proved_versions_with_counter: 0, + fetch_validator_version_votes: 0, + fetch_proved_validator_version_votes: 0, + remove_validators_proposed_app_versions: 0, + update_validator_proposed_app_version: 0, + }, + prove: DriveProveMethodVersions { + prove_elements: 0, + prove_multiple_state_transition_results: 0, + }, + balances: DriveBalancesMethodVersions { + add_to_system_credits: 0, + add_to_system_credits_operations: 0, + remove_from_system_credits: 0, + remove_from_system_credits_operations: 0, + calculate_total_credits_balance: 0, + }, + document: DriveDocumentMethodVersions { + query: DriveDocumentQueryMethodVersions { query_documents: 0, query_documents_with_flags: 0 }, + delete: DriveDocumentDeleteMethodVersions { + add_estimation_costs_for_remove_document_to_primary_storage: 0, + delete_document_for_contract: 0, + delete_document_for_contract_id: 0, + delete_document_for_contract_apply_and_add_to_operations: 0, + remove_document_from_primary_storage: 0, + remove_reference_for_index_level_for_contract_operations: 0, + remove_indices_for_index_level_for_contract_operations: 0, + remove_indices_for_top_index_level_for_contract_operations: 0, + delete_document_for_contract_id_with_named_type_operations: 0, + delete_document_for_contract_with_named_type_operations: 0, + delete_document_for_contract_operations: 0, + }, + insert: DriveDocumentInsertMethodVersions { + add_document: 0, + add_document_for_contract: 0, + add_document_for_contract_apply_and_add_to_operations: 0, + add_document_for_contract_operations: 0, + add_document_to_primary_storage: 0, + add_indices_for_index_level_for_contract_operations: 0, + add_indices_for_top_index_level_for_contract_operations: 0, + add_reference_for_index_level_for_contract_operations: 0, + }, + insert_contested: DriveDocumentInsertContestedMethodVersions { + add_contested_document: 0, + add_contested_document_for_contract: 0, + add_contested_document_for_contract_apply_and_add_to_operations: 0, + add_contested_document_for_contract_operations: 0, + add_contested_document_to_primary_storage: 0, + add_contested_indices_for_contract_operations: 0, + add_contested_reference_and_vote_subtree_to_document_operations: 0, + add_contested_vote_subtree_for_non_identities_operations: 0, + }, + update: DriveDocumentUpdateMethodVersions { + add_update_multiple_documents_operations: 0, + update_document_for_contract: 0, + update_document_for_contract_apply_and_add_to_operations: 0, + update_document_for_contract_id: 0, + update_document_for_contract_operations: 0, + update_document_with_serialization_for_contract: 0, + update_serialized_document_for_contract: 0, + }, + estimation_costs: DriveDocumentEstimationCostsMethodVersions { + add_estimation_costs_for_add_document_to_primary_storage: 0, + add_estimation_costs_for_add_contested_document_to_primary_storage: 0, + stateless_delete_of_non_tree_for_costs: 0, + }, + index_uniqueness: DriveDocumentIndexUniquenessMethodVersions { + validate_document_uniqueness: 0, + validate_document_create_transition_action_uniqueness: 0, + validate_document_replace_transition_action_uniqueness: 0, + validate_document_transfer_transition_action_uniqueness: 0, + validate_document_purchase_transition_action_uniqueness: 0, + validate_document_update_price_transition_action_uniqueness: 0, + validate_uniqueness_of_data: 0, + }, + }, + vote: DriveVoteMethodVersions { + insert: DriveVoteInsertMethodVersions { + register_identity_vote: 0, + }, + contested_resource_insert: DriveVoteContestedResourceInsertMethodVersions { + register_contested_resource_identity_vote: 0, + insert_stored_info_for_contested_resource_vote_poll: 0, + register_identity_vote: 0, + add_vote_poll_end_date_query_operations: 0, + }, + cleanup: DriveVoteCleanupMethodVersions { + remove_specific_vote_references_given_by_identity: 0, + remove_specific_votes_given_by_identity: 0, + remove_contested_resource_vote_poll_end_date_query_operations: 0, + remove_contested_resource_vote_poll_votes_operations: 0, + remove_contested_resource_vote_poll_documents_operations: 0, + remove_contested_resource_vote_poll_contenders_operations: 0, + }, + setup: DriveVoteSetupMethodVersions { + add_initial_vote_tree_main_structure_operations: 0, + }, + storage_form: DriveVoteStorageFormMethodVersions { + resolve_with_contract: 0, + }, + fetch: DriveVoteFetchMethodVersions { + fetch_identities_voting_for_contenders: 0, + fetch_contested_document_vote_poll_stored_info: 0, + fetch_identity_contested_resource_vote: 0, + }, + }, + contract: DriveContractMethodVersions { + prove: DriveContractProveMethodVersions { + prove_contract: 0, + prove_contract_history: 0, + prove_contracts: 0, + }, + apply: DriveContractApplyMethodVersions { + apply_contract: 0, + apply_contract_with_serialization: 0, + }, + insert: DriveContractInsertMethodVersions { + add_contract_to_storage: 0, + insert_contract: 0, + }, + update: DriveContractUpdateMethodVersions { update_contract: 0 }, + costs: DriveContractCostsMethodVersions { + add_estimation_costs_for_contract_insertion: 0, + }, + get: DriveContractGetMethodVersions { + fetch_contract: 0, + fetch_contract_with_history: 0, + get_cached_contract_with_fetch_info: 0, + get_contract_with_fetch_info: 0, + get_contracts_with_fetch_info: 0, + }, + }, + fees: DriveFeesMethodVersions { calculate_fee: 0 }, + estimated_costs: DriveEstimatedCostsMethodVersions { + add_estimation_costs_for_levels_up_to_contract: 0, + add_estimation_costs_for_levels_up_to_contract_document_type_excluded: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract: 0, + add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded: 0, + }, + asset_lock: DriveAssetLockMethodVersions { + add_asset_lock_outpoint: 0, + add_estimation_costs_for_adding_asset_lock: 0, + fetch_asset_lock_outpoint_info: 0, + }, + verify: DriveVerifyMethodVersions { + contract: DriveVerifyContractMethodVersions { + verify_contract: 0, + verify_contract_history: 0, + }, + document: DriveVerifyDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + verify_start_at_document_in_proof: 0, + }, + identity: DriveVerifyIdentityMethodVersions { + verify_full_identities_by_public_key_hashes: 0, + verify_full_identity_by_identity_id: 0, + verify_full_identity_by_public_key_hash: 0, + verify_identity_balance_for_identity_id: 0, + verify_identity_balances_for_identity_ids: 0, + verify_identity_id_by_public_key_hash: 0, + verify_identity_ids_by_public_key_hashes: 0, + verify_identity_keys_by_identity_id: 0, + verify_identity_nonce: 0, + verify_identity_contract_nonce: 0, + verify_identities_contract_keys: 0, + }, + single_document: DriveVerifySingleDocumentMethodVersions { + verify_proof: 0, + verify_proof_keep_serialized: 0, + }, + system: DriveVerifySystemMethodVersions { + verify_epoch_infos: 0, + verify_elements: 0, + verify_total_credits_in_system: 0, + verify_upgrade_state: 0, + verify_upgrade_vote_status: 0, + }, + voting: DriveVerifyVoteMethodVersions { + verify_masternode_vote: 0, + verify_start_at_contender_in_proof: 0, + verify_vote_poll_votes_proof: 0, + verify_identity_votes_given_proof: 0, + verify_vote_poll_vote_state_proof: 0, + verify_contests_proof: 0, + verify_vote_polls_by_end_date_proof: 0, + verify_specialized_balance: 0, + }, + state_transition: DriveVerifyStateTransitionMethodVersions { + verify_state_transition_was_executed_with_proof: 0, + }, + }, + identity: DriveIdentityMethodVersions { + fetch: DriveIdentityFetchMethodVersions { + public_key_hashes: DriveIdentityFetchPublicKeyHashesMethodVersions { + fetch_full_identities_by_unique_public_key_hashes: 0, + fetch_full_identity_by_unique_public_key_hash: 0, + fetch_identity_id_by_unique_public_key_hash: 0, + fetch_identity_ids_by_non_unique_public_key_hash: 0, + fetch_identity_ids_by_unique_public_key_hashes: 0, + fetch_serialized_full_identity_by_unique_public_key_hash: 0, + has_any_of_unique_public_key_hashes: 0, + has_non_unique_public_key_hash: 0, + has_non_unique_public_key_hash_already_for_identity: 0, + has_unique_public_key_hash: 0, + }, + attributes: DriveIdentityFetchAttributesMethodVersions { + revision: 0, + nonce: 0, + identity_contract_nonce: 0, + balance: 0, + balance_include_debt: 0, + negative_balance: 0, + }, + partial_identity: DriveIdentityFetchPartialIdentityMethodVersions { + fetch_identity_revision_with_keys: 0, + fetch_identity_balance_with_keys: 0, + fetch_identity_balance_with_keys_and_revision: 0, + fetch_identity_with_balance: 0, + fetch_identity_keys: 0, + }, + full_identity: DriveIdentityFetchFullIdentityMethodVersions { + fetch_full_identity: Some(0), + fetch_full_identities: Some(0), + }, + }, + prove: DriveIdentityProveMethodVersions { + full_identity: 0, + full_identities: 0, + identity_nonce: 0, + identity_contract_nonce: 0, + identities_contract_keys: 0, + prove_full_identities_by_unique_public_key_hashes: 0, + prove_full_identity_by_unique_public_key_hash: 0, + prove_identity_id_by_unique_public_key_hash: 0, + prove_identity_ids_by_unique_public_key_hashes: 0, + }, + keys: DriveIdentityKeysMethodVersions { + fetch: DriveIdentityKeysFetchMethodVersions { + fetch_all_current_identity_keys: 0, + fetch_all_identity_keys: 0, + fetch_identities_all_keys: 0, + fetch_identity_keys: 0, + fetch_identities_contract_keys: 0, + }, + prove: DriveIdentityKeysProveMethodVersions { + prove_identities_all_keys: 0, + prove_identity_keys: 0, + }, + insert: DriveIdentityKeysInsertMethodVersions { + create_key_tree_with_keys: 0, + create_new_identity_key_query_trees: 0, + insert_key_searchable_references: 0, + insert_key_to_storage: 0, + insert_new_non_unique_key: 0, + insert_new_unique_key: 0, + replace_key_in_storage: 0, + }, + insert_key_hash_identity_reference: + DriveIdentityKeyHashesToIdentityInsertMethodVersions { + add_estimation_costs_for_insert_non_unique_public_key_hash_reference: 0, + add_estimation_costs_for_insert_unique_public_key_hash_reference: 0, + insert_non_unique_public_key_hash_reference_to_identity: 0, + insert_reference_to_non_unique_key: 0, + insert_reference_to_unique_key: 0, + insert_unique_public_key_hash_reference_to_identity: 0, + }, + }, + update: DriveIdentityUpdateMethodVersions { + update_identity_revision: 0, + merge_identity_nonce: 0, + update_identity_negative_credit_operation: 0, + initialize_identity_revision: 0, + disable_identity_keys: 0, + re_enable_identity_keys: 0, + add_new_non_unique_keys_to_identity: 0, + add_new_unique_keys_to_identity: 0, + add_new_keys_to_identity: 0, + insert_identity_balance: 0, + initialize_negative_identity_balance: 0, + add_to_identity_balance: 0, + add_to_previous_balance: 0, + apply_balance_change_from_fee_to_identity: 0, + remove_from_identity_balance: 0, + refresh_identity_key_reference_operations: 0, + }, + insert: DriveIdentityInsertMethodVersions { + add_new_identity: 0, + }, + contract_info: DriveIdentityContractInfoMethodVersions { + add_potential_contract_info_for_contract_bounded_key: 0, + refresh_potential_contract_info_key_references: 0, + merge_identity_contract_nonce: 0, + }, + cost_estimation: DriveIdentityCostEstimationMethodVersions { + for_authentication_keys_security_level_in_key_reference_tree: 0, + for_balances: 0, + for_contract_info: 0, + for_contract_info_group: 0, + for_contract_info_group_keys: 0, + for_contract_info_group_key_purpose: 0, + for_keys_for_identity_id: 0, + for_negative_credit: 0, + for_purpose_in_key_reference_tree: 0, + for_root_key_reference_tree: 0, + for_update_revision: 0, + }, + withdrawals: DriveIdentityWithdrawalMethodVersions { + document: DriveIdentityWithdrawalDocumentMethodVersions { + fetch_oldest_withdrawal_documents_by_status: 0, + find_up_to_100_withdrawal_documents_by_status_and_transaction_indices: 0, + }, + transaction: DriveIdentityWithdrawalTransactionMethodVersions { + index: DriveIdentityWithdrawalTransactionIndexMethodVersions { + fetch_next_withdrawal_transaction_index: 0, + add_update_next_withdrawal_transaction_index_operation: 0, + }, + queue: DriveIdentityWithdrawalTransactionQueueMethodVersions { + add_enqueue_untied_withdrawal_transaction_operations: 0, + dequeue_untied_withdrawal_transactions: 0, + }, + }, + }, + }, + platform_system: DrivePlatformSystemMethodVersions { + estimation_costs: DriveSystemEstimationCostsMethodVersions { + for_total_system_credits_update: 0, + }, + }, + operations: DriveOperationsMethodVersion { + rollback_transaction: 0, + drop_cache: 0, + commit_transaction: 0, + apply_partial_batch_low_level_drive_operations: 0, + apply_partial_batch_grovedb_operations: 0, + apply_batch_low_level_drive_operations: 0, + apply_batch_grovedb_operations: 0, + }, + state_transitions: DriveStateTransitionMethodVersions { + operations: DriveStateTransitionOperationMethodVersions { + finalization_tasks: 0, + contracts: DriveDataContractOperationMethodVersions { + finalization_tasks: 0, + }, + }, + convert_to_high_level_operations: + DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions { + data_contract_create_transition: 0, + data_contract_update_transition: 0, + document_create_transition: 0, + document_delete_transition: 0, + document_purchase_transition: 0, + document_replace_transition: 0, + document_transfer_transition: 0, + document_update_price_transition: 0, + documents_batch_transition: 0, + identity_create_transition: 0, + identity_credit_transfer_transition: 0, + identity_credit_withdrawal_transition: 0, + identity_top_up_transition: 0, + identity_update_transition: 0, + masternode_vote_transition: 0, + bump_identity_data_contract_nonce: 0, + bump_identity_nonce: 0, + partially_use_asset_lock: 0, + }, + }, + batch_operations: DriveBatchOperationsMethodVersion { + convert_drive_operations_to_grove_operations: 0, + apply_drive_operations: 0, + }, + platform_state: DrivePlatformStateMethodVersions { + fetch_platform_state_bytes: 0, + store_platform_state_bytes: 0, + }, + fetch: DriveFetchMethodVersions { fetch_elements: 0 }, + prefunded_specialized_balances: DrivePrefundedSpecializedMethodVersions { + fetch_single: 0, + prove_single: 0, + add_prefunded_specialized_balance: 0, + add_prefunded_specialized_balance_operations: 0, + deduct_from_prefunded_specialized_balance: 0, + deduct_from_prefunded_specialized_balance_operations: 0, + estimated_cost_for_prefunded_specialized_balance_update: 0, + }, + }, + grove_methods: DriveGroveMethodVersions { + basic: DriveGroveBasicMethodVersions { + grove_insert: 0, + grove_insert_empty_tree: 0, + grove_insert_empty_sum_tree: 0, + grove_insert_if_not_exists: 0, + grove_clear: 0, + grove_delete: 0, + grove_get_raw: 0, + grove_get_raw_optional: 0, + grove_get_raw_value_u64_from_encoded_var_vec: 0, + grove_get: 0, + grove_get_path_query_serialized_results: 0, + grove_get_path_query_serialized_or_sum_results: 0, + grove_get_path_query: 0, + grove_get_path_query_with_optional: 0, + grove_get_raw_path_query_with_optional: 0, + grove_get_raw_path_query: 0, + grove_get_proved_path_query: 0, + grove_get_proved_path_query_with_conditional: 0, + grove_get_sum_tree_total_value: 0, + grove_has_raw: 0, + }, + batch: DriveGroveBatchMethodVersions { + batch_insert_empty_tree: 0, + batch_insert_empty_tree_if_not_exists: 0, + batch_insert_empty_tree_if_not_exists_check_existing_operations: 0, + batch_insert: 0, + batch_insert_if_not_exists: 0, + batch_insert_if_changed_value: 0, + batch_replace: 0, + batch_delete: 0, + batch_remove_raw: 0, + batch_delete_up_tree_while_empty: 0, + batch_refresh_reference: 0, + }, + apply: DriveGroveApplyMethodVersions { + grove_apply_operation: 0, + grove_apply_batch: 0, + grove_apply_partial_batch: 0, + }, + costs: DriveGroveCostMethodVersions { + grove_batch_operations_costs: 0, + }, + }, + grove_version: GROVE_V1, + }, + platform_architecture: PlatformArchitectureVersion { + data_contract_factory_structure_version: 0, + document_factory_structure_version: 0, + }, + drive_abci: DriveAbciVersion { + structs: DriveAbciStructureVersions { + platform_state_structure: 0, + platform_state_for_saving_structure: 0, + state_transition_execution_context: 0, + commit: 0, + masternode: 0, + signature_verification_quorum_set: 0, + }, + methods: DriveAbciMethodVersions { + engine: DriveAbciEngineMethodVersions { + init_chain: 0, + check_tx: 0, + run_block_proposal: 0, + finalize_block_proposal: 0, + }, + initialization: DriveAbciInitializationMethodVersions { + initial_core_height_and_time: 0, + create_genesis_state: 0, + }, + core_based_updates: DriveAbciCoreBasedUpdatesMethodVersions { + update_core_info: 0, + update_masternode_list: 0, + update_quorum_info: 0, + masternode_updates: DriveAbciMasternodeIdentitiesUpdatesMethodVersions { + get_voter_identity_key: 0, + get_operator_identity_keys: 0, + get_owner_identity_withdrawal_key: 0, + get_voter_identifier_from_masternode_list_item: 0, + get_operator_identifier_from_masternode_list_item: 0, + create_operator_identity: 0, + create_owner_identity: 0, + create_voter_identity: 0, + disable_identity_keys: 0, + update_masternode_identities: 0, + update_operator_identity: 0, + update_owner_withdrawal_address: 0, + update_voter_identity: 0, + }, + }, + protocol_upgrade: DriveAbciProtocolUpgradeMethodVersions { + check_for_desired_protocol_upgrade: 0, + upgrade_protocol_version_on_epoch_change: 0, + protocol_version_upgrade_percentage_needed: 75, + }, + block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { + add_process_epoch_change_operations: 0, + process_block_fees: 0, + }, + core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { + choose_quorum: 0, + verify_chain_lock: 0, + verify_chain_lock_locally: 0, + verify_chain_lock_through_core: 0, + make_sure_core_is_synced_to_chain_lock: 0, + recent_block_count_amount: 2, + }, + core_instant_send_lock: DriveAbciCoreInstantSendLockMethodVersions { + verify_recent_signature_locally: 0, + }, + fee_pool_inwards_distribution: DriveAbciFeePoolInwardsDistributionMethodVersions { + add_distribute_block_fees_into_pools_operations: 0, + add_distribute_storage_fee_to_epochs_operations: 0, + }, + fee_pool_outwards_distribution: DriveAbciFeePoolOutwardsDistributionMethodVersions { + add_distribute_fees_from_oldest_unpaid_epoch_pool_to_proposers_operations: 0, + add_epoch_pool_to_proposers_payout_operations: 0, + find_oldest_epoch_needing_payment: 0, + fetch_reward_shares_list_for_masternode: 0, + }, + withdrawals: DriveAbciIdentityCreditWithdrawalMethodVersions { + build_untied_withdrawal_transactions_from_documents: 0, + dequeue_and_build_unsigned_withdrawal_transactions: 0, + fetch_transactions_block_inclusion_status: 0, + pool_withdrawals_into_transactions_queue: 0, + update_broadcasted_withdrawal_statuses: 0, + append_signatures_and_broadcast_withdrawal_transactions: 0, + }, + voting: DriveAbciVotingMethodVersions { + keep_record_of_finished_contested_resource_vote_poll: 0, + clean_up_after_vote_poll_end: 0, + clean_up_after_contested_resources_vote_poll_end: 0, + check_for_ended_vote_polls: 0, + tally_votes_for_contested_document_resource_vote_poll: 0, + award_document_to_winner: 0, + delay_vote_poll: 0, + run_dao_platform_events: 0, + remove_votes_for_removed_masternodes: 0, + }, + state_transition_processing: DriveAbciStateTransitionProcessingMethodVersions { + execute_event: 0, + process_raw_state_transitions: 0, + decode_raw_state_transitions: 0, + validate_fees_of_event: 0, + }, + epoch: DriveAbciEpochMethodVersions { + gather_epoch_info: 0, + get_genesis_time: 0, + }, + block_start: DriveAbciBlockStartMethodVersions { + clear_drive_block_cache: 0, + }, + block_end: DriveAbciBlockEndMethodVersions { + update_state_cache: 0, + update_drive_cache: 0, + validator_set_update: 0, + }, + platform_state_storage: DriveAbciPlatformStateStorageMethodVersions { + fetch_platform_state: 0, + store_platform_state: 0, + }, + }, + validation_and_processing: 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(0), + advanced_structure: None, + identity_signatures: None, + advanced_minimum_balance_pre_check: Some(0), + nonce: Some(0), + state: 0, + transform_into_action: 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: 0, + 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, + }, + }, + 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, + }, + }, + query: DriveAbciQueryVersions { + max_returned_elements: 100, + response_metadata: 0, + proofs_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions { + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + identity_based_queries: DriveAbciQueryIdentityVersions { + identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_contract_keys: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_contract_nonce: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + balance_and_revision: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_by_public_key_hash: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + data_contract_based_queries: DriveAbciQueryDataContractVersions { + data_contract: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contract_history: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + data_contracts: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + voting_based_queries: DriveAbciQueryVotingVersions { + vote_polls_by_end_date_query: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_vote_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_voters_for_identity: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resource_identity_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contested_resources: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + system: DriveAbciQuerySystemVersions { + version_upgrade_state: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + version_upgrade_vote_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + epoch_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + partial_status: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + path_elements: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + total_credits_in_platform: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + }, + dpp: DPPVersion { + costs: CostVersions { + signature_verify: 0, + }, + validation: DPPValidationVersions { + json_schema_validator: JsonSchemaValidatorVersions { + new: 0, + validate: 0, + compile: 0, + compile_and_validate: 0, + }, + data_contract: DataContractValidationVersions { + validate: 0, + validate_config_update: 0, + validate_index_definitions: 0, + validate_index_naming_duplicates: 0, + validate_not_defined_properties: 0, + validate_property_definition: 0, + }, + document_type: DocumentTypeValidationVersions { + validate_update: 0, + contested_index_limit: 1, + unique_index_limit: 10, + }, + voting: VotingValidationVersions { + allow_other_contenders_time_ms: 604_800_000, // 1 week in ms + votes_allowed_per_masternode: 5, + }, + }, + state_transition_serialization_versions: StateTransitionSerializationVersions { + identity_public_key_in_creation: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_top_up_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_withdrawal_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_credit_transfer_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + masternode_vote_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_create_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_update_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + documents_batch_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_base_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_create_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_replace_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_delete_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_transfer_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_update_price_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + document_purchase_state_transition: DocumentFeatureVersionBounds { + bounds: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + }, + state_transition_conversion_versions: StateTransitionConversionVersions { + identity_to_identity_create_transition: 0, + identity_to_identity_top_up_transition: 0, + identity_to_identity_withdrawal_transition: 0, + identity_to_identity_create_transition_with_signer: 0, + }, + state_transition_method_versions: StateTransitionMethodVersions { + public_key_in_creation_methods: PublicKeyInCreationMethodVersions { + from_public_key_signed_with_private_key: 0, + from_public_key_signed_external: 0, + hash: 0, + duplicated_key_ids_witness: 0, + duplicated_keys_witness: 0, + validate_identity_public_keys_structure: 0, + }, + }, + state_transitions: StateTransitionVersions { + documents: DocumentTransitionVersions { + documents_batch_transition: DocumentsBatchTransitionVersions { + validation: DocumentsBatchTransitionValidationVersions { + find_duplicates_by_id: 0, + validate_base_structure: 0, + }, + }, + }, + identities: IdentityTransitionVersions { + max_public_keys_in_creation: 6, + asset_locks: IdentityTransitionAssetLockVersions { + required_asset_lock_duff_balance_for_processing_start_for_identity_create: + 200000, + required_asset_lock_duff_balance_for_processing_start_for_identity_top_up: + 50000, + validate_asset_lock_transaction_structure: 0, + validate_instant_asset_lock_proof_structure: 0, + }, + }, + }, + contract_versions: ContractVersions { + max_serialized_size: 65000, + contract_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + contract_structure_version: 0, + created_data_contract_structure: 0, + config: 0, + methods: DataContractMethodVersions { + validate_document: 0, + validate_update: 0, + schema: 0, + }, + document_type_versions: DocumentTypeVersions { + index_versions: DocumentTypeIndexVersions { + index_levels_from_indices: 0, + }, + class_method_versions: DocumentTypeClassMethodVersions { + try_from_schema: 0, + create_document_types_from_document_schemas: 0, + }, + structure_version: 0, + schema: DocumentTypeSchemaVersions { + enrich_with_base_schema: 0, + find_identifier_and_binary_paths: 0, + validate_max_depth: 0, + max_depth: 256, + recursive_schema_validator_versions: RecursiveSchemaValidatorVersions { + traversal_validator: 0, + }, + validate_schema_compatibility: 0, + }, + methods: DocumentTypeMethodVersions { + create_document_from_data: 0, + create_document_with_prevalidated_properties: 0, + prefunded_voting_balance_for_document: 0, + contested_vote_poll_for_document: 0, + estimated_size: 0, + index_for_types: 0, + max_size: 0, + serialize_value_for_key: 0, + deserialize_value_for_key: 0, + }, + }, + }, + document_versions: DocumentVersions { + document_structure_version: 0, + document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_cbor_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + extended_document_structure_version: 0, + extended_document_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + document_method_versions: DocumentMethodVersions { + is_equal_ignoring_timestamps: 0, + hash: 0, + get_raw_for_contract: 0, + get_raw_for_document_type: 0, + }, + }, + identity_versions: IdentityVersions { + identity_structure_version: 0, + identity_key_structure_version: 0, + identity_key_type_method_versions: IdentityKeyTypeMethodVersions { + random_public_key_data: 0, + random_public_and_private_key_data: 0, + }, + }, + voting_versions: VotingVersions { + default_vote_poll_time_duration_ms: 1_209_600_000, //2 weeks + contested_document_vote_poll_stored_info_version: 0, + }, + asset_lock_versions: AssetLockVersions { + reduced_asset_lock_value: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, + methods: DPPMethodVersions { + epoch_core_reward_credits_for_distribution: 0, + }, + }, + system_data_contracts: SystemDataContractVersions { + withdrawals: 1, + dpns: 1, + dashpay: 1, + masternode_reward_shares: 1, + feature_flags: 1, + }, + fee_version: FEE_VERSION1, + system_limits: SystemLimits { + estimated_contract_max_serialized_size: 16384, + max_field_value_size: 5120, //5 KiB + max_state_transition_size: 20480, //20 KiB + max_transitions_in_documents_batch: 1, + }, +}; From 7f350a6ac965df28dfd10247ac27b1ac34386936 Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:53:24 +0200 Subject: [PATCH 4/4] fix(sdk): use proofs when waiting for asset lock (#2067) --- .../src/from_request.rs | 2 +- packages/rs-sdk/src/core/transaction.rs | 31 +++---------------- packages/rs-sdk/src/platform/types/epoch.rs | 3 ++ .../rs-sdk/src/platform/types/identity.rs | 2 +- 4 files changed, 9 insertions(+), 29 deletions(-) diff --git a/packages/rs-drive-proof-verifier/src/from_request.rs b/packages/rs-drive-proof-verifier/src/from_request.rs index ff2a74de36c..d8a302cb9a9 100644 --- a/packages/rs-drive-proof-verifier/src/from_request.rs +++ b/packages/rs-drive-proof-verifier/src/from_request.rs @@ -200,7 +200,7 @@ impl TryFromRequest } Ok(proto::get_contested_resource_identity_votes_request::GetContestedResourceIdentityVotesRequestV0 { - prove: true, + prove: true, identity_id: self.identity_id.to_vec(), offset: self.offset.map(|x| x as u32), limit: self.limit.map(|x| x as u32), diff --git a/packages/rs-sdk/src/core/transaction.rs b/packages/rs-sdk/src/core/transaction.rs index a7046a2fdb6..39dd85e562c 100644 --- a/packages/rs-sdk/src/core/transaction.rs +++ b/packages/rs-sdk/src/core/transaction.rs @@ -1,12 +1,11 @@ +use crate::platform::fetch_current_no_parameters::FetchCurrent; +use crate::platform::types::epoch::Epoch; use crate::{Error, Sdk}; use bip37_bloom_filter::{BloomFilter, BloomFilterData}; use dapi_grpc::core::v0::{ transactions_with_proofs_request, transactions_with_proofs_response, GetTransactionRequest, GetTransactionResponse, TransactionsWithProofsRequest, TransactionsWithProofsResponse, }; -use dapi_grpc::platform::v0::{ - get_epochs_info_request, get_epochs_info_response, GetEpochsInfoRequest, GetEpochsInfoResponse, -}; use dpp::dashcore::consensus::Decodable; use dpp::dashcore::{Address, InstantLock, MerkleBlock, OutPoint, Transaction, Txid}; use dpp::identity::state_transition::asset_lock_proof::chain::ChainAssetLockProof; @@ -201,30 +200,8 @@ impl Sdk { // Wait until platform chain is on the block's chain locked height loop { - let request = GetEpochsInfoRequest { - version: Some(get_epochs_info_request::Version::V0( - get_epochs_info_request::GetEpochsInfoRequestV0 { - start_epoch: Some(0), - count: 1, - ..Default::default() - }, - )), - }; - - let GetEpochsInfoResponse { - version: - Some(get_epochs_info_response::Version::V0( - get_epochs_info_response::GetEpochsInfoResponseV0 { - metadata: Some(metadata), - .. - }, - )), - } = self.execute(request, RequestSettings::default()).await? - else { - return Err(Error::DapiClientError(String::from( - "missing V0 `metadata` field", - ))); - }; + let (_epoch, metadata) = + Epoch::fetch_current_with_metadata(self).await?; if metadata.core_chain_locked_height >= core_chain_locked_height { break; diff --git a/packages/rs-sdk/src/platform/types/epoch.rs b/packages/rs-sdk/src/platform/types/epoch.rs index 7026f2e5516..f6b86b77eeb 100644 --- a/packages/rs-sdk/src/platform/types/epoch.rs +++ b/packages/rs-sdk/src/platform/types/epoch.rs @@ -9,6 +9,9 @@ use crate::{ Error, Sdk, }; +/// Epoch type used in the SDK. +pub type Epoch = ExtendedEpochInfo; + #[async_trait] impl FetchCurrent for ExtendedEpochInfo { async fn fetch_current(sdk: &Sdk) -> Result { diff --git a/packages/rs-sdk/src/platform/types/identity.rs b/packages/rs-sdk/src/platform/types/identity.rs index 01599307c1a..bc375a67d7c 100644 --- a/packages/rs-sdk/src/platform/types/identity.rs +++ b/packages/rs-sdk/src/platform/types/identity.rs @@ -39,7 +39,7 @@ impl Query for dpp::prelude::Identifier { Ok(IdentityRequest::GetIdentity(GetIdentityRequest { version: Some(get_identity_request::Version::V0(GetIdentityRequestV0 { id, - prove: true, + prove, })), })) }