From ffb09794ac7f03ba1fce7a40a6a72e2d51b03df3 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Sat, 1 Mar 2025 21:15:02 +0700 Subject: [PATCH] update to latest dash core 37 --- Cargo.lock | 58 +++++++++++++++---- packages/rs-dpp/Cargo.toml | 4 +- packages/rs-drive-abci/Cargo.toml | 2 +- packages/rs-drive-abci/src/error/execution.rs | 2 +- .../update_masternode_identities/mod.rs | 2 +- .../update_masternode_identities/mod.rs | 2 +- .../update_masternode_identities/v0/mod.rs | 2 +- .../update_operator_identity/mod.rs | 2 +- .../update_operator_identity/v0/mod.rs | 4 +- .../update_voter_identity/mod.rs | 2 +- .../update_voter_identity/v0/mod.rs | 4 +- .../update_state_masternode_list/v0/mod.rs | 2 +- .../mod.rs | 2 +- .../v0/mod.rs | 2 +- .../check_for_ended_vote_polls/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../v0/mod.rs | 8 +-- .../v0/mod.rs | 2 +- .../document_create_transition_action/mod.rs | 2 +- .../rs-drive-abci/src/mimic/test_quorum.rs | 4 +- .../src/platform_types/platform/mod.rs | 2 +- .../src/platform_types/platform_state/mod.rs | 2 +- .../platform_types/platform_state/v0/mod.rs | 2 +- .../v0/for_saving_v0.rs | 4 +- .../v0/for_saving_v1.rs | 4 +- .../platform_types/validator_set/v0/mod.rs | 4 +- .../total_credits_in_platform/v0/mod.rs | 2 +- packages/rs-drive-abci/src/rpc/core.rs | 4 +- .../tests/strategy_tests/execution.rs | 4 +- .../tests/strategy_tests/main.rs | 4 +- .../masternode_list_item_helpers.rs | 4 +- .../tests/strategy_tests/masternodes.rs | 4 +- .../tests/strategy_tests/strategy.rs | 4 +- packages/rs-sdk/Cargo.toml | 2 +- packages/simple-signer/Cargo.toml | 2 +- 35 files changed, 97 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 73617bdce96..8d0210c3f81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -356,6 +356,15 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-compat" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8d4d2746f89841e49230dd26917df1876050f95abafafbe34f47cb534b88d7" +dependencies = [ + "byteorder", +] + [[package]] name = "base64ct" version = "1.6.0" @@ -527,12 +536,33 @@ dependencies = [ "glob", ] +[[package]] +name = "bls-dash-sys" +version = "1.2.5" +source = "git+https://github.com/dashpay/bls-signatures?rev=0bb5c5b03249c463debb5cef5f7e52ee66f3aaab#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" +dependencies = [ + "bindgen 0.65.1", + "cc", + "glob", +] + [[package]] name = "bls-signatures" version = "1.2.5" source = "git+https://github.com/dashpay/bls-signatures?tag=1.3.3#4e070243aed142bc458472f8807ab77527dd879a" dependencies = [ - "bls-dash-sys", + "bls-dash-sys 1.2.5 (git+https://github.com/dashpay/bls-signatures?tag=1.3.3)", + "hex", + "rand", + "serde", +] + +[[package]] +name = "bls-signatures" +version = "1.2.5" +source = "git+https://github.com/dashpay/bls-signatures?rev=0bb5c5b03249c463debb5cef5f7e52ee66f3aaab#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" +dependencies = [ + "bls-dash-sys 1.2.5 (git+https://github.com/dashpay/bls-signatures?rev=0bb5c5b03249c463debb5cef5f7e52ee66f3aaab)", "hex", "rand", "serde", @@ -1210,12 +1240,15 @@ dependencies = [ [[package]] name = "dashcore" -version = "0.35.0" -source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.35.0#521a76bfd7eaa90d2d89dc576808ec5772544f07" +version = "0.37.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.37.0#9cb1184f7a4e84b42c800006398520af1d559cf1" dependencies = [ "anyhow", + "base64-compat", "bech32", "bitflags 2.6.0", + "blake3", + "bls-signatures 1.2.5 (git+https://github.com/dashpay/bls-signatures?rev=0bb5c5b03249c463debb5cef5f7e52ee66f3aaab)", "blsful", "dashcore-private", "dashcore_hashes", @@ -1228,17 +1261,18 @@ dependencies = [ "serde", "serde_repr", "strum", + "thiserror 1.0.64", ] [[package]] name = "dashcore-private" -version = "0.1.0" -source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.35.0#521a76bfd7eaa90d2d89dc576808ec5772544f07" +version = "0.37.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.37.0#9cb1184f7a4e84b42c800006398520af1d559cf1" [[package]] name = "dashcore-rpc" -version = "0.16.0" -source = "git+https://github.com/dashpay/rust-dashcore-rpc?tag=v0.16.0#099e871a64bbff1faf9c1d56014b612a1da1f3e0" +version = "0.37.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.37.0#9cb1184f7a4e84b42c800006398520af1d559cf1" dependencies = [ "dashcore-rpc-json", "hex", @@ -1250,8 +1284,8 @@ dependencies = [ [[package]] name = "dashcore-rpc-json" -version = "0.16.0" -source = "git+https://github.com/dashpay/rust-dashcore-rpc?tag=v0.16.0#099e871a64bbff1faf9c1d56014b612a1da1f3e0" +version = "0.37.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.37.0#9cb1184f7a4e84b42c800006398520af1d559cf1" dependencies = [ "bincode", "dashcore", @@ -1264,8 +1298,8 @@ dependencies = [ [[package]] name = "dashcore_hashes" -version = "0.14.0" -source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.35.0#521a76bfd7eaa90d2d89dc576808ec5772544f07" +version = "0.37.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.37.0#9cb1184f7a4e84b42c800006398520af1d559cf1" dependencies = [ "dashcore-private", "secp256k1", @@ -1539,7 +1573,7 @@ dependencies = [ "async-trait", "base64 0.22.1", "bincode", - "bls-signatures", + "bls-signatures 1.2.5 (git+https://github.com/dashpay/bls-signatures?tag=1.3.3)", "bs58", "chrono", "ciborium", diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index b874eb101a4..09a509111da 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -29,7 +29,7 @@ dashcore = { git = "https://github.com/dashpay/rust-dashcore", features = [ "rand", "signer", "serde", -], default-features = false, tag = "v0.35.0" } +], default-features = false, tag = "v0.37.0" } env_logger = { version = "0.11" } getrandom = { version = "0.2", features = ["js"] } hex = { version = "0.4" } @@ -75,6 +75,8 @@ log = { version = "0.4.22" } [features] default = ["state-transitions"] +core_verification = ["dashcore/message_verification"] +core_quorum_validation = ["dashcore/quorum_validation"] bls-signatures = ["dashcore/bls"] ed25519-dalek = ["dashcore/eddsa"] all_features = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 8f9d6144994..3b9bd54a61f 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -28,7 +28,7 @@ rand = "0.8.5" tempfile = "3.3.0" hex = "0.4.3" indexmap = { version = "2.2.6", features = ["serde"] } -dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore-rpc", tag = "v0.16.0" } +dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" } dpp = { path = "../rs-dpp", features = ["abci"] } simple-signer = { path = "../simple-signer" } rust_decimal = "1.2.5" diff --git a/packages/rs-drive-abci/src/error/execution.rs b/packages/rs-drive-abci/src/error/execution.rs index efa4e2a6c83..0d351a95447 100644 --- a/packages/rs-drive-abci/src/error/execution.rs +++ b/packages/rs-drive-abci/src/error/execution.rs @@ -1,5 +1,5 @@ -use dashcore_rpc::dashcore::consensus::encode::Error as DashCoreConsensusEncodeError; use dpp::bls_signatures::BlsError; +use dpp::dashcore::consensus::encode::Error as DashCoreConsensusEncodeError; use dpp::identity::TimestampMillis; use dpp::version::FeatureVersion; use drive::error::Error as DriveError; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/mod.rs index e2a9176d3cb..ac7cdd08bf5 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/mod.rs @@ -18,7 +18,7 @@ mod update_voter_identity; // mod tests { // use crate::config::PlatformConfig; // use crate::test::helpers::setup::TestPlatformBuilder; -// use dashcore_rpc::dashcore::ProTxHash; +// use dpp::dashcore::ProTxHash; // use dashcore_rpc::dashcore_rpc_json::MasternodeListDiffWithMasternodes; // use dashcore_rpc::json::MasternodeType::Regular; // use dashcore_rpc::json::{DMNState, MasternodeListItem}; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/mod.rs index abbfe75ebd2..913b01ec33c 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/mod.rs @@ -3,9 +3,9 @@ use crate::error::Error; use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; use dashcore_rpc::dashcore_rpc_json::{MasternodeListDiff, MasternodeListItem}; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::ProTxHash; use dpp::version::PlatformVersion; use drive::grovedb::Transaction; use std::collections::BTreeMap; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/v0/mod.rs index 0b7af918d53..3fc5597544d 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/v0/mod.rs @@ -3,10 +3,10 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; use dashcore_rpc::dashcore_rpc_json::MasternodeListDiff; use dashcore_rpc::json::MasternodeListItem; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::ProTxHash; use dpp::version::PlatformVersion; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs index e87425a4b29..13c7e7cc1ab 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/mod.rs @@ -5,7 +5,7 @@ use crate::error::Error; use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; +use dpp::dashcore::ProTxHash; use dpp::version::PlatformVersion; use drive::util::batch::DriveOperation; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs index 7c901380b09..2b88fb4d4f9 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs @@ -5,7 +5,7 @@ use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; +use dpp::dashcore::ProTxHash; use dpp::dashcore::hashes::Hash; use dpp::identifier::{Identifier, MasternodeIdentifiers}; @@ -396,12 +396,12 @@ where mod tests { use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::test::helpers::setup::{TempPlatform, TestPlatformBuilder}; - use dashcore_rpc::dashcore::ProTxHash; use dashcore_rpc::dashcore_rpc_json::{MasternodeListItem, MasternodeType}; use dashcore_rpc::json::DMNState; use dpp::block::block_info::BlockInfo; use dpp::bls_signatures::{Bls12381G2Impl, SecretKey as BlsPrivateKey}; use dpp::dashcore::hashes::Hash; + use dpp::dashcore::ProTxHash; use dpp::dashcore::Txid; use dpp::identifier::MasternodeIdentifiers; use dpp::identity::identity_public_key::v0::IdentityPublicKeyV0; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/mod.rs index f0c711d4d51..08492dc2d8a 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/mod.rs @@ -7,7 +7,7 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ProTxHash; +use dpp::dashcore::ProTxHash; use dashcore_rpc::json::DMNStateDiff; use dpp::block::block_info::BlockInfo; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/v0/mod.rs index a0b6fa68a1c..c10fbd263ef 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_voter_identity/v0/mod.rs @@ -5,8 +5,8 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::ProTxHash; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::ProTxHash; use dashcore_rpc::json::DMNStateDiff; use dpp::block::block_info::BlockInfo; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs index b6c447fa75b..ae809ef7aa9 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs @@ -7,8 +7,8 @@ use crate::platform_types::platform_state::PlatformState; use crate::platform_types::validator_set::v0::ValidatorSetV0Getters; use crate::platform_types::validator_set::ValidatorSet; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::{ProTxHash, QuorumHash}; use dashcore_rpc::dashcore_rpc_json::{DMNStateDiff, MasternodeListDiff, MasternodeType}; +use dpp::dashcore::{ProTxHash, QuorumHash}; use indexmap::IndexMap; use std::collections::{BTreeMap, BTreeSet}; diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/mod.rs index 52eb63c4e44..a22dc58031d 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/mod.rs @@ -2,7 +2,7 @@ use crate::error::execution::ExecutionError; use crate::error::Error; use crate::platform_types::platform::Platform; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ChainLock; +use dpp::dashcore::ChainLock; use dpp::version::PlatformVersion; /// Version 0 diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/v0/mod.rs index f92183277b4..bb86d5928aa 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_chain_lock/make_sure_core_is_synced_to_chain_lock/v0/mod.rs @@ -2,7 +2,7 @@ use crate::error::Error; use crate::execution::platform_events::core_chain_lock::make_sure_core_is_synced_to_chain_lock::CoreSyncStatus; use crate::platform_types::platform::Platform; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::ChainLock; +use dpp::dashcore::ChainLock; use dpp::version::PlatformVersion; impl Platform diff --git a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs index a7175c4c7db..99f9fa150d1 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/voting/check_for_ended_vote_polls/v0/mod.rs @@ -3,8 +3,8 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; use crate::rpc::core::CoreRPCLike; -use dashcore_rpc::dashcore::Network::Testnet; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::Network::Testnet; use dpp::document::DocumentV0Getters; use dpp::prelude::TimestampMillis; use dpp::version::PlatformVersion; diff --git a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/build_untied_withdrawal_transactions_from_documents/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/build_untied_withdrawal_transactions_from_documents/v0/mod.rs index 13da6e72f1f..57c938c0488 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/build_untied_withdrawal_transactions_from_documents/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/build_untied_withdrawal_transactions_from_documents/v0/mod.rs @@ -1,5 +1,5 @@ -use dashcore_rpc::dashcore::consensus::Encodable; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::consensus::Encodable; use dpp::data_contracts::withdrawals_contract; use dpp::data_contracts::withdrawals_contract::v1::document_types::withdrawal; use dpp::document::document_methods::DocumentMethodsV0; diff --git a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/dequeue_and_build_unsigned_withdrawal_transactions/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/dequeue_and_build_unsigned_withdrawal_transactions/v0/mod.rs index 7a37525de68..5729e4fcefa 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/dequeue_and_build_unsigned_withdrawal_transactions/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/dequeue_and_build_unsigned_withdrawal_transactions/v0/mod.rs @@ -1,10 +1,10 @@ -use dashcore_rpc::dashcore::{ - blockdata::transaction::special_transaction::asset_unlock::request_info::AssetUnlockRequestInfo, - hashes::Hash, QuorumHash, -}; use dpp::block::block_info::BlockInfo; use dpp::dashcore::transaction::special_transaction::asset_unlock::qualified_asset_unlock::build_asset_unlock_tx; use dpp::dashcore::Transaction; +use dpp::dashcore::{ + blockdata::transaction::special_transaction::asset_unlock::request_info::AssetUnlockRequestInfo, + hashes::Hash, QuorumHash, +}; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::document::document_methods::DocumentMethodsV0; use dpp::document::{Document, DocumentV0Setters}; diff --git a/packages/rs-drive-abci/src/execution/types/update_state_masternode_list_outcome/v0/mod.rs b/packages/rs-drive-abci/src/execution/types/update_state_masternode_list_outcome/v0/mod.rs index ab04c9770d1..0794c2f52bf 100644 --- a/packages/rs-drive-abci/src/execution/types/update_state_masternode_list_outcome/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/update_state_masternode_list_outcome/v0/mod.rs @@ -1,5 +1,5 @@ -use dashcore_rpc::dashcore::ProTxHash; use dashcore_rpc::dashcore_rpc_json::{MasternodeListDiff, MasternodeListItem}; +use dpp::dashcore::ProTxHash; use std::collections::BTreeMap; /// Represents the outcome of an attempt to update the state of a masternode list. diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs index f238dd8633f..5304f28180b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs @@ -1,4 +1,4 @@ -use dashcore_rpc::dashcore::Network; +use dpp::dashcore::Network; use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; diff --git a/packages/rs-drive-abci/src/mimic/test_quorum.rs b/packages/rs-drive-abci/src/mimic/test_quorum.rs index 389abf3bc1c..188cdeff668 100644 --- a/packages/rs-drive-abci/src/mimic/test_quorum.rs +++ b/packages/rs-drive-abci/src/mimic/test_quorum.rs @@ -1,11 +1,11 @@ use crate::platform_types::validator::v0::ValidatorV0; use crate::platform_types::validator_set::v0::ValidatorSetV0; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::{ProTxHash, PubkeyHash, QuorumHash}; use dashcore_rpc::dashcore_rpc_json::{QuorumInfoResult, QuorumMember, QuorumType}; use dpp::bls_signatures::{ Bls12381G2Impl, PublicKey as BlsPublicKey, PublicKey, SecretKey as BlsPrivateKey, SecretKey, }; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::{ProTxHash, PubkeyHash, QuorumHash}; use rand::rngs::StdRng; use rand::Rng; use std::collections::BTreeMap; diff --git a/packages/rs-drive-abci/src/platform_types/platform/mod.rs b/packages/rs-drive-abci/src/platform_types/platform/mod.rs index 379c3a4b571..b7963382b26 100644 --- a/packages/rs-drive-abci/src/platform_types/platform/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform/mod.rs @@ -14,7 +14,7 @@ use std::str::FromStr; use std::sync::atomic::AtomicU64; use std::sync::Arc; -use dashcore_rpc::dashcore::BlockHash; +use dpp::dashcore::BlockHash; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::platform_state::PlatformState; diff --git a/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs b/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs index d2236ef84cc..d2c89b7f5e2 100644 --- a/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform_state/mod.rs @@ -9,7 +9,6 @@ use crate::platform_types::platform_state::v0::{ }; use crate::platform_types::validator_set::ValidatorSet; -use dashcore_rpc::dashcore_rpc_json::MasternodeListItem; use derive_more::From; use dpp::bincode::{config, Decode, Encode}; use dpp::block::epoch::Epoch; @@ -25,6 +24,7 @@ use indexmap::IndexMap; use crate::config::PlatformConfig; use crate::error::execution::ExecutionError; use crate::platform_types::signature_verification_quorum_set::SignatureVerificationQuorumSet; +use dashcore_rpc::json::MasternodeListItem; use dpp::block::block_info::BlockInfo; use dpp::fee::default_costs::CachedEpochIndexFeeVersions; use dpp::util::hash::hash_double; diff --git a/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs b/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs index 6bd7cd1fb69..151ef592f6d 100644 --- a/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform_state/v0/mod.rs @@ -2,10 +2,10 @@ mod old_structures; use crate::error::execution::ExecutionError; use crate::error::Error; -use dashcore_rpc::dashcore::{ProTxHash, QuorumHash}; use dashcore_rpc::dashcore_rpc_json::MasternodeListItem; use dpp::block::epoch::{Epoch, EPOCH_0}; use dpp::block::extended_block_info::ExtendedBlockInfo; +use dpp::dashcore::{ProTxHash, QuorumHash}; use dpp::bincode::{Decode, Encode}; use dpp::dashcore::hashes::Hash; diff --git a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs index e35ea2a27d2..2800dc0683b 100644 --- a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs +++ b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs @@ -5,8 +5,8 @@ use crate::platform_types::signature_verification_quorum_set::{ VerificationQuorum, }; use bincode::{Decode, Encode}; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::QuorumHash; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::QuorumHash; use dpp::platform_value::Bytes32; #[derive(Debug, Clone, Encode, Decode)] diff --git a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs index 588e40fcf96..ba82678d7a5 100644 --- a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs +++ b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs @@ -7,9 +7,9 @@ use crate::platform_types::signature_verification_quorum_set::{ ThresholdBlsPublicKey, VerificationQuorum, }; use bincode::{Decode, Encode}; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::QuorumHash; use dpp::bls_signatures::Bls12381G2Impl; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::QuorumHash; use dpp::platform_value::Bytes32; #[derive(Debug, Clone, Encode, Decode)] diff --git a/packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs b/packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs index 6ce9f40c0b6..44fb1dad933 100644 --- a/packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs @@ -1,8 +1,8 @@ use crate::error::execution::ExecutionError; use crate::error::Error; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::ProTxHash; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::ProTxHash; use crate::platform_types::platform_state::PlatformState; use crate::platform_types::validator::v0::NewValidatorIfMasternodeInState; diff --git a/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs b/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs index 829950e1f16..1554d7f73cf 100644 --- a/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/system/total_credits_in_platform/v0/mod.rs @@ -138,8 +138,8 @@ mod tests { use super::*; use crate::query::tests::setup_platform; use crate::test::helpers::fast_forward_to_block::fast_forward_to_block; - use dashcore_rpc::dashcore::Network; use dpp::block::epoch::EpochIndex; + use dpp::dashcore::Network; use dpp::fee::Credits; use dpp::prelude::CoreBlockHeight; use drive::drive::Drive; diff --git a/packages/rs-drive-abci/src/rpc/core.rs b/packages/rs-drive-abci/src/rpc/core.rs index 91ded6f6fe3..633132a489c 100644 --- a/packages/rs-drive-abci/src/rpc/core.rs +++ b/packages/rs-drive-abci/src/rpc/core.rs @@ -1,11 +1,11 @@ -use dashcore_rpc::dashcore::ephemerealdata::chain_lock::ChainLock; -use dashcore_rpc::dashcore::{Block, BlockHash, QuorumHash, Transaction, Txid}; use dashcore_rpc::dashcore_rpc_json::{ AssetUnlockStatusResult, ExtendedQuorumDetails, ExtendedQuorumListResult, GetChainTipsResult, MasternodeListDiff, MnSyncStatus, QuorumInfoResult, QuorumType, SoftforkInfo, }; use dashcore_rpc::json::GetRawTransactionResult; use dashcore_rpc::{Auth, Client, Error, RpcApi}; +use dpp::dashcore::ephemerealdata::chain_lock::ChainLock; +use dpp::dashcore::{Block, BlockHash, QuorumHash, Transaction, Txid}; use dpp::dashcore::{Header, InstantLock}; use dpp::prelude::TimestampMillis; use serde_json::Value; diff --git a/packages/rs-drive-abci/tests/strategy_tests/execution.rs b/packages/rs-drive-abci/tests/strategy_tests/execution.rs index 8ec4d13a37a..854404e9307 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/execution.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/execution.rs @@ -6,8 +6,6 @@ use crate::strategy::{ StrategyRandomness, ValidatorVersionMigration, }; use crate::verify_state_transitions::verify_state_transitions_were_or_were_not_executed; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::{BlockHash, ProTxHash, QuorumHash}; use dashcore_rpc::dashcore_rpc_json::{ Bip9SoftforkInfo, Bip9SoftforkStatus, DMNStateDiff, ExtendedQuorumDetails, MasternodeListDiff, MasternodeListItem, QuorumInfoResult, QuorumType, SoftforkType, @@ -15,6 +13,8 @@ use dashcore_rpc::dashcore_rpc_json::{ use dpp::block::block_info::BlockInfo; use dpp::block::epoch::Epoch; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::{BlockHash, ProTxHash, QuorumHash}; use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; use strategy_tests::operations::FinalizeBlockOperation::IdentityAddKeys; diff --git a/packages/rs-drive-abci/tests/strategy_tests/main.rs b/packages/rs-drive-abci/tests/strategy_tests/main.rs index 9622e724596..38fc21253b7 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/main.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/main.rs @@ -48,10 +48,10 @@ mod tests { use crate::execution::{continue_chain_for_strategy, run_chain_for_strategy}; use crate::query::QueryStrategy; use crate::strategy::{FailureStrategy, MasternodeListChangesStrategy}; - use dashcore_rpc::dashcore::hashes::Hash; - use dashcore_rpc::dashcore::BlockHash; use dashcore_rpc::json::QuorumType; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; + use dpp::dashcore::hashes::Hash; + use dpp::dashcore::BlockHash; use strategy_tests::operations::DocumentAction::{ DocumentActionReplaceRandom, DocumentActionTransferRandom, }; diff --git a/packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs b/packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs index 4084e7f065f..4df6191ae15 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs @@ -74,9 +74,9 @@ impl UpdateMasternodeListItem for MasternodeListItem { #[cfg(test)] mod tests { use super::*; - use dashcore_rpc::dashcore::hashes::Hash; - use dashcore_rpc::dashcore::{ProTxHash, Txid}; use dashcore_rpc::dashcore_rpc_json::{DMNState, MasternodeType}; + use dpp::dashcore::hashes::Hash; + use dpp::dashcore::{ProTxHash, Txid}; use rand::SeedableRng; use std::net::SocketAddr; diff --git a/packages/rs-drive-abci/tests/strategy_tests/masternodes.rs b/packages/rs-drive-abci/tests/strategy_tests/masternodes.rs index 02a647b66ca..32ecb22fc2f 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/masternodes.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/masternodes.rs @@ -1,8 +1,8 @@ use crate::masternode_list_item_helpers::UpdateMasternodeListItem; -use dashcore_rpc::dashcore::hashes::Hash; -use dashcore_rpc::dashcore::{ProTxHash, QuorumHash, Txid}; use dashcore_rpc::dashcore_rpc_json::{DMNState, MasternodeListItem, MasternodeType}; use dpp::bls_signatures::{Bls12381G2Impl, SecretKey as BlsPrivateKey}; +use dpp::dashcore::hashes::Hash; +use dpp::dashcore::{ProTxHash, QuorumHash, Txid}; use dpp::identity::hash::IdentityPublicKeyHashMethodsV0; use dpp::identity::IdentityPublicKey; use drive_abci::mimic::test_quorum::TestQuorumInfo; diff --git a/packages/rs-drive-abci/tests/strategy_tests/strategy.rs b/packages/rs-drive-abci/tests/strategy_tests/strategy.rs index b93a8957baf..64680b4cd37 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/strategy.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/strategy.rs @@ -1,9 +1,9 @@ use crate::masternodes::MasternodeListItemWithUpdates; use crate::query::QueryStrategy; use crate::BlockHeight; -use dashcore_rpc::dashcore::{Network, PrivateKey}; -use dashcore_rpc::dashcore::{ProTxHash, QuorumHash}; use dpp::block::block_info::BlockInfo; +use dpp::dashcore::{Network, PrivateKey}; +use dpp::dashcore::{ProTxHash, QuorumHash}; use dpp::state_transition::identity_topup_transition::methods::IdentityTopUpTransitionMethodsV0; use dpp::ProtocolError; diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index abc46745941..1008a9b35ca 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -38,7 +38,7 @@ envy = { version = "0.4.2", optional = true } futures = { version = "0.3.30" } derive_more = { version = "1.0", features = ["from"] } # dashcore-rpc is only needed for core rpc; TODO remove once we have correct core rpc impl -dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore-rpc", tag = "v0.16.0" } +dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" } lru = { version = "0.12.5", optional = true } bip37-bloom-filter = { git = "https://github.com/dashpay/rs-bip37-bloom-filter", branch = "develop" } zeroize = { version = "1.8", features = ["derive"] } diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index f6a91dc988d..97ad29d953a 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -8,6 +8,6 @@ rust-version.workspace = true [dependencies] bincode = { version = "2.0.0-rc.3", features = ["serde"] } -dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore-rpc", tag = "v0.16.0" } +dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" } dpp = { path = "../rs-dpp", features = ["abci"] } base64 = { version = "0.22.1" }