Skip to content

Commit

Permalink
chore: update to latest dash core 37 (#2483)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer authored Mar 1, 2025
1 parent 1501103 commit 6776651
Show file tree
Hide file tree
Showing 35 changed files with 97 additions and 61 deletions.
58 changes: 46 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive-abci/src/error/execution.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<C> Platform<C>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/rs-drive-abci/src/mimic/test_quorum.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive-abci/src/platform_types/platform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit 6776651

Please sign in to comment.