diff --git a/Cargo.lock b/Cargo.lock index b10cefb65c9..116eb3dcb62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "dapi-grpc-macros", "platform-version", @@ -951,7 +951,7 @@ dependencies = [ [[package]] name = "dapi-grpc-macros" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "dapi-grpc", "heck", @@ -1057,7 +1057,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "platform-value", "serde_json", @@ -1065,7 +1065,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1156,7 +1156,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "platform-value", "serde_json", @@ -1164,7 +1164,7 @@ dependencies = [ [[package]] name = "dpp" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "anyhow", "async-trait", @@ -1214,7 +1214,7 @@ dependencies = [ [[package]] name = "drive" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "anyhow", "base64 0.21.7", @@ -1249,7 +1249,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "atty", "base64 0.20.0", @@ -1303,7 +1303,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "dapi-grpc", "dpp", @@ -1504,7 +1504,7 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "feature-flags-contract" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "platform-value", "serde_json", @@ -2361,7 +2361,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "platform-value", "serde_json", @@ -2830,7 +2830,7 @@ checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "platform-serialization" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "bincode 2.0.0-rc.3", "platform-version", @@ -2838,7 +2838,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "proc-macro2", "quote", @@ -2848,7 +2848,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "base64 0.13.1", "bincode 2.0.0-rc.3", @@ -2869,7 +2869,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "quote", "syn 2.0.48", @@ -2877,14 +2877,14 @@ dependencies = [ [[package]] name = "platform-version" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "thiserror", ] [[package]] name = "platform-versioning" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "proc-macro2", "quote", @@ -3426,7 +3426,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "backon", "chrono", @@ -3446,7 +3446,7 @@ dependencies = [ [[package]] name = "rs-sdk" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "async-trait", "base64 0.21.7", @@ -3896,7 +3896,7 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple-signer" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "anyhow", "bincode 2.0.0-rc.3", @@ -3987,7 +3987,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "bincode 2.0.0-rc.3", "dpp", @@ -4841,7 +4841,7 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "wasm-dpp" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "anyhow", "async-trait", @@ -5083,7 +5083,7 @@ dependencies = [ [[package]] name = "withdrawals-contract" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" dependencies = [ "num_enum", "platform-value", diff --git a/package.json b/package.json index 567a8fc18eb..b14815ccafb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 4e6492e2199..79d20826dad 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/dapi-grpc/Cargo.toml b/packages/dapi-grpc/Cargo.toml index 1368a80690c..dc4bab480df 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index ddb42a71439..362c65ef940 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 6149335b519..21b7ccd10c5 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 d70e0f99721..1bae9fbd5ac 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 87518cab832..652a1927c70 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 528f321e7e0..d09fb140d5c 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index 3edac6db8ab..c2b8c280894 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 ae6f4cdeb60..2d668a752d3 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index 409e981b965..2579bfda02b 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index 2975dfb7413..a4a7b19eec0 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 d1d4d1558af..66f727ca342 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 96fb2403a05..a5a64b038ab 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 e00fc8ad31e..e4b9979a3b8 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 feaa47e2ca8..0ae612a6a4e 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "4.0.0-pr.1621.8", + "version": "4.0.0-pr.1621.9", "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 58a2a72d17d..97ac8224f93 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 2522a222435..6f5d5531eda 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 6365d073e62..99d9fe2e478 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 240efb6babc..f4e90a498d5 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.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 5634c4ffb51..7aa8f1cca5b 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" [features] diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index ff11cbbba59..f94d0afc265 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" 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 6e583d9deb8..a5a816862a9 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" authors = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index ec2df98b98f..3cac2b38f5b 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs b/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs index 163d74708d4..b10494886a9 100644 --- a/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/engine/run_block_proposal/v0/mod.rs @@ -130,6 +130,7 @@ where if let Some(core_chain_lock_update) = core_chain_lock_update.as_ref() { if !known_from_us { let verification_result = self.verify_chain_lock( + block_state_info.round, // the round is to allow us to bypass local verification in case of chain stall &block_platform_state, core_chain_lock_update, true, // if it's not known from us, then we should try submitting it diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/v0/mod.rs index 0de549e7036..8fd8156732c 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/choose_quorum/v0/mod.rs @@ -26,11 +26,6 @@ impl Platform { // Only the quorum hash needs reversal. quorum_hash_bytes.reverse(); - let mut request_id_bytes = request_id.to_vec(); - - // Only the quorum hash needs reversal. - // request_id_bytes.reverse(); - let mut hasher = sha256d::Hash::engine(); // Serialize and hash the LLMQ type @@ -40,7 +35,7 @@ impl Platform { hasher.input(quorum_hash_bytes.as_slice()); // Serialize and add the selection hash from the chain lock - hasher.input(request_id_bytes.as_slice()); + hasher.input(request_id.as_slice()); // Finalize the hash let hash_result = sha256d::Hash::from_engine(hasher); @@ -73,11 +68,6 @@ impl Platform { // Only the quorum hash needs reversal. quorum_hash_bytes.reverse(); - let mut request_id_bytes = request_id.to_vec(); - - // Only the quorum hash needs reversal. - // request_id_bytes.reverse(); - let mut hasher = sha256d::Hash::engine(); // Serialize and hash the LLMQ type @@ -87,7 +77,7 @@ impl Platform { hasher.input(quorum_hash_bytes.as_slice()); // Serialize and add the selection hash from the chain lock - hasher.input(request_id_bytes.as_slice()); + hasher.input(request_id.as_slice()); // Finalize the hash let hash_result = sha256d::Hash::from_engine(hasher); @@ -150,12 +140,14 @@ mod tests { // llmqType[5] requestID[bdcf9fb3ef01209a09db19170a1950775afb5f824c5f0662b9cdae2bf3bb36d5] -> 000000dc07d722238a994116c3395c334211d9864ff5b37c3be51d5fdda66223 // llmqType[100] requestID[bdcf9fb3ef01209a09db19170a1950775afb5f824c5f0662b9cdae2bf3bb36d5] -> 0000000e6d15a11825211c943c4a995c44ebb2b0834b7848c2e080b48ca0148e - let request_id: [u8; 32] = + let mut request_id: [u8; 32] = hex::decode("bdcf9fb3ef01209a09db19170a1950775afb5f824c5f0662b9cdae2bf3bb36d5") .unwrap() .try_into() .unwrap(); + request_id.reverse(); + let mut quorum = Platform::::choose_quorum_v0( QuorumType::Llmq50_60, &quorums, @@ -222,12 +214,14 @@ mod tests { // llmqType[5] requestID[b06aa45eb35423f988e36c022967b4c02bb719b037717df13fa57c0f503d8a20] -> 000000bd5639c21dd8abf60253c3fe0343d87a9762b5b8f57e2b4ea1523fd071 // llmqType[100] requestID[b06aa45eb35423f988e36c022967b4c02bb719b037717df13fa57c0f503d8a20] -> 0000006faac9003919a6d5456a0a46ae10db517f572221279f0540b79fd9cf1b - let request_id: [u8; 32] = + let mut request_id: [u8; 32] = hex::decode("b06aa45eb35423f988e36c022967b4c02bb719b037717df13fa57c0f503d8a20") .unwrap() .try_into() .unwrap(); + request_id.reverse(); + let mut quorum = Platform::::choose_quorum_v0( QuorumType::Llmq50_60, &quorums, @@ -294,12 +288,14 @@ mod tests { // llmqType[5] requestID[2fc41ef02a3216e4311805a9a11405a41a8d7a9f179526b4f6f2866bff009a10] -> 000000bd5639c21dd8abf60253c3fe0343d87a9762b5b8f57e2b4ea1523fd071 // llmqType[100] requestID[2fc41ef02a3216e4311805a9a11405a41a8d7a9f179526b4f6f2866bff009a10] -> 000000dc07d722238a994116c3395c334211d9864ff5b37c3be51d5fdda66223 - let request_id: [u8; 32] = + let mut request_id: [u8; 32] = hex::decode("2fc41ef02a3216e4311805a9a11405a41a8d7a9f179526b4f6f2866bff009a10") .unwrap() .try_into() .unwrap(); + request_id.reverse(); + let mut quorum = Platform::::choose_quorum_v0( QuorumType::Llmq50_60, &quorums, diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/mod.rs index c0ddb466229..038a7365ac8 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/mod.rs @@ -21,6 +21,7 @@ where /// valid on platform. pub fn verify_chain_lock( &self, + round: u32, platform_state: &PlatformState, chain_lock: &ChainLock, make_sure_core_is_synced: bool, @@ -33,6 +34,7 @@ where .verify_chain_lock { 0 => self.verify_chain_lock_v0( + round, platform_state, chain_lock, make_sure_core_is_synced, diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/v0/mod.rs index 6609a738ac6..136ba114e0f 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock/v0/mod.rs @@ -20,13 +20,14 @@ where { pub(super) fn verify_chain_lock_v0( &self, + round: u32, platform_state: &PlatformState, chain_lock: &ChainLock, make_sure_core_is_synced: bool, platform_version: &PlatformVersion, ) -> Result { // first we try to verify the chain lock locally - match self.verify_chain_lock_locally(platform_state, chain_lock, platform_version) { + match self.verify_chain_lock_locally(round, platform_state, chain_lock, platform_version) { Ok(Some(valid)) => { if valid && make_sure_core_is_synced { match self.make_sure_core_is_synced_to_chain_lock(chain_lock, platform_version) diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/mod.rs index ba5cb51581d..21df37ba30e 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/mod.rs @@ -20,6 +20,7 @@ where /// the quorum pub fn verify_chain_lock_locally( &self, + round: u32, platform_state: &PlatformState, chain_lock: &ChainLock, platform_version: &PlatformVersion, @@ -30,7 +31,12 @@ where .core_chain_lock .verify_chain_lock_locally { - 0 => self.verify_chain_lock_locally_v0(platform_state, chain_lock, platform_version), + 0 => self.verify_chain_lock_locally_v0( + round, + platform_state, + chain_lock, + platform_version, + ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "verify_chain_lock_locally".to_string(), known_versions: vec![0], diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs index f5ed6e8bbc0..815532e8694 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/verify_chain_lock_locally/v0/mod.rs @@ -27,6 +27,7 @@ where /// the quorum pub fn verify_chain_lock_locally_v0( &self, + round: u32, platform_state: &PlatformState, chain_lock: &ChainLock, platform_version: &PlatformVersion, @@ -48,6 +49,16 @@ where let verification_height = chain_lock_height.saturating_sub(SIGN_OFFSET); if verification_height > last_block_in_window { + tracing::debug!( + ?chain_lock, + "h:{} r:{} skipped message_digest for chain lock at core height {} is {}, verification height {}, last block in window {}", + platform_state.last_committed_block_height() + 1, + round, + chain_lock.block_height, + platform_state.last_committed_core_height(), + verification_height, + last_block_in_window, + ); return Ok(None); // the chain lock is too far in the future or the past to verify locally } @@ -145,10 +156,11 @@ where let mut chain_lock_verified = public_key.verify(&signature, message_digest.as_ref()); - tracing::trace!( + tracing::debug!( ?chain_lock, - "h:{} message_digest for chain lock at core height {} is {}, quorum hash is {}, block hash is {}, chain lock was {}, last committed core height {}, verification window {}, last block in window {}", + "h:{} r:{} message_digest for chain lock at core height {} is {}, quorum hash is {}, block hash is {}, chain lock was {}, last committed core height {}, verification height {}, last block in window {}", platform_state.last_committed_block_height() + 1, + round, chain_lock.block_height, hex::encode(message_digest.as_byte_array()), hex::encode(quorum_hash.as_slice()), @@ -187,10 +199,11 @@ where chain_lock_verified = public_key.verify(&signature, message_digest.as_ref()); - tracing::trace!( + tracing::debug!( ?chain_lock, - "h:{} tried second quorums message_digest for chain lock at height {} is {}, quorum hash is {}, block hash is {}, chain lock was {}", + "h:{} r:{} tried second quorums message_digest for chain lock at height {} is {}, quorum hash is {}, block hash is {}, chain lock was {}", platform_state.last_committed_block_height() + 1, + round, chain_lock.block_height, hex::encode(message_digest.as_byte_array()), hex::encode(quorum_hash.as_slice()), @@ -198,7 +211,7 @@ where if chain_lock_verified { "verified"} else {"not verified"} ); if !chain_lock_verified { - tracing::error!( + tracing::debug!( "chain lock was invalid for both recent and old chain lock quorums" ); } @@ -207,17 +220,19 @@ where .is_none() { // we don't have old quorums, this means our node is very new. - tracing::trace!( + tracing::debug!( "we had no previous quorums locally, we should validate through core", ); return Ok(None); } else if !should_be_verifiable { - tracing::trace!( + tracing::debug!( "we were in a situation where it would be possible we didn't have all quorums and we couldn't verify locally, we should validate through core", ); return Ok(None); + } else if round >= 10 { + tracing::debug!("high round when chain lock was invalid, asking core to verify"); } else { - tracing::error!("chain lock was invalid, and we deemed there was no reason to check old quorums"); + tracing::debug!("chain lock was invalid, and we deemed there was no reason to check old quorums"); } } diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index 7c7bc25a789..cd30e86f456 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index af407ba56f1..92977293735 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-platform-serialization-derive/Cargo.toml b/packages/rs-platform-serialization-derive/Cargo.toml index eeac7252a11..a2af6dfca3f 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-platform-serialization/Cargo.toml b/packages/rs-platform-serialization/Cargo.toml index 88c6cf41ff2..731069be8c2 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-platform-value-convertible/Cargo.toml b/packages/rs-platform-value-convertible/Cargo.toml index c33bc38c49c..0e84f1c727d 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-platform-value/Cargo.toml b/packages/rs-platform-value/Cargo.toml index 21805cfab50..2048fc32cee 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index cdb95b1526a..56785f16042 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 = "Bincode based serialization and deserialization" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-platform-versioning/Cargo.toml b/packages/rs-platform-versioning/Cargo.toml index 11025c10f0f..da5d0cb5c17 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index 8e3c2619653..78aa330a881 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-sdk" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" [dependencies] diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index 3107bb9b832..b6f323fd766 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index 2a7a8a1cb94..ac9b94d6c02 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index 0dfb7404de0..eba054bf3fa 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "8.0.0-pr.1621.8", + "version": "8.0.0-pr.1621.9", "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 e808cc74d00..23f3a291d0e 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "1.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index 9193b724ba2..5e26c181678 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "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 f1c93ddaf7b..2fab24675e7 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.0.0-pr.1621.8" +version = "1.0.0-pr.1621.9" edition = "2021" rust-version = "1.73" license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index 83c76e85d55..6fe9fd9f196 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "1.0.0-pr.1621.8", + "version": "1.0.0-pr.1621.9", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "",