From 76b2750cbac9a10df07ccbdcf520f5f1a9ef3640 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 15:18:08 +0800 Subject: [PATCH 01/61] feat: ferment transactions --- Cargo.lock | 10 ++++++++++ dash/Cargo.toml | 1 + dash/src/blockdata/script/owned.rs | 1 + dash/src/blockdata/transaction/mod.rs | 1 + dash/src/blockdata/transaction/outpoint.rs | 1 + .../transaction/special_transaction/asset_lock.rs | 1 + .../asset_unlock/qualified_asset_unlock.rs | 1 + .../special_transaction/asset_unlock/request_info.rs | 1 + .../asset_unlock/unqualified_asset_unlock.rs | 1 + .../transaction/special_transaction/coinbase.rs | 1 + .../blockdata/transaction/special_transaction/mod.rs | 1 + .../special_transaction/provider_registration.rs | 1 + .../special_transaction/provider_update_registrar.rs | 1 + .../special_transaction/provider_update_revocation.rs | 1 + .../special_transaction/provider_update_service.rs | 1 + .../special_transaction/quorum_commitment.rs | 2 ++ dash/src/blockdata/transaction/txin.rs | 1 + dash/src/blockdata/transaction/txout.rs | 1 + dash/src/blockdata/witness.rs | 1 + dash/src/bls_sig_utils.rs | 2 ++ dash/src/hash_types.rs | 8 ++++++++ 21 files changed, 39 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index ea716ce6..842f614a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -419,6 +419,7 @@ dependencies = [ "dashcore-private", "dashcore_hashes", "ed25519-dalek", + "ferment-macro", "hex", "hex_lit", "lazy_static", @@ -545,6 +546,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ferment-macro" +version = "0.1.4" +source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#37a2aba1c6dfb8b860d684b9f03093cdd476b740" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ff" version = "0.13.0" diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 1e2f47ad..00d1c033 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -66,6 +66,7 @@ serde_repr = "0.1.19" strum = { version = "0.26", features = ["derive"] } lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } +ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } [dev-dependencies] serde_json = "1.0.96" diff --git a/dash/src/blockdata/script/owned.rs b/dash/src/blockdata/script/owned.rs index 08b5f3b2..7525b446 100644 --- a/dash/src/blockdata/script/owned.rs +++ b/dash/src/blockdata/script/owned.rs @@ -26,6 +26,7 @@ use crate::taproot::TapNodeHash; /// /// [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion #[derive(Default, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] +#[ferment_macro::export] pub struct ScriptBuf(pub Vec); impl ScriptBuf { diff --git a/dash/src/blockdata/transaction/mod.rs b/dash/src/blockdata/transaction/mod.rs index a50f44ce..31e72e35 100644 --- a/dash/src/blockdata/transaction/mod.rs +++ b/dash/src/blockdata/transaction/mod.rs @@ -160,6 +160,7 @@ impl EncodeSigningDataResult { #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct Transaction { /// The protocol version, is currently expected to be 1 or 2 (BIP 68). pub version: u16, diff --git a/dash/src/blockdata/transaction/outpoint.rs b/dash/src/blockdata/transaction/outpoint.rs index f5807ddf..47472f9b 100644 --- a/dash/src/blockdata/transaction/outpoint.rs +++ b/dash/src/blockdata/transaction/outpoint.rs @@ -32,6 +32,7 @@ use crate::io; /// A reference to a transaction output. #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] +#[ferment_macro::export] pub struct OutPoint { /// The referenced transaction's txid. pub txid: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs index 4738fdf7..dd9ce358 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs @@ -37,6 +37,7 @@ use crate::{VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct AssetLockPayload { pub version: u8, pub credit_outputs: Vec, diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs index c5857232..f94f4bcd 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs @@ -48,6 +48,7 @@ pub const ASSET_UNLOCK_TX_SIZE: usize = 190; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct AssetUnlockPayload { /// The base information about the asset unlock. This base information is the information that /// should be put into a queue. diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs index 69ced224..8d4e272d 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs @@ -31,6 +31,7 @@ use crate::prelude::*; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct AssetUnlockRequestInfo { /// The core request height of the transaction. This should match a period where the quorum_hash /// is still active diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs index 07f634cb..47eebe17 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs @@ -35,6 +35,7 @@ use crate::{ScriptBuf, TxIn, VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct AssetUnlockBasePayload { /// The payload protocol version, is currently expected to be 0. pub version: u8, diff --git a/dash/src/blockdata/transaction/special_transaction/coinbase.rs b/dash/src/blockdata/transaction/special_transaction/coinbase.rs index 7a559900..b6df7049 100644 --- a/dash/src/blockdata/transaction/special_transaction/coinbase.rs +++ b/dash/src/blockdata/transaction/special_transaction/coinbase.rs @@ -31,6 +31,7 @@ use crate::{VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct CoinbasePayload { pub version: u16, pub height: u32, diff --git a/dash/src/blockdata/transaction/special_transaction/mod.rs b/dash/src/blockdata/transaction/special_transaction/mod.rs index 9f0baff0..914bb108 100644 --- a/dash/src/blockdata/transaction/special_transaction/mod.rs +++ b/dash/src/blockdata/transaction/special_transaction/mod.rs @@ -60,6 +60,7 @@ pub mod quorum_commitment; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub enum TransactionPayload { /// A wrapper for a Masternode Registration payload ProviderRegistrationPayloadType(ProviderRegistrationPayload), diff --git a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs index 2667a392..4973e77f 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs @@ -60,6 +60,7 @@ use crate::{Address, Network, OutPoint, ScriptBuf, VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct ProviderRegistrationPayload { pub version: u16, pub provider_type: u16, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs index 19e45195..c5b74b85 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs @@ -44,6 +44,7 @@ use crate::{ScriptBuf, VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct ProviderUpdateRegistrarPayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs index cc6d63bc..03f34802 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs @@ -50,6 +50,7 @@ use crate::io; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct ProviderUpdateRevocationPayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs index 9ca32c13..de93ffd0 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs @@ -49,6 +49,7 @@ use crate::{ScriptBuf, VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct ProviderUpdateServicePayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs index 87e648c1..a5cc455f 100644 --- a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs +++ b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs @@ -35,6 +35,7 @@ use crate::{VarInt, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct QuorumFinalizationCommitment { pub version: u16, pub llmq_type: u8, @@ -125,6 +126,7 @@ impl Decodable for QuorumFinalizationCommitment { #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct QuorumCommitmentPayload { version: u16, height: u32, diff --git a/dash/src/blockdata/transaction/txin.rs b/dash/src/blockdata/transaction/txin.rs index 08b12423..2261e137 100644 --- a/dash/src/blockdata/transaction/txin.rs +++ b/dash/src/blockdata/transaction/txin.rs @@ -29,6 +29,7 @@ use crate::{Witness, io}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct TxIn { /// The reference to the previous output that is being used an an input. pub previous_output: OutPoint, diff --git a/dash/src/blockdata/transaction/txout.rs b/dash/src/blockdata/transaction/txout.rs index 78d3d7db..d1d2e107 100644 --- a/dash/src/blockdata/transaction/txout.rs +++ b/dash/src/blockdata/transaction/txout.rs @@ -27,6 +27,7 @@ use crate::{Address, PubkeyHash, ScriptBuf, ScriptHash, VarInt}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct TxOut { /// The value of the output, in satoshis. pub value: u64, diff --git a/dash/src/blockdata/witness.rs b/dash/src/blockdata/witness.rs index b83c7f15..722311b6 100644 --- a/dash/src/blockdata/witness.rs +++ b/dash/src/blockdata/witness.rs @@ -29,6 +29,7 @@ use crate::{Script, VarInt}; /// /// [segwit upgrade]: #[derive(Clone, Default, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] +#[ferment_macro::export] pub struct Witness { /// Contains the witness `Vec>` serialization without the initial varint indicating the /// number of elements (which is stored in `witness_elements`). diff --git a/dash/src/bls_sig_utils.rs b/dash/src/bls_sig_utils.rs index cdae7531..b949d61d 100644 --- a/dash/src/bls_sig_utils.rs +++ b/dash/src/bls_sig_utils.rs @@ -27,6 +27,7 @@ use crate::prelude::String; /// A BLS Public key is 48 bytes in the scheme used for Dash Core #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy, Debug)] +#[ferment_macro::export] pub struct BLSPublicKey([u8; 48]); impl_array_newtype!(BLSPublicKey, u8, 48); @@ -60,6 +61,7 @@ impl fmt::Display for BLSPublicKey { /// A BLS Signature is 96 bytes in the scheme used for Dash Core #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy)] +#[ferment_macro::export] pub struct BLSSignature([u8; 96]); impl_array_newtype!(BLSSignature, u8, 96); diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index 612e5ddc..a229c790 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -94,6 +94,7 @@ mod newtypes { hash_newtype! { /// A dash transaction hash/transaction ID. + #[ferment_macro::export] pub struct Txid(sha256d::Hash); /// A dash witness transaction ID. @@ -103,6 +104,7 @@ mod newtypes { /// A hash of a public key. + #[ferment_macro::export] pub struct PubkeyHash(hash160::Hash); /// A hash of Dash Script bytecode. pub struct ScriptHash(hash160::Hash); @@ -128,17 +130,23 @@ mod newtypes { /// Dash Additions /// /// The merkle root of the masternode list + #[ferment_macro::export] pub struct MerkleRootMasternodeList(sha256d::Hash); /// The merkle root of the quorums + #[ferment_macro::export] pub struct MerkleRootQuorums(sha256d::Hash); /// A special transaction payload hash + #[ferment_macro::export] pub struct SpecialTransactionPayloadHash(sha256d::Hash); /// A hash of all transaction inputs + #[ferment_macro::export] pub struct InputsHash(sha256d::Hash); /// A hash used to identify a quorum #[hash_newtype(forward)] + #[ferment_macro::export] pub struct QuorumHash(sha256d::Hash); /// A hash of a quorum verification vector + #[ferment_macro::export] pub struct QuorumVVecHash(sha256d::Hash); /// A hash of a quorum signing request id pub struct QuorumSigningRequestId(sha256d::Hash); From b070b5511c4be7fba54206ea86db09afaf30d43f Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 17:27:31 +0800 Subject: [PATCH 02/61] chore: include hashes, make public --- Cargo.lock | 1 + dash/src/blockdata/script/mod.rs | 2 +- .../special_transaction/quorum_commitment.rs | 6 +++--- dash/src/blockdata/witness.rs | 6 +++--- dash/src/bls_sig_utils.rs | 4 ++-- dash/src/hash_types.rs | 19 ++++++++++--------- hashes/Cargo.toml | 2 +- hashes/src/internal_macros.rs | 3 ++- 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 842f614a..103c940f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,6 +444,7 @@ dependencies = [ "core2 0.3.3", "dashcore-private", "dyn-clone", + "ferment-macro", "rs-x11-hash", "schemars", "secp256k1", diff --git a/dash/src/blockdata/script/mod.rs b/dash/src/blockdata/script/mod.rs index 72cd6f31..e5bf6d85 100644 --- a/dash/src/blockdata/script/mod.rs +++ b/dash/src/blockdata/script/mod.rs @@ -69,7 +69,7 @@ use crate::{OutPoint, io}; mod borrowed; mod builder; mod instruction; -mod owned; +pub mod owned; mod push_bytes; #[cfg(test)] mod tests; diff --git a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs index a5cc455f..d34c6af4 100644 --- a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs +++ b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs @@ -128,9 +128,9 @@ impl Decodable for QuorumFinalizationCommitment { #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[ferment_macro::export] pub struct QuorumCommitmentPayload { - version: u16, - height: u32, - finalization_commitment: QuorumFinalizationCommitment, + pub version: u16, + pub height: u32, + pub finalization_commitment: QuorumFinalizationCommitment, } impl QuorumCommitmentPayload { diff --git a/dash/src/blockdata/witness.rs b/dash/src/blockdata/witness.rs index 722311b6..85a22e4d 100644 --- a/dash/src/blockdata/witness.rs +++ b/dash/src/blockdata/witness.rs @@ -33,17 +33,17 @@ use crate::{Script, VarInt}; pub struct Witness { /// Contains the witness `Vec>` serialization without the initial varint indicating the /// number of elements (which is stored in `witness_elements`). - content: Vec, + pub content: Vec, /// The number of elements in the witness. /// /// Stored separately (instead of as a VarInt in the initial part of content) so that methods /// like [`Witness::push`] don't have to shift the entire array. - witness_elements: usize, + pub witness_elements: usize, /// This is the valid index pointing to the beginning of the index area. This area is 4 * /// stack_size bytes at the end of the content vector which stores the indices of each item. - indices_start: usize, + pub indices_start: usize, } /// An iterator returning individual witness elements. diff --git a/dash/src/bls_sig_utils.rs b/dash/src/bls_sig_utils.rs index b949d61d..2b8b2ffb 100644 --- a/dash/src/bls_sig_utils.rs +++ b/dash/src/bls_sig_utils.rs @@ -28,7 +28,7 @@ use crate::prelude::String; #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy, Debug)] #[ferment_macro::export] -pub struct BLSPublicKey([u8; 48]); +pub struct BLSPublicKey(pub [u8; 48]); impl_array_newtype!(BLSPublicKey, u8, 48); @@ -62,7 +62,7 @@ impl fmt::Display for BLSPublicKey { #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy)] #[ferment_macro::export] -pub struct BLSSignature([u8; 96]); +pub struct BLSSignature(pub [u8; 96]); impl_array_newtype!(BLSSignature, u8, 96); impl_bytes_newtype!(BLSSignature, 96); diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index a229c790..f6ab9d6f 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -95,7 +95,7 @@ mod newtypes { hash_newtype! { /// A dash transaction hash/transaction ID. #[ferment_macro::export] - pub struct Txid(sha256d::Hash); + pub struct Txid(pub sha256d::Hash); /// A dash witness transaction ID. pub struct Wtxid(sha256d::Hash); @@ -105,7 +105,7 @@ mod newtypes { /// A hash of a public key. #[ferment_macro::export] - pub struct PubkeyHash(hash160::Hash); + pub struct PubkeyHash(pub hash160::Hash); /// A hash of Dash Script bytecode. pub struct ScriptHash(hash160::Hash); /// SegWit version of a public key hash. @@ -131,25 +131,26 @@ mod newtypes { /// /// The merkle root of the masternode list #[ferment_macro::export] - pub struct MerkleRootMasternodeList(sha256d::Hash); + pub struct MerkleRootMasternodeList(pub sha256d::Hash); /// The merkle root of the quorums #[ferment_macro::export] - pub struct MerkleRootQuorums(sha256d::Hash); + pub struct MerkleRootQuorums(pub sha256d::Hash); /// A special transaction payload hash #[ferment_macro::export] - pub struct SpecialTransactionPayloadHash(sha256d::Hash); + pub struct SpecialTransactionPayloadHash(pub sha256d::Hash); /// A hash of all transaction inputs #[ferment_macro::export] - pub struct InputsHash(sha256d::Hash); + pub struct InputsHash(pub sha256d::Hash); /// A hash used to identify a quorum #[hash_newtype(forward)] #[ferment_macro::export] - pub struct QuorumHash(sha256d::Hash); + pub struct QuorumHash(pub sha256d::Hash); /// A hash of a quorum verification vector #[ferment_macro::export] - pub struct QuorumVVecHash(sha256d::Hash); + pub struct QuorumVVecHash(pub sha256d::Hash); /// A hash of a quorum signing request id - pub struct QuorumSigningRequestId(sha256d::Hash); + #[ferment_macro::export] + pub struct QuorumSigningRequestId(pub sha256d::Hash); /// ProTxHash is a pro-tx hash #[hash_newtype(forward)] pub struct ProTxHash(sha256d::Hash); diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 09f28a3f..08ec572e 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -38,7 +38,7 @@ dyn-clone = { version = "<=1.0.7", default_features = false, optional = true } secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" } rs-x11-hash = { version = "0.1.8", optional = true } - +ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } [dev-dependencies] serde_test = "1.0" serde_json = "1.0" diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index d5d46822..f34a8fe3 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -203,8 +203,9 @@ macro_rules! hash_type { #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "schemars", derive(crate::schemars::JsonSchema))] #[repr(transparent)] + #[ferment_macro::export] pub struct Hash( - #[cfg_attr(feature = "schemars", schemars(schema_with = $schemars))] [u8; $bits / 8], + #[cfg_attr(feature = "schemars", schemars(schema_with = $schemars))] pub [u8; $bits / 8], ); impl Hash { From 7d12f2a4a70e6fad42ed4f8c023b3e81fde78ed3 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 17:36:32 +0800 Subject: [PATCH 03/61] chore: refine TxOut import --- .../asset_unlock/unqualified_asset_unlock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs index 47eebe17..a9cf4317 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs @@ -27,7 +27,7 @@ use crate::blockdata::transaction::special_transaction::TransactionType::AssetUn use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{PubkeyHash, ScriptHash}; use crate::prelude::*; -use crate::transaction::TxOut; +use crate::blockdata::transaction::TxOut; use crate::{ScriptBuf, TxIn, VarInt, io}; /// An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make From dc50bc02dd90f70859fed1389857a685d0314273 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 17:48:17 +0800 Subject: [PATCH 04/61] chore: refine txout --- .../src/blockdata/transaction/special_transaction/asset_lock.rs | 2 +- .../asset_unlock/unqualified_asset_unlock.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs index dd9ce358..88e2e59a 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs @@ -24,7 +24,7 @@ use crate::consensus::{Decodable, Encodable, encode}; use crate::prelude::*; -use crate::transaction::txout::TxOut; +use crate::blockdata::transaction::txout::TxOut; use crate::{VarInt, io}; /// An Asset Lock payload. This is contained as the payload of an asset lock special transaction. diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs index a9cf4317..e9f239ee 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs @@ -27,7 +27,7 @@ use crate::blockdata::transaction::special_transaction::TransactionType::AssetUn use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{PubkeyHash, ScriptHash}; use crate::prelude::*; -use crate::blockdata::transaction::TxOut; +use crate::blockdata::transaction::txout::TxOut; use crate::{ScriptBuf, TxIn, VarInt, io}; /// An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make From be8759cddb9a62fc827cfab71c83fdf0ecdd79d7 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 18:26:32 +0800 Subject: [PATCH 05/61] chore: export instantlock --- dash/src/ephemerealdata/instant_lock.rs | 1 + dash/src/hash_types.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dash/src/ephemerealdata/instant_lock.rs b/dash/src/ephemerealdata/instant_lock.rs index 8a3f505a..b3655876 100644 --- a/dash/src/ephemerealdata/instant_lock.rs +++ b/dash/src/ephemerealdata/instant_lock.rs @@ -22,6 +22,7 @@ const IS_LOCK_REQUEST_ID_PREFIX: &str = "islock"; /// Instant send lock is a mechanism used by the Dash network to /// confirm transaction within 1 or 2 seconds. This data structure /// represents a p2p message containing a data to verify such a lock. +#[ferment_macro::export] pub struct InstantLock { /// Instant lock version pub version: u8, diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index f6ab9d6f..39d56e24 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -82,7 +82,8 @@ mod newtypes { /// A dash block hash. pub struct BlockHash(hash_x11::Hash); /// CycleHash is a cycle hash - pub struct CycleHash(hash_x11::Hash); + #[ferment_macro::export] + pub struct CycleHash(pub hash_x11::Hash); } #[cfg(not(feature = "core-block-hash-use-x11"))] hash_newtype! { From 7dd028251a92f72b1b4c2468c1c2a27b6ba1f83c Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 18:33:06 +0800 Subject: [PATCH 06/61] chore: import vec --- dash/src/ephemerealdata/instant_lock.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/src/ephemerealdata/instant_lock.rs b/dash/src/ephemerealdata/instant_lock.rs index b3655876..e386b288 100644 --- a/dash/src/ephemerealdata/instant_lock.rs +++ b/dash/src/ephemerealdata/instant_lock.rs @@ -5,8 +5,8 @@ #[cfg(all(not(feature = "std"), not(test)))] use alloc::vec::Vec; use core::fmt::{Debug, Formatter}; -#[cfg(any(feature = "std", test))] -pub use std::vec::Vec; +// #[cfg(any(feature = "std", test))] +// pub use std::vec::Vec; use hashes::{Hash, HashEngine}; From eb173d2cf05bd4e667cbc550dc89e6c395cae13a Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 18:43:28 +0800 Subject: [PATCH 07/61] chore: remove vec import --- dash/src/ephemerealdata/instant_lock.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/src/ephemerealdata/instant_lock.rs b/dash/src/ephemerealdata/instant_lock.rs index e386b288..c5f78d87 100644 --- a/dash/src/ephemerealdata/instant_lock.rs +++ b/dash/src/ephemerealdata/instant_lock.rs @@ -2,8 +2,8 @@ //! confirm transaction within 1 or 2 seconds. This data structure //! represents a p2p message containing a data to verify such a lock. -#[cfg(all(not(feature = "std"), not(test)))] -use alloc::vec::Vec; +// #[cfg(all(not(feature = "std"), not(test)))] +// use alloc::vec::Vec; use core::fmt::{Debug, Formatter}; // #[cfg(any(feature = "std", test))] // pub use std::vec::Vec; From 41286566c53f32c7bf7af1fdd8c427b1ab311722 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 19:02:28 +0800 Subject: [PATCH 08/61] chore: refine islock imports --- dash/src/ephemerealdata/instant_lock.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dash/src/ephemerealdata/instant_lock.rs b/dash/src/ephemerealdata/instant_lock.rs index c5f78d87..6dc73a47 100644 --- a/dash/src/ephemerealdata/instant_lock.rs +++ b/dash/src/ephemerealdata/instant_lock.rs @@ -10,11 +10,12 @@ use core::fmt::{Debug, Formatter}; use hashes::{Hash, HashEngine}; +use crate::blockdata::transaction::outpoint::OutPoint; use crate::bls_sig_utils::BLSSignature; -use crate::consensus::Encodable; -use crate::hash_types::{CycleHash, QuorumSigningRequestId}; +use crate::consensus::{Encodable, encode::VarInt}; +use crate::hash_types::{CycleHash, QuorumSigningRequestId, Txid}; use crate::internal_macros::impl_consensus_encoding; -use crate::{OutPoint, Txid, VarInt, io}; +use crate::io; const IS_LOCK_REQUEST_ID_PREFIX: &str = "islock"; From 6f7c7afc0098a818631b75d4ae5799b50cbe2645 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 21 Jan 2025 20:38:15 +0800 Subject: [PATCH 09/61] chore: hash_newtype + ferment --- dash/src/hash_types.rs | 10 ---------- hashes/src/util.rs | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index 39d56e24..194ccd08 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -82,7 +82,6 @@ mod newtypes { /// A dash block hash. pub struct BlockHash(hash_x11::Hash); /// CycleHash is a cycle hash - #[ferment_macro::export] pub struct CycleHash(pub hash_x11::Hash); } #[cfg(not(feature = "core-block-hash-use-x11"))] @@ -95,7 +94,6 @@ mod newtypes { hash_newtype! { /// A dash transaction hash/transaction ID. - #[ferment_macro::export] pub struct Txid(pub sha256d::Hash); /// A dash witness transaction ID. @@ -105,7 +103,6 @@ mod newtypes { /// A hash of a public key. - #[ferment_macro::export] pub struct PubkeyHash(pub hash160::Hash); /// A hash of Dash Script bytecode. pub struct ScriptHash(hash160::Hash); @@ -131,26 +128,19 @@ mod newtypes { /// Dash Additions /// /// The merkle root of the masternode list - #[ferment_macro::export] pub struct MerkleRootMasternodeList(pub sha256d::Hash); /// The merkle root of the quorums - #[ferment_macro::export] pub struct MerkleRootQuorums(pub sha256d::Hash); /// A special transaction payload hash - #[ferment_macro::export] pub struct SpecialTransactionPayloadHash(pub sha256d::Hash); /// A hash of all transaction inputs - #[ferment_macro::export] pub struct InputsHash(pub sha256d::Hash); /// A hash used to identify a quorum #[hash_newtype(forward)] - #[ferment_macro::export] pub struct QuorumHash(pub sha256d::Hash); /// A hash of a quorum verification vector - #[ferment_macro::export] pub struct QuorumVVecHash(pub sha256d::Hash); /// A hash of a quorum signing request id - #[ferment_macro::export] pub struct QuorumSigningRequestId(pub sha256d::Hash); /// ProTxHash is a pro-tx hash #[hash_newtype(forward)] diff --git a/hashes/src/util.rs b/hashes/src/util.rs index 91195f01..eccc80bc 100644 --- a/hashes/src/util.rs +++ b/hashes/src/util.rs @@ -195,7 +195,7 @@ macro_rules! hash_newtype { $($crate::hash_newtype_known_attrs!(#[ $($type_attrs)* ]);)* $crate::hash_newtype_struct! { - $type_vis struct $newtype($(#[$field_attrs])* $field_vis $hash); + #[ferment_macro::export] $type_vis struct $newtype($(#[$field_attrs])* $field_vis $hash); $({ $($type_attrs)* })* } From d16e8622d56dd70ed5db9ec25010677d0cd11e20 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Thu, 23 Jan 2025 15:57:10 +0800 Subject: [PATCH 10/61] chore: direct fermentation --- Cargo.lock | 482 ++++++++++++++++++++++++---------- dash/Cargo.toml | 1 + dash/src/hash_types.rs | 14 +- hashes/Cargo.toml | 1 + hashes/src/internal_macros.rs | 2 - hashes/src/util.rs | 2 +- 6 files changed, 350 insertions(+), 152 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 103c940f..e763449d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,17 +14,26 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arrayref" @@ -124,26 +133,36 @@ dependencies = [ [[package]] name = "bip39" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.13.0", "serde", "unicode-normalization", ] +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin-io" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" [[package]] name = "bitcoin_hashes" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative 0.1.2", +] [[package]] name = "bitcoin_hashes" @@ -152,7 +171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" dependencies = [ "bitcoin-io", - "hex-conservative", + "hex-conservative 0.2.1", ] [[package]] @@ -173,9 +192,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bitvec" @@ -256,21 +275,24 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.0.79" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +dependencies = [ + "shlex", +] [[package]] name = "cexpr" @@ -289,25 +311,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", "libloading", ] -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -334,9 +346,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -413,12 +425,13 @@ dependencies = [ "bincode 2.0.0-rc.3", "bip39", "bitcoinconsensus", - "bitflags 2.6.0", + "bitflags 2.8.0", "blsful", "core2 0.3.3", "dashcore-private", "dashcore_hashes", "ed25519-dalek", + "ferment", "ferment-macro", "hex", "hex_lit", @@ -444,6 +457,7 @@ dependencies = [ "core2 0.3.3", "dashcore-private", "dyn-clone", + "ferment", "ferment-macro", "rs-x11-hash", "schemars", @@ -508,9 +522,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -547,10 +561,35 @@ dependencies = [ "zeroize", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "ferment" +version = "0.1.4" +source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#5c486dade92a4e6da17b8683e380ce145cb9c778" +dependencies = [ + "indexmap", + "serde_json", +] + [[package]] name = "ferment-macro" version = "0.1.4" -source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#37a2aba1c6dfb8b860d684b9f03093cdd476b740" +source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#5c486dade92a4e6da17b8683e380ce145cb9c778" dependencies = [ "quote", "syn 1.0.109", @@ -592,9 +631,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +checksum = "e8c8444bc9d71b935156cc0ccab7f622180808af7867b1daae6547d773591703" dependencies = [ "serde", "typenum", @@ -602,9 +641,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -613,9 +652,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -632,9 +671,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hash32" @@ -655,6 +694,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + [[package]] name = "heapless" version = "0.8.0" @@ -683,6 +728,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex-conservative" version = "0.2.1" @@ -716,29 +767,50 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys", +] + [[package]] name = "honggfuzz" -version = "0.5.55" +version = "0.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505" dependencies = [ "lazy_static", "memmap2", "rustc_version", ] +[[package]] +name = "indexmap" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -765,20 +837,26 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.160" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b21006cd1874ae9e650973c565615676dc4a274c965bb0a73796dac838ce4f" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "winapi", + "windows-targets", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "lock_api" version = "0.4.12" @@ -791,21 +869,21 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -822,6 +900,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "minicov" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" +dependencies = [ + "cc", + "walkdir", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -941,9 +1029,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "pairing" @@ -972,15 +1060,18 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.6" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", "syn 2.0.96", @@ -997,9 +1088,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1051,18 +1142,32 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ + "aho-corasick", + "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rs-x11-hash" @@ -1083,24 +1188,46 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" +dependencies = [ + "bitflags 2.8.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schemars" @@ -1126,12 +1253,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -1175,15 +1296,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -1210,9 +1331,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -1232,11 +1353,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1254,9 +1376,9 @@ dependencies = [ [[package]] name = "serde_test" -version = "1.0.164" +version = "1.0.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797c38160e2546a56e1e3439496439597e938669673ffd8af02a12f070da648f" +checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" dependencies = [ "serde", ] @@ -1294,9 +1416,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signature" @@ -1338,7 +1460,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e49360f31b0b75a6a82a5205c6103ea07a79a60808d44f5cc879d303337926" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "spin", ] @@ -1429,9 +1551,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -1459,9 +1581,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -1486,14 +1608,14 @@ checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" [[package]] name = "vsss-rs" -version = "5.0.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d100efd4ff7ccba787b1b1bb0045c2fe1df5ad75f74e3a63f738635d87d50da4" +checksum = "fec4ebcc5594130c31b49594d55c0583fe80621f252f570b222ca4845cafd3cf" dependencies = [ "crypto-bigint", "elliptic-curve", "elliptic-curve-tools", - "generic-array 1.1.0", + "generic-array 1.2.0", "hex", "num", "rand_core", @@ -1503,6 +1625,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1511,23 +1643,23 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.96", @@ -1536,21 +1668,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1558,9 +1691,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -1571,19 +1704,21 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-bindgen-test" -version = "0.3.36" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e636f3a428ff62b3742ebc3c70e254dfe12b8c2b469d688ea59cdd4abcf502" +checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" dependencies = [ - "console_error_panic_hook", "js-sys", - "scoped-tls", + "minicov", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test-macro", @@ -1591,19 +1726,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.36" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f18c1fad2f7c4958e7bcce014fa212f59a65d5e3721d0f77e6c0b27ede936ba3" +checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" dependencies = [ "proc-macro2", "quote", + "syn 2.0.96", ] [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -1611,36 +1747,97 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "winapi-util" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-sys", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "wyz" @@ -1657,6 +1854,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 00d1c033..380e8a90 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -66,6 +66,7 @@ serde_repr = "0.1.19" strum = { version = "0.26", features = ["derive"] } lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } +ferment = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment" } ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } [dev-dependencies] diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index 194ccd08..478919c1 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -82,7 +82,7 @@ mod newtypes { /// A dash block hash. pub struct BlockHash(hash_x11::Hash); /// CycleHash is a cycle hash - pub struct CycleHash(pub hash_x11::Hash); + pub struct CycleHash(hash_x11::Hash); } #[cfg(not(feature = "core-block-hash-use-x11"))] hash_newtype! { @@ -94,7 +94,7 @@ mod newtypes { hash_newtype! { /// A dash transaction hash/transaction ID. - pub struct Txid(pub sha256d::Hash); + pub struct Txid(sha256d::Hash); /// A dash witness transaction ID. pub struct Wtxid(sha256d::Hash); @@ -103,7 +103,7 @@ mod newtypes { /// A hash of a public key. - pub struct PubkeyHash(pub hash160::Hash); + pub struct PubkeyHash(hash160::Hash); /// A hash of Dash Script bytecode. pub struct ScriptHash(hash160::Hash); /// SegWit version of a public key hash. @@ -128,13 +128,13 @@ mod newtypes { /// Dash Additions /// /// The merkle root of the masternode list - pub struct MerkleRootMasternodeList(pub sha256d::Hash); + pub struct MerkleRootMasternodeList(sha256d::Hash); /// The merkle root of the quorums - pub struct MerkleRootQuorums(pub sha256d::Hash); + pub struct MerkleRootQuorums(sha256d::Hash); /// A special transaction payload hash - pub struct SpecialTransactionPayloadHash(pub sha256d::Hash); + pub struct SpecialTransactionPayloadHash(sha256d::Hash); /// A hash of all transaction inputs - pub struct InputsHash(pub sha256d::Hash); + pub struct InputsHash(sha256d::Hash); /// A hash used to identify a quorum #[hash_newtype(forward)] pub struct QuorumHash(pub sha256d::Hash); diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 08ec572e..a5ffc5f4 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -38,6 +38,7 @@ dyn-clone = { version = "<=1.0.7", default_features = false, optional = true } secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" } rs-x11-hash = { version = "0.1.8", optional = true } +ferment = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment" } ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } [dev-dependencies] serde_test = "1.0" diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index f34a8fe3..63baab74 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -203,11 +203,9 @@ macro_rules! hash_type { #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "schemars", derive(crate::schemars::JsonSchema))] #[repr(transparent)] - #[ferment_macro::export] pub struct Hash( #[cfg_attr(feature = "schemars", schemars(schema_with = $schemars))] pub [u8; $bits / 8], ); - impl Hash { fn internal_new(arr: [u8; $bits / 8]) -> Self { Hash(arr) } diff --git a/hashes/src/util.rs b/hashes/src/util.rs index eccc80bc..91195f01 100644 --- a/hashes/src/util.rs +++ b/hashes/src/util.rs @@ -195,7 +195,7 @@ macro_rules! hash_newtype { $($crate::hash_newtype_known_attrs!(#[ $($type_attrs)* ]);)* $crate::hash_newtype_struct! { - #[ferment_macro::export] $type_vis struct $newtype($(#[$field_attrs])* $field_vis $hash); + $type_vis struct $newtype($(#[$field_attrs])* $field_vis $hash); $({ $($type_attrs)* })* } From 49dbc1198343241b64208bb32e8b853a04ccc773 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Thu, 23 Jan 2025 15:58:07 +0800 Subject: [PATCH 11/61] chore: reset pub hashes --- dash/src/hash_types.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index 478919c1..612e5ddc 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -137,11 +137,11 @@ mod newtypes { pub struct InputsHash(sha256d::Hash); /// A hash used to identify a quorum #[hash_newtype(forward)] - pub struct QuorumHash(pub sha256d::Hash); + pub struct QuorumHash(sha256d::Hash); /// A hash of a quorum verification vector - pub struct QuorumVVecHash(pub sha256d::Hash); + pub struct QuorumVVecHash(sha256d::Hash); /// A hash of a quorum signing request id - pub struct QuorumSigningRequestId(pub sha256d::Hash); + pub struct QuorumSigningRequestId(sha256d::Hash); /// ProTxHash is a pro-tx hash #[hash_newtype(forward)] pub struct ProTxHash(sha256d::Hash); From 55476ce5d79eb60630fac9137caa5a084de31a0c Mon Sep 17 00:00:00 2001 From: pankcuf Date: Thu, 23 Jan 2025 15:59:04 +0800 Subject: [PATCH 12/61] chore: reset Hash pub --- hashes/src/internal_macros.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index 63baab74..dad6a2c5 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -204,8 +204,9 @@ macro_rules! hash_type { #[cfg_attr(feature = "schemars", derive(crate::schemars::JsonSchema))] #[repr(transparent)] pub struct Hash( - #[cfg_attr(feature = "schemars", schemars(schema_with = $schemars))] pub [u8; $bits / 8], + #[cfg_attr(feature = "schemars", schemars(schema_with = $schemars))] [u8; $bits / 8], ); + impl Hash { fn internal_new(arr: [u8; $bits / 8]) -> Self { Hash(arr) } From 6d6221822bf458e6859556c93804c3b81e2abd13 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 15:31:00 +0800 Subject: [PATCH 13/61] chore: update with latest master --- Cargo.lock | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 39b8cc94..5a4a05b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -471,6 +471,8 @@ dependencies = [ "dashcore-private", "dashcore_hashes", "ed25519-dalek", + "ferment", + "ferment-macro", "hex", "hex_lit", "lazy_static", @@ -497,6 +499,8 @@ dependencies = [ "core2 0.3.3", "dashcore-private", "dyn-clone", + "ferment", + "ferment-macro", "rs-x11-hash", "schemars", "secp256k1", @@ -599,6 +603,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "ferment" +version = "0.1.4" +source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#eec010c0fc955ef9c1fbf9bcb55e211d7248c262" +dependencies = [ + "indexmap", + "serde_json", +] + +[[package]] +name = "ferment-macro" +version = "0.1.4" +source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#eec010c0fc955ef9c1fbf9bcb55e211d7248c262" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ff" version = "0.13.0" @@ -698,6 +726,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + [[package]] name = "heapless" version = "0.8.0" @@ -770,6 +804,17 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "indexmap" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + [[package]] name = "itoa" version = "1.0.6" @@ -1381,7 +1426,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e49360f31b0b75a6a82a5205c6103ea07a79a60808d44f5cc879d303337926" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "spin", ] From 16ade0aa6d616e7e05ec9bb28d57e9ac885255ae Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 15:54:34 +0800 Subject: [PATCH 14/61] chore: llmqtype fermented --- dash/src/sml/llmq_type/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/src/sml/llmq_type/mod.rs b/dash/src/sml/llmq_type/mod.rs index 282b62f7..c3a8c08f 100644 --- a/dash/src/sml/llmq_type/mod.rs +++ b/dash/src/sml/llmq_type/mod.rs @@ -282,6 +282,7 @@ pub const LLMQ_DEV_PLATFORM: LLMQParams = LLMQParams { #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] +#[ferment_macro::export] pub enum LLMQType { LlmqtypeUnknown = 0, // other kind of Llmqtype50_60 = 1, // 50 members, 30 (60%) threshold, 24 / day From 26f19af7e7a619dca547912e4d4d579544fe8d57 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 16:01:11 +0800 Subject: [PATCH 15/61] chore: switch ferment onto master branch --- Cargo.lock | 6 ++---- dash/Cargo.toml | 4 ++-- hashes/Cargo.toml | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a4a05b8..3f264bc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -499,8 +499,6 @@ dependencies = [ "core2 0.3.3", "dashcore-private", "dyn-clone", - "ferment", - "ferment-macro", "rs-x11-hash", "schemars", "secp256k1", @@ -612,7 +610,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "ferment" version = "0.1.4" -source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#eec010c0fc955ef9c1fbf9bcb55e211d7248c262" +source = "git+https://github.com/dashpay/ferment#9410d894c888f7b30f27207dda3aaaa475070eee" dependencies = [ "indexmap", "serde_json", @@ -621,7 +619,7 @@ dependencies = [ [[package]] name = "ferment-macro" version = "0.1.4" -source = "git+https://github.com/dashpay/ferment?branch=feat%2Flifetime-support#eec010c0fc955ef9c1fbf9bcb55e211d7248c262" +source = "git+https://github.com/dashpay/ferment#9410d894c888f7b30f27207dda3aaaa475070eee" dependencies = [ "quote", "syn 1.0.109", diff --git a/dash/Cargo.toml b/dash/Cargo.toml index ec2fec7f..60bb4a05 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -71,8 +71,8 @@ ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" bls-signatures = { git = "https://github.com/dashpay/bls-signatures", branch = "develop" } -ferment = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment" } -ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } +ferment = { git = "https://github.com/dashpay/ferment", package = "ferment" } +ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro" } [dev-dependencies] serde_json = "1.0.96" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 6bdbeb6d..43236ff4 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -39,8 +39,6 @@ secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" rs-x11-hash = { version = "0.1.8", optional = true } bincode = { version= "2.0.0-rc.3", optional = true } -ferment = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment" } -ferment-macro = { git = "https://github.com/dashpay/ferment", branch = "feat/lifetime-support", package = "ferment-macro" } [dev-dependencies] serde_test = "1.0" From 94489ca752a73e66f75eca371927cc938318e626 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 17:03:28 +0800 Subject: [PATCH 16/61] chore: tmp switch bls-signature to apple --- dash/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 60bb4a05..8fe82b06 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -70,7 +70,8 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", branch = "develop" } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", branch = "develop", features = ["legacy", "bip32", "apple", "use_serde"] } + ferment = { git = "https://github.com/dashpay/ferment", package = "ferment" } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro" } From a28495f76457a0e04df28bb19dafc1dbc7acaec7 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 17:05:57 +0800 Subject: [PATCH 17/61] chore: add some ferment exports for masternode lists --- dash/src/sml/llmq_entry_verification.rs | 1 + dash/src/sml/masternode_list/mod.rs | 1 + dash/src/sml/masternode_list_entry/mod.rs | 3 +++ .../masternode_list_entry/qualified_masternode_list_entry.rs | 1 + dash/src/sml/quorum_entry/qualified_quorum_entry.rs | 1 + 5 files changed, 7 insertions(+) diff --git a/dash/src/sml/llmq_entry_verification.rs b/dash/src/sml/llmq_entry_verification.rs index c238d871..b5ac70f0 100644 --- a/dash/src/sml/llmq_entry_verification.rs +++ b/dash/src/sml/llmq_entry_verification.rs @@ -42,6 +42,7 @@ impl Display for LLMQEntryVerificationSkipStatus { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub enum LLMQEntryVerificationStatus { #[default] Unknown, diff --git a/dash/src/sml/masternode_list/mod.rs b/dash/src/sml/masternode_list/mod.rs index 014ee7c1..1f9111ac 100644 --- a/dash/src/sml/masternode_list/mod.rs +++ b/dash/src/sml/masternode_list/mod.rs @@ -24,6 +24,7 @@ use crate::{BlockHash, ProTxHash, QuorumHash}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct MasternodeList { pub block_hash: BlockHash, pub known_height: u32, diff --git a/dash/src/sml/masternode_list_entry/mod.rs b/dash/src/sml/masternode_list_entry/mod.rs index 205e8837..c8951407 100644 --- a/dash/src/sml/masternode_list_entry/mod.rs +++ b/dash/src/sml/masternode_list_entry/mod.rs @@ -17,6 +17,7 @@ use crate::{ProTxHash, PubkeyHash}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub enum MasternodeType { Regular, HighPerformance { platform_http_port: u16, platform_node_id: PubkeyHash }, @@ -63,6 +64,7 @@ impl Decodable for MasternodeType { } #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] +#[ferment_macro::export] pub struct OperatorPublicKey { // TODO: We are using two different public keys here pub data: BLSPublicKey, @@ -75,6 +77,7 @@ impl_consensus_encoding!(OperatorPublicKey, data, version); #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct MasternodeListEntry { pub version: u16, pub pro_reg_tx_hash: ProTxHash, diff --git a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs index ada167b8..e8239429 100644 --- a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs +++ b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs @@ -14,6 +14,7 @@ use crate::sml::masternode_list_entry::MasternodeListEntry; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[ferment_macro::export] pub struct QualifiedMasternodeListEntry { /// The underlying masternode list entry pub masternode_list_entry: MasternodeListEntry, diff --git a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs index 66bbb67b..f2e548e4 100644 --- a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs +++ b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs @@ -17,6 +17,7 @@ use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] +#[ferment_macro::export] pub struct QualifiedQuorumEntry { /// The underlying quorum entry pub quorum_entry: QuorumEntry, From fde599bbfa88dae54f416bee1a0a42fe46580623 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 17:21:14 +0800 Subject: [PATCH 18/61] chore: cargo.lock --- Cargo.lock | 4 ++-- dash/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f264bc8..cc1ee113 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -220,7 +220,7 @@ dependencies = [ [[package]] name = "bls-dash-sys" version = "1.2.5" -source = "git+https://github.com/dashpay/bls-signatures?branch=develop#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" +source = "git+https://github.com/dashpay/bls-signatures?tag=1.3.5#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" dependencies = [ "bindgen", "cc", @@ -230,7 +230,7 @@ dependencies = [ [[package]] name = "bls-signatures" version = "1.2.5" -source = "git+https://github.com/dashpay/bls-signatures?branch=develop#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" +source = "git+https://github.com/dashpay/bls-signatures?tag=1.3.5#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" dependencies = [ "bls-dash-sys", "hex", diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 8fe82b06..c9926d0e 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -70,7 +70,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", branch = "develop", features = ["legacy", "bip32", "apple", "use_serde"] } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.5", features = ["legacy", "bip32", "apple", "use_serde"] } ferment = { git = "https://github.com/dashpay/ferment", package = "ferment" } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro" } From 66236238e29c078596d02b106d8a1a38a21a3a99 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Feb 2025 18:41:57 +0800 Subject: [PATCH 19/61] chore: adjust imports for ferment --- dash/src/sml/masternode_list/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dash/src/sml/masternode_list/mod.rs b/dash/src/sml/masternode_list/mod.rs index 1f9111ac..8de0a119 100644 --- a/dash/src/sml/masternode_list/mod.rs +++ b/dash/src/sml/masternode_list/mod.rs @@ -14,11 +14,10 @@ use std::collections::BTreeMap; #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; -use crate::hash_types::{MerkleRootMasternodeList, MerkleRootQuorums}; +use crate::hash_types::{BlockHash, MerkleRootMasternodeList, MerkleRootQuorums, ProTxHash, QuorumHash}; use crate::sml::llmq_type::LLMQType; use crate::sml::masternode_list_entry::qualified_masternode_list_entry::QualifiedMasternodeListEntry; use crate::sml::quorum_entry::qualified_quorum_entry::QualifiedQuorumEntry; -use crate::{BlockHash, ProTxHash, QuorumHash}; #[derive(Clone, Eq, PartialEq)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] From c8b35fda317136e6ffb9035dbb90bbd6e2a1fb20 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Fri, 28 Feb 2025 13:43:49 +0700 Subject: [PATCH 20/61] cleanup of imports --- Cargo.lock | 4 ++-- dash/Cargo.toml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 085e723b..9d9cbf06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,7 +462,7 @@ dependencies = [ [[package]] name = "dashcore" -version = "0.36.2" +version = "0.36.3" dependencies = [ "anyhow", "assert_matches", @@ -503,7 +503,7 @@ version = "0.1.0" [[package]] name = "dashcore_hashes" -version = "0.15.2" +version = "0.15.3" dependencies = [ "bincode 2.0.0-rc.3", "core2 0.3.3", diff --git a/dash/Cargo.toml b/dash/Cargo.toml index dcbfce70..d8ab0a61 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -33,6 +33,7 @@ eddsa = ["ed25519-dalek"] quorum_validation = ["bls", "bls-signatures"] message_verification = ["bls"] bincode = [ "dep:bincode", "dashcore_hashes/bincode" ] +apple = [ "ferment", "ferment-macro", "bls-signatures/legacy", "bls-signatures/bip32", "bls-signatures/apple", "bls-signatures/use_serde" ] # At least one of std, no-std must be enabled. # @@ -71,9 +72,9 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.5", features = ["legacy", "bip32", "apple", "use_serde"] } -ferment = { git = "https://github.com/dashpay/ferment", package = "ferment" } -ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro" } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.5", optional = true } +ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } +ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } [dev-dependencies] serde_json = "1.0.96" serde_test = "1.0.19" From 0a7e3421be23cd54d24641ffa5179fe61a07ed99 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Mon, 3 Mar 2025 20:30:06 +0700 Subject: [PATCH 21/61] wrapped apple --- Cargo.lock | 297 +++++++++++++++++- dash/src/blockdata/script/owned.rs | 2 +- dash/src/blockdata/transaction/mod.rs | 2 +- dash/src/blockdata/transaction/outpoint.rs | 2 +- .../special_transaction/asset_lock.rs | 2 +- .../asset_unlock/qualified_asset_unlock.rs | 2 +- .../asset_unlock/request_info.rs | 2 +- .../asset_unlock/unqualified_asset_unlock.rs | 2 +- .../special_transaction/coinbase.rs | 2 +- .../transaction/special_transaction/mod.rs | 2 +- .../provider_registration.rs | 2 +- .../provider_update_registrar.rs | 2 +- .../provider_update_revocation.rs | 2 +- .../provider_update_service.rs | 2 +- .../special_transaction/quorum_commitment.rs | 4 +- dash/src/blockdata/transaction/txin.rs | 2 +- dash/src/blockdata/transaction/txout.rs | 2 +- dash/src/blockdata/witness.rs | 2 +- dash/src/bls_sig_utils.rs | 4 +- dash/src/ephemerealdata/instant_lock.rs | 2 +- dash/src/sml/llmq_entry_verification.rs | 2 +- dash/src/sml/llmq_type/mod.rs | 2 +- dash/src/sml/masternode_list/mod.rs | 2 +- dash/src/sml/masternode_list_entry/mod.rs | 6 +- .../qualified_masternode_list_entry.rs | 2 +- .../quorum_entry/qualified_quorum_entry.rs | 2 +- 26 files changed, 321 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d9cbf06..05506aa8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,6 +29,21 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" version = "1.0.96" @@ -65,6 +80,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64-compat" version = "1.0.0" @@ -349,6 +370,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -372,6 +406,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "core2" version = "0.3.3" @@ -449,9 +489,44 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.98", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.98", +] + [[package]] name = "dash-fuzz" -version = "0.0.1" +version = "0.37.0" dependencies = [ "dashcore", "honggfuzz", @@ -462,7 +537,7 @@ dependencies = [ [[package]] name = "dashcore" -version = "0.36.3" +version = "0.37.0" dependencies = [ "anyhow", "assert_matches", @@ -499,11 +574,36 @@ dependencies = [ [[package]] name = "dashcore-private" -version = "0.1.0" +version = "0.37.0" + +[[package]] +name = "dashcore-rpc" +version = "0.37.0" +dependencies = [ + "dashcore-rpc-json", + "hex", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "dashcore-rpc-json" +version = "0.37.0" +dependencies = [ + "bincode 2.0.0-rc.3", + "dashcore", + "hex", + "serde", + "serde_json", + "serde_repr", + "serde_with", +] [[package]] name = "dashcore_hashes" -version = "0.15.3" +version = "0.37.0" dependencies = [ "bincode 2.0.0-rc.3", "core2 0.3.3", @@ -528,6 +628,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "digest" version = "0.10.7" @@ -539,6 +649,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "dyn-clone" version = "1.0.7" @@ -632,7 +748,7 @@ name = "ferment" version = "0.1.4" source = "git+https://github.com/dashpay/ferment#ccc728e0adbfdf82717bfacc3deb6ddbfe34ece3" dependencies = [ - "indexmap", + "indexmap 2.7.1", "serde_json", ] @@ -662,6 +778,12 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "funty" version = "2.0.0" @@ -734,6 +856,12 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -777,6 +905,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hex-conservative" @@ -837,6 +968,46 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + [[package]] name = "indexmap" version = "2.7.1" @@ -848,6 +1019,17 @@ dependencies = [ "serde", ] +[[package]] +name = "integration_test" +version = "0.0.0" +dependencies = [ + "dashcore-rpc", + "dotenvy", + "hex", + "lazy_static", + "log", +] + [[package]] name = "itoa" version = "1.0.14" @@ -864,6 +1046,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonrpc" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" +dependencies = [ + "base64", + "serde", + "serde_json", +] + [[package]] name = "keccak" version = "0.1.5" @@ -1026,6 +1219,12 @@ dependencies = [ "serde", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.46" @@ -1108,6 +1307,12 @@ dependencies = [ "spki", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.20" @@ -1407,6 +1612,7 @@ version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ + "indexmap 2.7.1", "itoa", "memchr", "ryu", @@ -1433,6 +1639,34 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "serdect" version = "0.2.0" @@ -1514,6 +1748,12 @@ dependencies = [ "spin", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.26.3" @@ -1619,6 +1859,37 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "time" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tinyvec" version = "1.8.1" @@ -1719,6 +1990,7 @@ checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] @@ -1836,6 +2108,21 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + [[package]] name = "windows-sys" version = "0.59.0" diff --git a/dash/src/blockdata/script/owned.rs b/dash/src/blockdata/script/owned.rs index 77f3db76..5d67b3dc 100644 --- a/dash/src/blockdata/script/owned.rs +++ b/dash/src/blockdata/script/owned.rs @@ -29,7 +29,7 @@ use crate::taproot::TapNodeHash; /// [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion #[derive(Default, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ScriptBuf(pub Vec); impl ScriptBuf { diff --git a/dash/src/blockdata/transaction/mod.rs b/dash/src/blockdata/transaction/mod.rs index 63be62b7..e185baa5 100644 --- a/dash/src/blockdata/transaction/mod.rs +++ b/dash/src/blockdata/transaction/mod.rs @@ -163,7 +163,7 @@ impl EncodeSigningDataResult { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct Transaction { /// The protocol version, is currently expected to be 1 or 2 (BIP 68). pub version: u16, diff --git a/dash/src/blockdata/transaction/outpoint.rs b/dash/src/blockdata/transaction/outpoint.rs index 1a9fa5bb..cb49b069 100644 --- a/dash/src/blockdata/transaction/outpoint.rs +++ b/dash/src/blockdata/transaction/outpoint.rs @@ -35,7 +35,7 @@ use crate::io; /// A reference to a transaction output. #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct OutPoint { /// The referenced transaction's txid. pub txid: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs index 6c67eead..ab10873d 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_lock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_lock.rs @@ -41,7 +41,7 @@ use crate::{VarInt, io}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct AssetLockPayload { pub version: u8, pub credit_outputs: Vec, diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs index 809a8e6c..cedb8209 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/qualified_asset_unlock.rs @@ -51,7 +51,7 @@ pub const ASSET_UNLOCK_TX_SIZE: usize = 190; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct AssetUnlockPayload { /// The base information about the asset unlock. This base information is the information that /// should be put into a queue. diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs index f5b47056..cab17d83 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/request_info.rs @@ -35,7 +35,7 @@ use crate::prelude::*; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct AssetUnlockRequestInfo { /// The core request height of the transaction. This should match a period where the quorum_hash /// is still active diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs index 1231bb8d..4f0a67af 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs @@ -39,7 +39,7 @@ use crate::{ScriptBuf, TxIn, VarInt, io}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct AssetUnlockBasePayload { /// The payload protocol version, is currently expected to be 0. pub version: u8, diff --git a/dash/src/blockdata/transaction/special_transaction/coinbase.rs b/dash/src/blockdata/transaction/special_transaction/coinbase.rs index 2ad63411..f8393fee 100644 --- a/dash/src/blockdata/transaction/special_transaction/coinbase.rs +++ b/dash/src/blockdata/transaction/special_transaction/coinbase.rs @@ -35,7 +35,7 @@ use crate::io::{Error, ErrorKind}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct CoinbasePayload { pub version: u16, pub height: u32, diff --git a/dash/src/blockdata/transaction/special_transaction/mod.rs b/dash/src/blockdata/transaction/special_transaction/mod.rs index 9263ac3c..b1651cf6 100644 --- a/dash/src/blockdata/transaction/special_transaction/mod.rs +++ b/dash/src/blockdata/transaction/special_transaction/mod.rs @@ -64,7 +64,7 @@ pub mod quorum_commitment; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum TransactionPayload { /// A wrapper for a Masternode Registration payload ProviderRegistrationPayloadType(ProviderRegistrationPayload), diff --git a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs index 806ba9b3..ccd4be56 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs @@ -97,7 +97,7 @@ impl Decodable for ProviderMasternodeType { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ProviderRegistrationPayload { pub version: u16, pub masternode_type: ProviderMasternodeType, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs index 3f0f815d..66e57bc8 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs @@ -47,7 +47,7 @@ use crate::{ScriptBuf, VarInt, io}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ProviderUpdateRegistrarPayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs index b6fb7c51..ce2b2901 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_revocation.rs @@ -53,7 +53,7 @@ use crate::io; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ProviderUpdateRevocationPayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs index 00252043..e7234f99 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs @@ -52,7 +52,7 @@ use crate::{ScriptBuf, VarInt, io}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ProviderUpdateServicePayload { pub version: u16, pub pro_tx_hash: Txid, diff --git a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs index 9eedcfde..07a965be 100644 --- a/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs +++ b/dash/src/blockdata/transaction/special_transaction/quorum_commitment.rs @@ -39,7 +39,7 @@ use crate::sml::quorum_validation_error::QuorumValidationError; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct QuorumEntry { pub version: u16, pub llmq_type: LLMQType, @@ -181,7 +181,7 @@ impl Decodable for QuorumEntry { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct QuorumCommitmentPayload { pub version: u16, pub height: u32, diff --git a/dash/src/blockdata/transaction/txin.rs b/dash/src/blockdata/transaction/txin.rs index d9fe1b9c..28478acd 100644 --- a/dash/src/blockdata/transaction/txin.rs +++ b/dash/src/blockdata/transaction/txin.rs @@ -33,7 +33,7 @@ use crate::{Witness, io}; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct TxIn { /// The reference to the previous output that is being used an an input. pub previous_output: OutPoint, diff --git a/dash/src/blockdata/transaction/txout.rs b/dash/src/blockdata/transaction/txout.rs index 727b1ede..fe5b79cb 100644 --- a/dash/src/blockdata/transaction/txout.rs +++ b/dash/src/blockdata/transaction/txout.rs @@ -31,7 +31,7 @@ use crate::{Address, PubkeyHash, ScriptBuf, ScriptHash, VarInt}; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct TxOut { /// The value of the output, in satoshis. pub value: u64, diff --git a/dash/src/blockdata/witness.rs b/dash/src/blockdata/witness.rs index f79e9827..62ce74b9 100644 --- a/dash/src/blockdata/witness.rs +++ b/dash/src/blockdata/witness.rs @@ -32,7 +32,7 @@ use crate::{Script, VarInt}; /// [segwit upgrade]: #[derive(Clone, Default, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct Witness { /// Contains the witness `Vec>` serialization without the initial varint indicating the /// number of elements (which is stored in `witness_elements`). diff --git a/dash/src/bls_sig_utils.rs b/dash/src/bls_sig_utils.rs index 80f55924..432a1e4a 100644 --- a/dash/src/bls_sig_utils.rs +++ b/dash/src/bls_sig_utils.rs @@ -34,7 +34,7 @@ use crate::sml::quorum_validation_error::QuorumValidationError; #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct BLSPublicKey(pub [u8; 48]); impl BLSPublicKey { @@ -93,7 +93,7 @@ impl fmt::Display for BLSPublicKey { #[rustversion::attr(since(1.48), derive(PartialEq, Eq, Ord, PartialOrd, Hash))] #[derive(Clone, Copy)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct BLSSignature(pub [u8; 96]); impl BLSSignature { diff --git a/dash/src/ephemerealdata/instant_lock.rs b/dash/src/ephemerealdata/instant_lock.rs index 4760bcf4..bea9f2e9 100644 --- a/dash/src/ephemerealdata/instant_lock.rs +++ b/dash/src/ephemerealdata/instant_lock.rs @@ -24,7 +24,7 @@ const IS_LOCK_REQUEST_ID_PREFIX: &str = "islock"; /// Instant send lock is a mechanism used by the Dash network to /// confirm transaction within 1 or 2 seconds. This data structure /// represents a p2p message containing a data to verify such a lock. -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct InstantLock { /// Instant lock version pub version: u8, diff --git a/dash/src/sml/llmq_entry_verification.rs b/dash/src/sml/llmq_entry_verification.rs index 26fdb7cb..287d8cec 100644 --- a/dash/src/sml/llmq_entry_verification.rs +++ b/dash/src/sml/llmq_entry_verification.rs @@ -43,7 +43,7 @@ impl Display for LLMQEntryVerificationSkipStatus { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum LLMQEntryVerificationStatus { #[default] Unknown, diff --git a/dash/src/sml/llmq_type/mod.rs b/dash/src/sml/llmq_type/mod.rs index afa10831..b2129fc6 100644 --- a/dash/src/sml/llmq_type/mod.rs +++ b/dash/src/sml/llmq_type/mod.rs @@ -281,7 +281,7 @@ pub const LLMQ_DEV_PLATFORM: LLMQParams = LLMQParams { #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum LLMQType { LlmqtypeUnknown = 0, // other kind of Llmqtype50_60 = 1, // 50 members, 30 (60%) threshold, 24 / day diff --git a/dash/src/sml/masternode_list/mod.rs b/dash/src/sml/masternode_list/mod.rs index 0d99130e..ce004982 100644 --- a/dash/src/sml/masternode_list/mod.rs +++ b/dash/src/sml/masternode_list/mod.rs @@ -24,7 +24,7 @@ use crate::sml::quorum_entry::qualified_quorum_entry::QualifiedQuorumEntry; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct MasternodeList { pub block_hash: BlockHash, pub known_height: u32, diff --git a/dash/src/sml/masternode_list_entry/mod.rs b/dash/src/sml/masternode_list_entry/mod.rs index f27eeccb..7caa9cb2 100644 --- a/dash/src/sml/masternode_list_entry/mod.rs +++ b/dash/src/sml/masternode_list_entry/mod.rs @@ -17,7 +17,7 @@ use crate::{ProTxHash, PubkeyHash}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum EntryMasternodeType { Regular, HighPerformance { platform_http_port: u16, platform_node_id: PubkeyHash }, @@ -64,7 +64,7 @@ impl Decodable for EntryMasternodeType { } #[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct OperatorPublicKey { // TODO: We are using two different public keys here pub data: BLSPublicKey, @@ -77,7 +77,7 @@ impl_consensus_encoding!(OperatorPublicKey, data, version); #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct MasternodeListEntry { pub version: u16, pub pro_reg_tx_hash: ProTxHash, diff --git a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs index 69aca435..df545aa0 100644 --- a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs +++ b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs @@ -14,7 +14,7 @@ use crate::sml::masternode_list_entry::MasternodeListEntry; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct QualifiedMasternodeListEntry { /// The underlying masternode list entry pub masternode_list_entry: MasternodeListEntry, diff --git a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs index 51bea369..816da216 100644 --- a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs +++ b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs @@ -16,7 +16,7 @@ use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] -#[ferment_macro::export] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct QualifiedQuorumEntry { /// The underlying quorum entry pub quorum_entry: QuorumEntry, From e6027b954a5ea55b60babc26eb220647db4d7fa8 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 4 Mar 2025 20:51:54 +0800 Subject: [PATCH 22/61] chore: convert entry_hash sha256d::Hash <-> Sha256dHash --- dash/src/sml/masternode_list/merkle_roots.rs | 2 +- dash/src/sml/masternode_list_entry/hash.rs | 6 +++--- .../qualified_masternode_list_entry.rs | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dash/src/sml/masternode_list/merkle_roots.rs b/dash/src/sml/masternode_list/merkle_roots.rs index a484d65a..9506c8ee 100644 --- a/dash/src/sml/masternode_list/merkle_roots.rs +++ b/dash/src/sml/masternode_list/merkle_roots.rs @@ -162,7 +162,7 @@ impl MasternodeList { pro_tx_hashes.sort_by(|&s1, &s2| s1.reverse().cmp(&s2.reverse())); pro_tx_hashes .into_iter() - .map(|hash| self.masternodes[hash].entry_hash) + .map(|hash| self.masternodes[hash].entry_hash.to_raw_hash()) .collect::>() }) } diff --git a/dash/src/sml/masternode_list_entry/hash.rs b/dash/src/sml/masternode_list_entry/hash.rs index 51f5932c..384fc49a 100644 --- a/dash/src/sml/masternode_list_entry/hash.rs +++ b/dash/src/sml/masternode_list_entry/hash.rs @@ -1,13 +1,13 @@ use hashes::{Hash, sha256d}; use crate::consensus::Encodable; +use crate::hash_types::Sha256dHash; use crate::sml::masternode_list_entry::MasternodeListEntry; impl MasternodeListEntry { - pub fn calculate_entry_hash(&self) -> sha256d::Hash { + pub fn calculate_entry_hash(&self) -> Sha256dHash { let mut writer = Vec::new(); - self.consensus_encode(&mut writer).expect("encoding failed"); - sha256d::Hash::hash(&writer) + Sha256dHash(sha256d::Hash::hash(&writer)) } } diff --git a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs index df545aa0..50fbe76f 100644 --- a/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs +++ b/dash/src/sml/masternode_list_entry/qualified_masternode_list_entry.rs @@ -2,9 +2,8 @@ use std::cmp::Ordering; #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; -use hashes::{Hash, sha256d}; - -use crate::hash_types::ConfirmedHashHashedWithProRegTx; +use hashes::Hash; +use crate::hash_types::{ConfirmedHashHashedWithProRegTx, Sha256dHash}; use crate::sml::masternode_list_entry::MasternodeListEntry; /// A structured representation of a masternode list entry with a cached entry hash and a confirmed @@ -19,7 +18,7 @@ pub struct QualifiedMasternodeListEntry { /// The underlying masternode list entry pub masternode_list_entry: MasternodeListEntry, /// The computed entry hash - pub entry_hash: sha256d::Hash, + pub entry_hash: Sha256dHash, /// The confirmed hash hashed with the pro_reg_tx if the confirmed hash is set pub confirmed_hash_hashed_with_pro_reg_tx: Option, } From 7efb245e470adad1c1e2e1189392f473702298bd Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 4 Mar 2025 21:01:52 +0800 Subject: [PATCH 23/61] fix: sha256d::hash --- dash/src/sml/masternode_list_entry/hash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/sml/masternode_list_entry/hash.rs b/dash/src/sml/masternode_list_entry/hash.rs index 384fc49a..c6befde0 100644 --- a/dash/src/sml/masternode_list_entry/hash.rs +++ b/dash/src/sml/masternode_list_entry/hash.rs @@ -8,6 +8,6 @@ impl MasternodeListEntry { pub fn calculate_entry_hash(&self) -> Sha256dHash { let mut writer = Vec::new(); self.consensus_encode(&mut writer).expect("encoding failed"); - Sha256dHash(sha256d::Hash::hash(&writer)) + Sha256dHash::from_raw_hash(sha256d::Hash::hash(&writer)) } } From 00ee68cf491f1de930f22b86fb72423e011f6bf9 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 5 Mar 2025 15:46:15 +0800 Subject: [PATCH 24/61] chore: add find_quorum_public_key method --- dash/src/sml/masternode_list/mod.rs | 9 +++++++++ dash/src/sml/masternode_list_engine/mod.rs | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/dash/src/sml/masternode_list/mod.rs b/dash/src/sml/masternode_list/mod.rs index ce004982..de2204b2 100644 --- a/dash/src/sml/masternode_list/mod.rs +++ b/dash/src/sml/masternode_list/mod.rs @@ -15,6 +15,7 @@ use std::collections::BTreeMap; use bincode::{Decode, Encode}; pub use builder::MasternodeListBuilder; +use crate::bls_sig_utils::BLSPublicKey; use crate::hash_types::{BlockHash, MerkleRootMasternodeList, MerkleRootQuorums, ProTxHash, QuorumHash}; use crate::sml::llmq_type::LLMQType; use crate::sml::masternode_list_entry::qualified_masternode_list_entry::QualifiedMasternodeListEntry; @@ -49,4 +50,12 @@ impl MasternodeList { ) -> MasternodeListBuilder { MasternodeListBuilder::new(masternodes, quorums, block_hash, block_height) } + + pub fn find_quorum_public_key(&self, quorum_type: &LLMQType, quorum_hash: &QuorumHash) -> Option { + self.quorums.get(quorum_type) + .and_then(|quorums_of_type| + quorums_of_type.get(quorum_hash) + .map(|quorum| quorum.quorum_entry.quorum_public_key)) + } + } diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index b1996ba9..7aa18632 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -809,6 +809,11 @@ impl MasternodeListEngine { Ok(()) } + + pub fn find_quorum_public_key(&self, quorum_type: &LLMQType, quorum_hash: &QuorumHash) -> Option { + self.masternode_lists.values() + .find_map(|masternode_list| masternode_list.find_quorum_public_key(quorum_type, quorum_hash)) + } } #[cfg(test)] From ead6df7a4aa69513a695435ae882375a1fd0e803 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 5 Mar 2025 16:44:03 +0800 Subject: [PATCH 25/61] chore: tmp ferment QuorumSnapshot --- dash/src/network/message_qrinfo.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dash/src/network/message_qrinfo.rs b/dash/src/network/message_qrinfo.rs index a710ec3c..5d5f9565 100644 --- a/dash/src/network/message_qrinfo.rs +++ b/dash/src/network/message_qrinfo.rs @@ -151,6 +151,7 @@ impl Decodable for QRInfo { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct QuorumSnapshot { pub skip_list_mode: MNSkipListMode, pub active_quorum_members: Vec, // Bitset, length = (active_quorum_members_count + 7) / 8 @@ -208,6 +209,7 @@ impl Decodable for QuorumSnapshot { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum MNSkipListMode { /// Mode 0: No skipping – the skip list is empty. NoSkipping = 0, From beef9fd7ecfafa9f7916339b6b4a2f6821638ef3 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 01:09:07 +0800 Subject: [PATCH 26/61] chore: export quorum errors --- dash/src/lib.rs | 1 + dash/src/sml/quorum_validation_error.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dash/src/lib.rs b/dash/src/lib.rs index 30affae8..06a46bcc 100644 --- a/dash/src/lib.rs +++ b/dash/src/lib.rs @@ -209,6 +209,7 @@ mod prelude { pub use internals::hex::display::DisplayHex; + #[cfg_attr(feature = "apple", ferment_macro::export)] pub type CoreBlockHeight = u32; } diff --git a/dash/src/sml/quorum_validation_error.rs b/dash/src/sml/quorum_validation_error.rs index 1aa3716e..68f4cb76 100644 --- a/dash/src/sml/quorum_validation_error.rs +++ b/dash/src/sml/quorum_validation_error.rs @@ -11,6 +11,7 @@ use crate::{BlockHash, QuorumHash}; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum ClientDataRetrievalError { #[error("Required block not present: {0}")] RequiredBlockNotPresent(BlockHash), @@ -23,6 +24,7 @@ pub enum ClientDataRetrievalError { #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum QuorumValidationError { #[error("Required block not present: {0}")] RequiredBlockNotPresent(BlockHash), From 5df42614ca4b88363c9a183f40ecc7122ba414ed Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 01:36:15 +0800 Subject: [PATCH 27/61] chore: pub message_request_verification --- dash/src/sml/masternode_list_engine/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index 7aa18632..f3722e64 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -1,6 +1,6 @@ mod helpers; #[cfg(feature = "message_verification")] -mod message_request_verification; +pub mod message_request_verification; mod non_rotated_quorum_construction; mod rotated_quorum_construction; #[cfg(feature = "quorum_validation")] From de0019c3bbf394dd47621575017cb05e8d795bc8 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 01:49:25 +0800 Subject: [PATCH 28/61] chore: export chainlock --- dash/src/ephemerealdata/chain_lock.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/src/ephemerealdata/chain_lock.rs b/dash/src/ephemerealdata/chain_lock.rs index 84cb28cb..e8011ede 100644 --- a/dash/src/ephemerealdata/chain_lock.rs +++ b/dash/src/ephemerealdata/chain_lock.rs @@ -25,6 +25,7 @@ const CL_REQUEST_ID_PREFIX: &str = "clsig"; /// reduces mining uncertainty and mitigate 51% attack. /// This data structure represents a p2p message containing a data to verify such a lock. #[derive(Debug, Clone, Eq, PartialEq)] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub struct ChainLock { /// Block height pub block_height: u32, From f9f71dac5ab90050aa5218d24905f8d4581915cf Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 01:50:21 +0800 Subject: [PATCH 29/61] chore: pub MessageVerificationError --- dash/src/sml/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/sml/mod.rs b/dash/src/sml/mod.rs index 2374fa94..3f0d2544 100644 --- a/dash/src/sml/mod.rs +++ b/dash/src/sml/mod.rs @@ -5,7 +5,7 @@ pub mod llmq_type; pub mod masternode_list; pub mod masternode_list_engine; pub mod masternode_list_entry; -mod message_verification_error; +pub mod message_verification_error; mod order_option; pub mod quorum_entry; pub mod quorum_validation_error; From d72b6effc9d4a6800cc460fb1960086fbba78d78 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 16:58:13 +0800 Subject: [PATCH 30/61] chore: pub mod prelude --- dash/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/lib.rs b/dash/src/lib.rs index 06a46bcc..e2568077 100644 --- a/dash/src/lib.rs +++ b/dash/src/lib.rs @@ -185,7 +185,7 @@ mod io_extras { } #[rustfmt::skip] -mod prelude { +pub mod prelude { #[cfg(all(not(feature = "std"), not(test)))] pub use alloc::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, Cow, ToOwned}, slice, rc}; From 80f14ca70a3f57978236de3523554a560b114bfd Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 18:30:06 +0800 Subject: [PATCH 31/61] chore: force bincode to 2.0.0-rc.3 --- Cargo.lock | 136 ++++++++++++++++++++++---------------------- dash/Cargo.toml | 2 +- hashes/Cargo.toml | 2 +- rpc-json/Cargo.toml | 2 +- 4 files changed, 71 insertions(+), 71 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05506aa8..67c80a8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,9 +46,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.96" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arrayref" @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "bincode_derive" -version = "2.0.0-rc.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" +checksum = "b1cef5dd4a4457dd11529e743d18ba4fabbd5f20b6895f4c865cb257337dcf9f" dependencies = [ "virtue", ] @@ -154,7 +154,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.98", + "syn 2.0.99", "which", ] @@ -219,9 +219,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bitvec" @@ -298,7 +298,7 @@ dependencies = [ "sha2", "sha3", "subtle", - "thiserror 2.0.11", + "thiserror 2.0.12", "uint-zigzag", "vsss-rs", "zeroize", @@ -348,9 +348,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.2.15" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "shlex", ] @@ -486,7 +486,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -510,7 +510,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -521,7 +521,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -547,7 +547,7 @@ dependencies = [ "bincode 2.0.0-rc.3", "bip39", "bitcoinconsensus", - "bitflags 2.8.0", + "bitflags 2.9.0", "blake3", "bls-signatures", "blsful", @@ -688,9 +688,9 @@ dependencies = [ [[package]] name = "either" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" @@ -746,7 +746,7 @@ dependencies = [ [[package]] name = "ferment" version = "0.1.4" -source = "git+https://github.com/dashpay/ferment#ccc728e0adbfdf82717bfacc3deb6ddbfe34ece3" +source = "git+https://github.com/dashpay/ferment#14e728ef8ab96bbe4b5a322843752d8d0965f92d" dependencies = [ "indexmap 2.7.1", "serde_json", @@ -755,7 +755,7 @@ dependencies = [ [[package]] name = "ferment-macro" version = "0.1.4" -source = "git+https://github.com/dashpay/ferment#ccc728e0adbfdf82717bfacc3deb6ddbfe34ece3" +source = "git+https://github.com/dashpay/ferment#14e728ef8ab96bbe4b5a322843752d8d0965f92d" dependencies = [ "quote", "syn 1.0.109", @@ -1032,9 +1032,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" @@ -1324,28 +1324,28 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.29" +version = "0.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" +checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" dependencies = [ "proc-macro2", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" dependencies = [ "proc-macro2", ] @@ -1456,7 +1456,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", @@ -1465,15 +1465,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -1551,9 +1551,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" @@ -1592,7 +1592,7 @@ checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1608,9 +1608,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.139" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "indexmap 2.7.1", "itoa", @@ -1621,13 +1621,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1664,7 +1664,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1773,7 +1773,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1795,9 +1795,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" dependencies = [ "proc-macro2", "quote", @@ -1821,11 +1821,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl 2.0.12", ] [[package]] @@ -1836,18 +1836,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] name = "thiserror-impl" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -1861,9 +1861,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" dependencies = [ "deranged", "itoa", @@ -1876,15 +1876,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -1892,9 +1892,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -1922,9 +1922,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-normalization" @@ -1943,9 +1943,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "virtue" -version = "0.0.13" +version = "0.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" [[package]] name = "vsss-rs" @@ -2004,7 +2004,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "wasm-bindgen-shared", ] @@ -2039,7 +2039,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2074,7 +2074,7 @@ checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -2223,7 +2223,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] [[package]] @@ -2243,5 +2243,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.99", ] diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 8a53f012..2bb23539 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -63,7 +63,7 @@ hex_lit = "0.1.1" anyhow = { version= "1.0" } hex = { version= "0.4" } -bincode = { version= "2.0.0-rc.3", optional = true } +bincode = { version= "=2.0.0-rc.3", optional = true } bitflags = "2.6.0" blsful = { version = "3.0.0-pre8", optional = true } serde_repr = "0.1.19" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index c186d3f4..8b194d99 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -38,7 +38,7 @@ dyn-clone = { version = "<=1.0.7", default-features = false, optional = true } secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" } rs-x11-hash = { version = "0.1.8", optional = true } -bincode = { version= "2.0.0-rc.3", optional = true } +bincode = { version= "=2.0.0-rc.3", optional = true } [dev-dependencies] serde_test = "1.0" diff --git a/rpc-json/Cargo.toml b/rpc-json/Cargo.toml index d2b34402..dec83368 100644 --- a/rpc-json/Cargo.toml +++ b/rpc-json/Cargo.toml @@ -27,4 +27,4 @@ hex = { version="0.4", features=["serde"]} dashcore = { path = "../dash", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false } -bincode = { version = "2.0.0-rc.3", features = ["serde"] } +bincode = { version = "=2.0.0-rc.3", features = ["serde"] } From 59f10e300aec95128c9adae1e5b576bd0617ea1b Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 9 Mar 2025 20:05:30 +0800 Subject: [PATCH 32/61] chore: bump up bincode to 2.0.0 --- Cargo.lock | 17 ++++++++++++----- dash/Cargo.toml | 2 +- hashes/Cargo.toml | 2 +- hashes/src/bincode_macros.rs | 4 ++-- hashes/src/internal_macros.rs | 4 ++-- rpc-json/Cargo.toml | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 67c80a8a..eabcceca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,12 +118,13 @@ dependencies = [ [[package]] name = "bincode" -version = "2.0.0-rc.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +checksum = "3ad1fa75f77bbd06f187540aa1d70ca50b80b27ce85e7f41c0ce7ff42b34ed3b" dependencies = [ "bincode_derive", "serde", + "unty", ] [[package]] @@ -544,7 +545,7 @@ dependencies = [ "base64-compat", "bech32", "bincode 1.3.3", - "bincode 2.0.0-rc.3", + "bincode 2.0.0", "bip39", "bitcoinconsensus", "bitflags 2.9.0", @@ -592,7 +593,7 @@ dependencies = [ name = "dashcore-rpc-json" version = "0.37.0" dependencies = [ - "bincode 2.0.0-rc.3", + "bincode 2.0.0", "dashcore", "hex", "serde", @@ -605,7 +606,7 @@ dependencies = [ name = "dashcore_hashes" version = "0.37.0" dependencies = [ - "bincode 2.0.0-rc.3", + "bincode 2.0.0", "core2 0.3.3", "dashcore-private", "dyn-clone", @@ -1935,6 +1936,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unty" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a88342087869553c259588a3ec9ca73ce9b2d538b7051ba5789ff236b6c129" + [[package]] name = "version_check" version = "0.9.5" diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 2bb23539..13bffc8e 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -63,7 +63,7 @@ hex_lit = "0.1.1" anyhow = { version= "1.0" } hex = { version= "0.4" } -bincode = { version= "=2.0.0-rc.3", optional = true } +bincode = { version= "2.0.0", optional = true } bitflags = "2.6.0" blsful = { version = "3.0.0-pre8", optional = true } serde_repr = "0.1.19" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 8b194d99..c69d90c8 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -38,7 +38,7 @@ dyn-clone = { version = "<=1.0.7", default-features = false, optional = true } secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" } rs-x11-hash = { version = "0.1.8", optional = true } -bincode = { version= "=2.0.0-rc.3", optional = true } +bincode = { version= "2.0.0", optional = true } [dev-dependencies] serde_test = "1.0" diff --git a/hashes/src/bincode_macros.rs b/hashes/src/bincode_macros.rs index a0d7d91d..b3537aa7 100644 --- a/hashes/src/bincode_macros.rs +++ b/hashes/src/bincode_macros.rs @@ -9,7 +9,7 @@ macro_rules! bincode_impl { } } - impl<$($gen: $gent),*> bincode::Decode for $t<$($gen),*> { + impl bincode::Decode for $t<$($gen),*> { fn decode(decoder: &mut D) -> Result { // Decode a fixed-length byte array and then reconstruct via from_byte_array let bytes: [u8; $len] = <[u8; $len]>::decode(decoder)?; @@ -17,7 +17,7 @@ macro_rules! bincode_impl { } } - impl<'de, $($gen: $gent),*> bincode::BorrowDecode<'de> for $t<$($gen),*> { + impl<'de, Context, $($gen: $gent),*> bincode::BorrowDecode<'de, Context> for $t<$($gen),*> { fn borrow_decode>(decoder: &mut D) -> Result { // Decode a borrowed reference, then use from_bytes_ref (and clone, since our type is Copy) use std::convert::TryInto; diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index 341598ae..b9fcbb57 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -148,7 +148,7 @@ macro_rules! hash_trait_impls { } #[cfg(feature = "bincode")] - impl<$($gen: $gent),*> bincode::Decode for Hash<$($gen),*> { + impl bincode::Decode for Hash<$($gen),*> { fn decode(decoder: &mut D) -> Result { use crate::Hash; // Decode a fixed-length byte array and then create the Hash @@ -158,7 +158,7 @@ macro_rules! hash_trait_impls { } #[cfg(feature = "bincode")] - impl<'de, $($gen: $gent),*> bincode::BorrowDecode<'de> for Hash<$($gen),*> { + impl<'de, Context, $($gen: $gent),*> bincode::BorrowDecode<'de, Context> for Hash<$($gen),*> { fn borrow_decode>(decoder: &mut D) -> Result { use crate::Hash; use std::convert::TryInto; diff --git a/rpc-json/Cargo.toml b/rpc-json/Cargo.toml index dec83368..7382edcf 100644 --- a/rpc-json/Cargo.toml +++ b/rpc-json/Cargo.toml @@ -27,4 +27,4 @@ hex = { version="0.4", features=["serde"]} dashcore = { path = "../dash", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false } -bincode = { version = "=2.0.0-rc.3", features = ["serde"] } +bincode = { version = "2.0.0", features = ["serde"] } From 0a29b27e6c8343581058881f69bc5d346b2957e4 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Mon, 10 Mar 2025 10:04:46 +0800 Subject: [PATCH 33/61] chore: back to bincode 2.0.0-rc.3 --- dash/Cargo.toml | 2 +- hashes/Cargo.toml | 2 +- rpc-json/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 13bffc8e..2bb23539 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -63,7 +63,7 @@ hex_lit = "0.1.1" anyhow = { version= "1.0" } hex = { version= "0.4" } -bincode = { version= "2.0.0", optional = true } +bincode = { version= "=2.0.0-rc.3", optional = true } bitflags = "2.6.0" blsful = { version = "3.0.0-pre8", optional = true } serde_repr = "0.1.19" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index c69d90c8..8b194d99 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -38,7 +38,7 @@ dyn-clone = { version = "<=1.0.7", default-features = false, optional = true } secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" } rs-x11-hash = { version = "0.1.8", optional = true } -bincode = { version= "2.0.0", optional = true } +bincode = { version= "=2.0.0-rc.3", optional = true } [dev-dependencies] serde_test = "1.0" diff --git a/rpc-json/Cargo.toml b/rpc-json/Cargo.toml index 7382edcf..dec83368 100644 --- a/rpc-json/Cargo.toml +++ b/rpc-json/Cargo.toml @@ -27,4 +27,4 @@ hex = { version="0.4", features=["serde"]} dashcore = { path = "../dash", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false } -bincode = { version = "2.0.0", features = ["serde"] } +bincode = { version = "=2.0.0-rc.3", features = ["serde"] } From ca6342a74c727d90d4ebfb152846cf36f885c87a Mon Sep 17 00:00:00 2001 From: pankcuf Date: Mon, 10 Mar 2025 17:02:24 +0800 Subject: [PATCH 34/61] chore: export llmq type helpers --- Cargo.lock | 17 +++++------------ dash/src/sml/llmq_type/mod.rs | 1 + 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eabcceca..67c80a8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,13 +118,12 @@ dependencies = [ [[package]] name = "bincode" -version = "2.0.0" +version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad1fa75f77bbd06f187540aa1d70ca50b80b27ce85e7f41c0ce7ff42b34ed3b" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" dependencies = [ "bincode_derive", "serde", - "unty", ] [[package]] @@ -545,7 +544,7 @@ dependencies = [ "base64-compat", "bech32", "bincode 1.3.3", - "bincode 2.0.0", + "bincode 2.0.0-rc.3", "bip39", "bitcoinconsensus", "bitflags 2.9.0", @@ -593,7 +592,7 @@ dependencies = [ name = "dashcore-rpc-json" version = "0.37.0" dependencies = [ - "bincode 2.0.0", + "bincode 2.0.0-rc.3", "dashcore", "hex", "serde", @@ -606,7 +605,7 @@ dependencies = [ name = "dashcore_hashes" version = "0.37.0" dependencies = [ - "bincode 2.0.0", + "bincode 2.0.0-rc.3", "core2 0.3.3", "dashcore-private", "dyn-clone", @@ -1936,12 +1935,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unty" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a88342087869553c259588a3ec9ca73ce9b2d538b7051ba5789ff236b6c129" - [[package]] name = "version_check" version = "0.9.5" diff --git a/dash/src/sml/llmq_type/mod.rs b/dash/src/sml/llmq_type/mod.rs index b2129fc6..af384fc7 100644 --- a/dash/src/sml/llmq_type/mod.rs +++ b/dash/src/sml/llmq_type/mod.rs @@ -435,6 +435,7 @@ pub fn dkg_rotation_params(network: Network) -> DKGParams { if network == Network::Devnet { DKG_DEVNET_DIP_0024 } else { DKG_60_75 } } +#[cfg_attr(feature = "apple", ferment_macro::export)] impl LLMQType { pub fn index(&self) -> u8 { u8::from(self.clone()) } pub fn from_u16(index: u16) -> LLMQType { LLMQType::from(index as u8) } From 11865a4b62be687a19dd9b1660f969d12252d6c4 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Mon, 10 Mar 2025 22:31:10 +0800 Subject: [PATCH 35/61] chore: add clear method for engine --- dash/src/sml/masternode_list_engine/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index f3722e64..6789bdc3 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -86,6 +86,16 @@ impl MasternodeListEngine { }) } + pub fn clear(&mut self) { + self.block_hashes.clear(); + self.block_heights.clear(); + self.masternode_lists.clear(); + self.known_chain_locks.clear(); + self.known_snapshots.clear(); + self.rotated_quorums_per_cycle.clear(); + self.quorum_statuses.clear(); + } + pub fn latest_masternode_list(&self) -> Option<&MasternodeList> { self.masternode_lists.last_key_value().map(|(_, list)| list) } From 6bd87057e80f7eed0345587665552ea88bbf46a9 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 11 Mar 2025 13:00:37 +0800 Subject: [PATCH 36/61] chore: fix macro --- Cargo.lock | 11 +++++++---- dash/Cargo.toml | 1 + hashes/Cargo.toml | 1 + hashes/src/bincode_macros.rs | 4 ++-- hashes/src/internal_macros.rs | 4 ++-- rpc-json/Cargo.toml | 1 + 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 67c80a8a..b8ba5874 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "bincode_derive" -version = "2.0.0" +version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cef5dd4a4457dd11529e743d18ba4fabbd5f20b6895f4c865cb257337dcf9f" +checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" dependencies = [ "virtue", ] @@ -545,6 +545,7 @@ dependencies = [ "bech32", "bincode 1.3.3", "bincode 2.0.0-rc.3", + "bincode_derive", "bip39", "bitcoinconsensus", "bitflags 2.9.0", @@ -593,6 +594,7 @@ name = "dashcore-rpc-json" version = "0.37.0" dependencies = [ "bincode 2.0.0-rc.3", + "bincode_derive", "dashcore", "hex", "serde", @@ -606,6 +608,7 @@ name = "dashcore_hashes" version = "0.37.0" dependencies = [ "bincode 2.0.0-rc.3", + "bincode_derive", "core2 0.3.3", "dashcore-private", "dyn-clone", @@ -1943,9 +1946,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "virtue" -version = "0.0.18" +version = "0.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" +checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" [[package]] name = "vsss-rs" diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 2bb23539..1ef7cc5d 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -64,6 +64,7 @@ hex_lit = "0.1.1" anyhow = { version= "1.0" } hex = { version= "0.4" } bincode = { version= "=2.0.0-rc.3", optional = true } +bincode_derive = { version= "=2.0.0-rc.3", optional = true } bitflags = "2.6.0" blsful = { version = "3.0.0-pre8", optional = true } serde_repr = "0.1.19" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 8b194d99..20b0bdbc 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -39,6 +39,7 @@ secp256k1 = { default-features = false, features = ["hashes"], version= "0.30.0" rs-x11-hash = { version = "0.1.8", optional = true } bincode = { version= "=2.0.0-rc.3", optional = true } +bincode_derive = { version= "=2.0.0-rc.3", optional = true } [dev-dependencies] serde_test = "1.0" diff --git a/hashes/src/bincode_macros.rs b/hashes/src/bincode_macros.rs index b3537aa7..a0d7d91d 100644 --- a/hashes/src/bincode_macros.rs +++ b/hashes/src/bincode_macros.rs @@ -9,7 +9,7 @@ macro_rules! bincode_impl { } } - impl bincode::Decode for $t<$($gen),*> { + impl<$($gen: $gent),*> bincode::Decode for $t<$($gen),*> { fn decode(decoder: &mut D) -> Result { // Decode a fixed-length byte array and then reconstruct via from_byte_array let bytes: [u8; $len] = <[u8; $len]>::decode(decoder)?; @@ -17,7 +17,7 @@ macro_rules! bincode_impl { } } - impl<'de, Context, $($gen: $gent),*> bincode::BorrowDecode<'de, Context> for $t<$($gen),*> { + impl<'de, $($gen: $gent),*> bincode::BorrowDecode<'de> for $t<$($gen),*> { fn borrow_decode>(decoder: &mut D) -> Result { // Decode a borrowed reference, then use from_bytes_ref (and clone, since our type is Copy) use std::convert::TryInto; diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index b9fcbb57..341598ae 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -148,7 +148,7 @@ macro_rules! hash_trait_impls { } #[cfg(feature = "bincode")] - impl bincode::Decode for Hash<$($gen),*> { + impl<$($gen: $gent),*> bincode::Decode for Hash<$($gen),*> { fn decode(decoder: &mut D) -> Result { use crate::Hash; // Decode a fixed-length byte array and then create the Hash @@ -158,7 +158,7 @@ macro_rules! hash_trait_impls { } #[cfg(feature = "bincode")] - impl<'de, Context, $($gen: $gent),*> bincode::BorrowDecode<'de, Context> for Hash<$($gen),*> { + impl<'de, $($gen: $gent),*> bincode::BorrowDecode<'de> for Hash<$($gen),*> { fn borrow_decode>(decoder: &mut D) -> Result { use crate::Hash; use std::convert::TryInto; diff --git a/rpc-json/Cargo.toml b/rpc-json/Cargo.toml index dec83368..912b6d18 100644 --- a/rpc-json/Cargo.toml +++ b/rpc-json/Cargo.toml @@ -28,3 +28,4 @@ hex = { version="0.4", features=["serde"]} dashcore = { path = "../dash", features=["std", "secp-recovery", "rand-std", "signer", "serde"], default-features = false } bincode = { version = "=2.0.0-rc.3", features = ["serde"] } +bincode_derive = { version= "=2.0.0-rc.3", optional = true } From e1a4ebd390d27ac1649f5107c5231eef4f6631ae Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 11 Mar 2025 18:39:59 +0800 Subject: [PATCH 37/61] chore: change apply_diff return type --- dash/src/sml/masternode_list_engine/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index 6789bdc3..48436ad3 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -557,14 +557,14 @@ impl MasternodeListEngine { masternode_list_diff: MnListDiff, diff_end_height: Option, verify_quorums: bool, - ) -> Result<(), SmlError> { + ) -> Result<(BlockHash, BlockHash), SmlError> { + let base_block_hash = masternode_list_diff.base_block_hash; + let block_hash = masternode_list_diff.block_hash; if let Some(known_genesis_block_hash) = self.network.known_genesis_block_hash().or_else(|| self.block_hashes.get(&0).cloned()) { - if masternode_list_diff.base_block_hash == known_genesis_block_hash { + if base_block_hash == known_genesis_block_hash { // we are going from the start - let block_hash = masternode_list_diff.block_hash; - let masternode_list = masternode_list_diff.try_into_with_block_hash_lookup( |block_hash| diff_end_height.or(self.block_heights.get(block_hash).copied()), self.network, @@ -583,7 +583,7 @@ impl MasternodeListEngine { } }; self.masternode_lists.insert(diff_end_height, masternode_list); - return Ok(()); + return Ok((base_block_hash, block_hash)); } } @@ -702,7 +702,7 @@ impl MasternodeListEngine { self.block_hashes.insert(diff_end_height, block_hash); self.block_heights.insert(block_hash, diff_end_height); - Ok(()) + Ok((base_block_hash, block_hash)) } #[cfg(feature = "quorum_validation")] From 841e1891abfd300bfa5ff83e6728d67147069631 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 11 Mar 2025 20:26:03 +0800 Subject: [PATCH 38/61] chore: refine quorum entry --- dash/src/consensus/encode.rs | 2 +- dash/src/hash_types.rs | 2 +- dash/src/network/message_qrinfo.rs | 2 +- dash/src/network/message_sml.rs | 2 +- dash/src/sml/masternode_list_engine/mod.rs | 2 +- dash/src/sml/quorum_entry/hash.rs | 2 +- dash/src/sml/quorum_entry/qualified_quorum_entry.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dash/src/consensus/encode.rs b/dash/src/consensus/encode.rs index 6e62b88e..11574b00 100644 --- a/dash/src/consensus/encode.rs +++ b/dash/src/consensus/encode.rs @@ -57,7 +57,7 @@ use crate::prelude::*; use crate::sml::masternode_list_entry::MasternodeListEntry; use crate::taproot::TapLeafHash; use crate::transaction::special_transaction::TransactionType; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; use crate::transaction::txin::TxIn; use crate::transaction::txout::TxOut; use crate::{OutPoint, ProTxHash, ScriptBuf, address}; diff --git a/dash/src/hash_types.rs b/dash/src/hash_types.rs index 06f77743..d6c4544a 100644 --- a/dash/src/hash_types.rs +++ b/dash/src/hash_types.rs @@ -77,7 +77,7 @@ mod newtypes { use crate::alloc::string::ToString; use crate::prelude::String; - use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; + use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; #[cfg(feature = "core-block-hash-use-x11")] hash_newtype! { diff --git a/dash/src/network/message_qrinfo.rs b/dash/src/network/message_qrinfo.rs index 5d5f9565..d642fcd5 100644 --- a/dash/src/network/message_qrinfo.rs +++ b/dash/src/network/message_qrinfo.rs @@ -9,7 +9,7 @@ use crate::consensus::encode::{read_compact_size, read_fixed_bitset, write_fixed use crate::consensus::{Decodable, Encodable, encode}; use crate::internal_macros::impl_consensus_encoding; use crate::network::message_sml::MnListDiff; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; /// The `getqrinfo` message requests a `qrinfo` message that provides the information /// required to verify quorum details for quorums formed using the quorum rotation process. diff --git a/dash/src/network/message_sml.rs b/dash/src/network/message_sml.rs index 89570e8e..22818f6f 100644 --- a/dash/src/network/message_sml.rs +++ b/dash/src/network/message_sml.rs @@ -6,7 +6,7 @@ use crate::hash_types::MerkleRootMasternodeList; use crate::internal_macros::impl_consensus_encoding; use crate::sml::llmq_type::LLMQType; use crate::sml::masternode_list_entry::MasternodeListEntry; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; use crate::{BlockHash, ProTxHash, QuorumHash, Transaction}; /// The `getmnlistd` message requests a `mnlistdiff` message that provides either: diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index 48436ad3..9b885af4 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -24,7 +24,7 @@ use crate::sml::masternode_list::MasternodeList; use crate::sml::masternode_list::from_diff::TryIntoWithBlockHashLookup; use crate::sml::quorum_entry::qualified_quorum_entry::QualifiedQuorumEntry; use crate::sml::quorum_validation_error::{ClientDataRetrievalError, QuorumValidationError}; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; use crate::{BlockHash, Network, QuorumHash}; #[derive(Clone, Eq, PartialEq)] diff --git a/dash/src/sml/quorum_entry/hash.rs b/dash/src/sml/quorum_entry/hash.rs index fd346c96..d4ff1fb8 100644 --- a/dash/src/sml/quorum_entry/hash.rs +++ b/dash/src/sml/quorum_entry/hash.rs @@ -3,7 +3,7 @@ use hashes::Hash; use crate::consensus::Encodable; use crate::consensus::encode::{write_compact_size, write_fixed_bitset}; use crate::hash_types::{QuorumCommitmentHash, QuorumEntryHash}; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; impl QuorumEntry { /// Calculates the hash of the entire quorum entry. diff --git a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs index 816da216..a7e839d7 100644 --- a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs +++ b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs @@ -6,7 +6,7 @@ use crate::sml::llmq_entry_verification::{ LLMQEntryVerificationSkipStatus, LLMQEntryVerificationStatus, }; use crate::sml::quorum_validation_error::QuorumValidationError; -use crate::transaction::special_transaction::quorum_commitment::QuorumEntry; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; /// A structured representation of a quorum entry with additional validation status and commitment hashes. /// From 8f2f79c3f94fe5551c9903c42dde552c24a1a49e Mon Sep 17 00:00:00 2001 From: pankcuf Date: Thu, 13 Mar 2025 21:59:44 +0800 Subject: [PATCH 39/61] chore: delete Cargo.lock --- Cargo.lock | 2250 ---------------------------------------------------- 1 file changed, 2250 deletions(-) delete mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index b8ba5874..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,2250 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bincode" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" -dependencies = [ - "bincode_derive", - "serde", -] - -[[package]] -name = "bincode_derive" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" -dependencies = [ - "virtue", -] - -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.99", - "which", -] - -[[package]] -name = "bip39" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" -dependencies = [ - "bitcoin_hashes 0.13.0", - "serde", - "unicode-normalization", -] - -[[package]] -name = "bitcoin-internals" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" - -[[package]] -name = "bitcoin-io" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" - -[[package]] -name = "bitcoin_hashes" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" -dependencies = [ - "bitcoin-internals", - "hex-conservative 0.1.2", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" -dependencies = [ - "bitcoin-io", - "hex-conservative 0.2.1", -] - -[[package]] -name = "bitcoinconsensus" -version = "0.20.2-0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54505558b77e0aa21b2491a7b39cbae9db22ac8b1bc543ef4600edb762306f9c" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake3" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675f87afced0413c9bb02843499dbbd3882a237645883f71a2b59644a6d2f753" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "bls-dash-sys" -version = "1.2.5" -source = "git+https://github.com/dashpay/bls-signatures?tag=1.3.5#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" -dependencies = [ - "bindgen", - "cc", - "glob", -] - -[[package]] -name = "bls-signatures" -version = "1.2.5" -source = "git+https://github.com/dashpay/bls-signatures?tag=1.3.5#0bb5c5b03249c463debb5cef5f7e52ee66f3aaab" -dependencies = [ - "bls-dash-sys", - "hex", - "rand", - "serde", -] - -[[package]] -name = "blsful" -version = "3.0.0-pre8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e5e9866cb7f830f06a6633ba998697d5a826e99e8c78376deaadd33cda7be" -dependencies = [ - "anyhow", - "blstrs_plus", - "hex", - "hkdf", - "merlin", - "pairing", - "rand", - "rand_chacha", - "rand_core", - "serde", - "serde_bare", - "sha2", - "sha3", - "subtle", - "thiserror 2.0.12", - "uint-zigzag", - "vsss-rs", - "zeroize", -] - -[[package]] -name = "blst" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "blstrs_plus" -version = "0.8.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a16dd4b0d6b4538e1fa0388843acb186363082713a8fc8416d802a04d013818" -dependencies = [ - "arrayref", - "blst", - "elliptic-curve", - "ff", - "group", - "pairing", - "rand_core", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" -dependencies = [ - "shlex", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-link", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "core2" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239fa3ae9b63c2dc74bd3fa852d4792b8b305ae64eeede946265b6af62f1fff3" -dependencies = [ - "memchr", -] - -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array 0.14.7", - "rand_core", - "serdect", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array 0.14.7", - "typenum", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.99", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "dash-fuzz" -version = "0.37.0" -dependencies = [ - "dashcore", - "honggfuzz", - "serde", - "serde_cbor", - "serde_json", -] - -[[package]] -name = "dashcore" -version = "0.37.0" -dependencies = [ - "anyhow", - "assert_matches", - "base64-compat", - "bech32", - "bincode 1.3.3", - "bincode 2.0.0-rc.3", - "bincode_derive", - "bip39", - "bitcoinconsensus", - "bitflags 2.9.0", - "blake3", - "bls-signatures", - "blsful", - "core2 0.3.3", - "dashcore", - "dashcore-private", - "dashcore_hashes", - "ed25519-dalek", - "ferment", - "ferment-macro", - "hex", - "hex_lit", - "lazy_static", - "rustversion", - "secp256k1", - "serde", - "serde_derive", - "serde_json", - "serde_repr", - "serde_test", - "strum", - "thiserror 1.0.69", -] - -[[package]] -name = "dashcore-private" -version = "0.37.0" - -[[package]] -name = "dashcore-rpc" -version = "0.37.0" -dependencies = [ - "dashcore-rpc-json", - "hex", - "jsonrpc", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "dashcore-rpc-json" -version = "0.37.0" -dependencies = [ - "bincode 2.0.0-rc.3", - "bincode_derive", - "dashcore", - "hex", - "serde", - "serde_json", - "serde_repr", - "serde_with", -] - -[[package]] -name = "dashcore_hashes" -version = "0.37.0" -dependencies = [ - "bincode 2.0.0-rc.3", - "bincode_derive", - "core2 0.3.3", - "dashcore-private", - "dyn-clone", - "rs-x11-hash", - "schemars", - "secp256k1", - "serde", - "serde_json", - "serde_test", - "wasm-bindgen-test", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dyn-clone" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435217f1b2d06f00513185fb991cd426271d9e4c3a9d9b25b919b8e5a03b282d" - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core", - "serde", - "sha2", - "subtle", - "zeroize", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array 0.14.7", - "group", - "hkdf", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "tap", - "zeroize", -] - -[[package]] -name = "elliptic-curve-tools" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48843edfbd0a370b3dd14cdbb4e446e9a8855311e6b2b57bf9a1fd1367bc317" -dependencies = [ - "elliptic-curve", - "heapless", - "hex", - "multiexp", - "serde", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "ferment" -version = "0.1.4" -source = "git+https://github.com/dashpay/ferment#14e728ef8ab96bbe4b5a322843752d8d0965f92d" -dependencies = [ - "indexmap 2.7.1", - "serde_json", -] - -[[package]] -name = "ferment-macro" -version = "0.1.4" -source = "git+https://github.com/dashpay/ferment#14e728ef8ab96bbe4b5a322843752d8d0965f92d" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "bitvec", - "rand_core", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "generic-array" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c8444bc9d71b935156cc0ccab7f622180808af7867b1daae6547d773591703" -dependencies = [ - "serde", - "typenum", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand", - "rand_core", - "rand_xorshift", - "subtle", -] - -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-conservative" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" - -[[package]] -name = "hex-conservative" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "hex_lit" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "honggfuzz" -version = "0.5.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505" -dependencies = [ - "lazy_static", - "memmap2", - "rustc_version", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", - "serde", -] - -[[package]] -name = "integration_test" -version = "0.0.0" -dependencies = [ - "dashcore-rpc", - "dotenvy", - "hex", - "lazy_static", - "log", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "jsonrpc" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" -dependencies = [ - "base64", - "serde", - "serde_json", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.170" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" - -[[package]] -name = "libloading" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" -dependencies = [ - "cfg-if", - "windows-targets", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memmap2" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" -dependencies = [ - "libc", -] - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core", - "zeroize", -] - -[[package]] -name = "minicov" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" -dependencies = [ - "cc", - "walkdir", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "multiexp" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a383da1ae933078ddb1e4141f1dd617b512b4183779d6977e6451b0e644806" -dependencies = [ - "ff", - "group", - "rustversion", - "std-shims", - "zeroize", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", - "rand", - "serde", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "rand", - "serde", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" -dependencies = [ - "proc-macro2", - "syn 2.0.99", -] - -[[package]] -name = "proc-macro2" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rs-x11-hash" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ea852806513d6f5fd7750423300375bc8481a18ed033756c1a836257893a30" -dependencies = [ - "bindgen", - "cc", - "libc", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schemars" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" -dependencies = [ - "bitcoin_hashes 0.14.0", - "rand", - "secp256k1-sys", - "serde", -] - -[[package]] -name = "secp256k1-sys" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" -dependencies = [ - "cc", -] - -[[package]] -name = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" - -[[package]] -name = "serde" -version = "1.0.218" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bare" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51c55386eed0f1ae957b091dc2ca8122f287b60c79c774cbe3d5f2b69fded660" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45cd6d95391b16cd57e88b68be41d504183b7faae22030c0cc3b3f73dd57b2fd" -dependencies = [ - "byteorder", - "half", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.218" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "serde_derive_internals" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "indexmap 2.7.1", - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "serde_test" -version = "1.0.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "base64", - "chrono", - "hex", - "indexmap 1.9.3", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "serdect" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" -dependencies = [ - "base16ct", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "std-shims" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e49360f31b0b75a6a82a5205c6103ea07a79a60808d44f5cc879d303337926" -dependencies = [ - "hashbrown 0.14.5", - "spin", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.99", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.3.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" - -[[package]] -name = "time-macros" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "typenum" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - -[[package]] -name = "uint-zigzag" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbf77aed65cb885a8ba07138c365879be3d9a93dce82bf6cc50feca9138ec15" -dependencies = [ - "core2 0.4.0", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" - -[[package]] -name = "vsss-rs" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec4ebcc5594130c31b49594d55c0583fe80621f252f570b222ca4845cafd3cf" -dependencies = [ - "crypto-bigint", - "elliptic-curve", - "elliptic-curve-tools", - "generic-array 1.2.0", - "hex", - "num", - "rand_core", - "serde", - "sha3", - "subtle", - "zeroize", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.99", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-bindgen-test" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" -dependencies = [ - "js-sys", - "minicov", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-link" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.99", -] From 8562906a75ae64949bffcecf703aacce3e35750c Mon Sep 17 00:00:00 2001 From: pankcuf Date: Mon, 17 Mar 2025 21:17:17 +0800 Subject: [PATCH 40/61] chore: pub dip9 --- dash/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/lib.rs b/dash/src/lib.rs index e2568077..6de79b22 100644 --- a/dash/src/lib.rs +++ b/dash/src/lib.rs @@ -109,7 +109,7 @@ pub mod consensus; // Private until we either make this a crate or flatten it - still to be decided. pub mod bls_sig_utils; pub(crate) mod crypto; -mod dip9; +pub mod dip9; pub mod ephemerealdata; pub mod error; pub mod hash_types; From 872dc7cbb5305ba98260c3faea2b92f1c45f70e2 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 18 Mar 2025 23:54:06 +0800 Subject: [PATCH 41/61] chore: helpers for operatorpublickey --- dash/src/sml/masternode_list_entry/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dash/src/sml/masternode_list_entry/mod.rs b/dash/src/sml/masternode_list_entry/mod.rs index 7caa9cb2..23970d1c 100644 --- a/dash/src/sml/masternode_list_entry/mod.rs +++ b/dash/src/sml/masternode_list_entry/mod.rs @@ -71,6 +71,15 @@ pub struct OperatorPublicKey { pub version: u16, } +impl OperatorPublicKey { + pub fn is_basic(&self) -> bool { + self.version >= 2 + } + pub fn is_legacy(&self) -> bool { + self.version < 2 + } +} + impl_consensus_encoding!(OperatorPublicKey, data, version); #[derive(Clone, Eq, PartialEq, Debug)] From d6b81c7b768bcccac4a4332c3566123598ce2a23 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 19 Mar 2025 22:13:21 +0800 Subject: [PATCH 42/61] chore: refine txout imports --- dash/src/blockdata/transaction/mod.rs | 2 +- dash/src/blockdata/transaction/txout.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dash/src/blockdata/transaction/mod.rs b/dash/src/blockdata/transaction/mod.rs index e185baa5..8365c051 100644 --- a/dash/src/blockdata/transaction/mod.rs +++ b/dash/src/blockdata/transaction/mod.rs @@ -52,7 +52,7 @@ use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{InputsHash, Txid, Wtxid}; use crate::prelude::*; use crate::sighash::LegacySighash; -pub use crate::transaction::outpoint::*; +pub use crate::transaction::outpoint::OutPoint; use crate::{ScriptBuf, Weight, io}; /// Used for signature hash for invalid use of SIGHASH_SINGLE. diff --git a/dash/src/blockdata/transaction/txout.rs b/dash/src/blockdata/transaction/txout.rs index fe5b79cb..5ff7045c 100644 --- a/dash/src/blockdata/transaction/txout.rs +++ b/dash/src/blockdata/transaction/txout.rs @@ -24,7 +24,9 @@ use bincode::{Decode, Encode}; use crate::internal_macros::impl_consensus_encoding; -use crate::{Address, PubkeyHash, ScriptBuf, ScriptHash, VarInt}; +use crate::{Address, VarInt}; +use crate::blockdata::script::ScriptBuf; +use crate::hash_types::{PubkeyHash, ScriptHash}; /// A transaction output, which defines new coins to be created from old ones. #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] From a385d5855cbf8e5712579f17d702ecb7b721dceb Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 19 Mar 2025 22:38:40 +0800 Subject: [PATCH 43/61] chore: refine script imports --- dash/src/bip158.rs | 2 +- dash/src/blockdata/transaction/mod.rs | 4 ++-- .../asset_unlock/unqualified_asset_unlock.rs | 4 +++- .../special_transaction/provider_registration.rs | 4 +++- .../special_transaction/provider_update_registrar.rs | 4 ++-- .../special_transaction/provider_update_service.rs | 4 ++-- dash/src/consensus/encode.rs | 11 +++++++---- dash/src/crypto/sighash.rs | 3 +-- dash/src/taproot.rs | 3 ++- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/dash/src/bip158.rs b/dash/src/bip158.rs index 5d55a751..55660e00 100644 --- a/dash/src/bip158.rs +++ b/dash/src/bip158.rs @@ -558,7 +558,7 @@ mod test { use serde_json::Value; use super::*; - use crate::ScriptBuf; + use crate::blockdata::script::ScriptBuf; use crate::consensus::encode::deserialize; use crate::hash_types::BlockHash; use crate::internal_macros::hex; diff --git a/dash/src/blockdata/transaction/mod.rs b/dash/src/blockdata/transaction/mod.rs index 8365c051..bd8020ca 100644 --- a/dash/src/blockdata/transaction/mod.rs +++ b/dash/src/blockdata/transaction/mod.rs @@ -41,7 +41,7 @@ use hashes::{Hash, sha256d}; use crate::blockdata::constants::WITNESS_SCALE_FACTOR; #[cfg(feature = "bitcoinconsensus")] use crate::blockdata::script; -use crate::blockdata::script::Script; +use crate::blockdata::script::{Script, ScriptBuf}; use crate::blockdata::transaction::hash_type::EcdsaSighashType; use crate::blockdata::transaction::special_transaction::{TransactionPayload, TransactionType}; use crate::blockdata::transaction::txin::TxIn; @@ -53,7 +53,7 @@ use crate::hash_types::{InputsHash, Txid, Wtxid}; use crate::prelude::*; use crate::sighash::LegacySighash; pub use crate::transaction::outpoint::OutPoint; -use crate::{ScriptBuf, Weight, io}; +use crate::{Weight, io}; /// Used for signature hash for invalid use of SIGHASH_SINGLE. const UINT256_ONE: [u8; 32] = [ diff --git a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs index 4f0a67af..7ec4328d 100644 --- a/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs +++ b/dash/src/blockdata/transaction/special_transaction/asset_unlock/unqualified_asset_unlock.rs @@ -25,13 +25,15 @@ #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; +use crate::blockdata::script::ScriptBuf; use crate::blockdata::transaction::special_transaction::TransactionType; use crate::blockdata::transaction::special_transaction::TransactionType::AssetUnlock; +use crate::blockdata::transaction::txin::TxIn; use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{PubkeyHash, ScriptHash}; use crate::prelude::*; use crate::blockdata::transaction::txout::TxOut; -use crate::{ScriptBuf, TxIn, VarInt, io}; +use crate::{VarInt, io}; /// An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make /// it a full payload the request info should be added. diff --git a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs index ccd4be56..05cd187f 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_registration.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_registration.rs @@ -42,12 +42,14 @@ use hashes::Hash; use internals::hex::Case::Lower; use crate::address::Payload; +use crate::blockdata::script::ScriptBuf; +use crate::blockdata::transaction::OutPoint; use crate::blockdata::transaction::special_transaction::SpecialTransactionBasePayloadEncodable; use crate::bls_sig_utils::BLSPublicKey; use crate::consensus::{encode, Decodable, Encodable}; use crate::hash_types::{InputsHash, PubkeyHash, SpecialTransactionPayloadHash}; use crate::prelude::*; -use crate::{io, Address, Network, OutPoint, ScriptBuf, VarInt}; +use crate::{io, Address, Network, VarInt}; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash, Copy)] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs index 66e57bc8..7bd08ff4 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_registrar.rs @@ -32,13 +32,13 @@ #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; use hashes::Hash; - +use crate::blockdata::script::ScriptBuf; use crate::blockdata::transaction::special_transaction::SpecialTransactionBasePayloadEncodable; use crate::bls_sig_utils::BLSPublicKey; use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{InputsHash, PubkeyHash, SpecialTransactionPayloadHash, Txid}; use crate::prelude::*; -use crate::{ScriptBuf, VarInt, io}; +use crate::{VarInt, io}; /// A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. /// This is used to update the base aspects a Masternode on the network. diff --git a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs index e7234f99..244cd5c6 100644 --- a/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs +++ b/dash/src/blockdata/transaction/special_transaction/provider_update_service.rs @@ -37,12 +37,12 @@ #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; use hashes::Hash; - +use crate::blockdata::script::ScriptBuf; use crate::blockdata::transaction::special_transaction::SpecialTransactionBasePayloadEncodable; use crate::bls_sig_utils::BLSSignature; use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{InputsHash, SpecialTransactionPayloadHash, Txid}; -use crate::{ScriptBuf, VarInt, io}; +use crate::{VarInt, io}; /// A Provider Update Service Payload used in a Provider Update Service Special Transaction. /// This is used to update the operational aspects a Masternode on the network. diff --git a/dash/src/consensus/encode.rs b/dash/src/consensus/encode.rs index 11574b00..07265a30 100644 --- a/dash/src/consensus/encode.rs +++ b/dash/src/consensus/encode.rs @@ -46,6 +46,7 @@ use crate::hash_types::{ BlockHash, FilterHash, FilterHeader, MerkleRootMasternodeList, TxMerkleNode, }; use crate::io::{self, Cursor, Read}; +use crate::hash_types::ProTxHash; use crate::network::message_qrinfo::QuorumSnapshot; use crate::network::message_sml::{DeletedQuorum, MnListDiff, QuorumCLSigObject}; #[cfg(feature = "std")] @@ -56,11 +57,13 @@ use crate::network::{ use crate::prelude::*; use crate::sml::masternode_list_entry::MasternodeListEntry; use crate::taproot::TapLeafHash; -use crate::transaction::special_transaction::TransactionType; +use crate::blockdata::script::ScriptBuf; +use crate::blockdata::transaction::OutPoint; +use crate::blockdata::transaction::special_transaction::TransactionType; use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; -use crate::transaction::txin::TxIn; -use crate::transaction::txout::TxOut; -use crate::{OutPoint, ProTxHash, ScriptBuf, address}; +use crate::blockdata::transaction::txin::TxIn; +use crate::blockdata::transaction::txout::TxOut; +use crate::address; /// Encoding error. #[derive(Debug)] diff --git a/dash/src/crypto/sighash.rs b/dash/src/crypto/sighash.rs index bbea268b..5b7a9575 100644 --- a/dash/src/crypto/sighash.rs +++ b/dash/src/crypto/sighash.rs @@ -15,7 +15,7 @@ use core::borrow::{Borrow, BorrowMut}; use core::{fmt, str}; use hashes::{Hash, hash_newtype, sha256, sha256d, sha256t_hash_newtype}; - +use crate::blockdata::script::{Script, ScriptBuf}; use crate::blockdata::transaction::txin::TxIn; use crate::blockdata::transaction::txout::TxOut; use crate::blockdata::transaction::{EncodeSigningDataResult, Transaction}; @@ -24,7 +24,6 @@ use crate::consensus::{Encodable, encode}; use crate::error::impl_std_error; use crate::io; use crate::prelude::*; -use crate::script::{Script, ScriptBuf}; use crate::taproot::{LeafVersion, TAPROOT_ANNEX_PREFIX, TapLeafHash}; /// Used for signature hash for invalid use of SIGHASH_SINGLE. diff --git a/dash/src/taproot.rs b/dash/src/taproot.rs index 8562866f..43e1a681 100644 --- a/dash/src/taproot.rs +++ b/dash/src/taproot.rs @@ -14,12 +14,13 @@ use hashes::{Hash, HashEngine, sha256t_hash_newtype}; use internals::write_err; use secp256k1::{self, Scalar, Secp256k1}; +use crate::blockdata::script::{Script, ScriptBuf}; use crate::consensus::Encodable; use crate::crypto::key::{TapTweak, TweakedPublicKey, UntweakedPublicKey, XOnlyPublicKey}; // Re-export these so downstream only has to use one `taproot` module. pub use crate::crypto::taproot::{Error, Signature}; use crate::prelude::*; -use crate::{Script, ScriptBuf, io}; +use crate::io; // Taproot test vectors from BIP-341 state the hashes without any reversing sha256t_hash_newtype! { From 1c80643d5cc4c72976ab10dbf1aa0dcdd77c777a Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 19 Mar 2025 22:52:38 +0800 Subject: [PATCH 44/61] chore: refine typealias --- dash/src/blockdata/script/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/blockdata/script/mod.rs b/dash/src/blockdata/script/mod.rs index e5bf6d85..1bd36a2c 100644 --- a/dash/src/blockdata/script/mod.rs +++ b/dash/src/blockdata/script/mod.rs @@ -77,7 +77,7 @@ mod tests; pub use self::borrowed::*; pub use self::builder::*; pub use self::instruction::*; -pub use self::owned::*; +pub use self::owned::ScriptBuf; pub use self::push_bytes::*; /// Encodes an integer in script(minimal CScriptNum) format. From 6351ba0d09d17d97b0c3506e77cd7d1805e8f0b4 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 19 Mar 2025 23:13:30 +0800 Subject: [PATCH 45/61] chore: refine txin imports --- dash/src/blockdata/transaction/txin.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dash/src/blockdata/transaction/txin.rs b/dash/src/blockdata/transaction/txin.rs index 28478acd..4ff3cff2 100644 --- a/dash/src/blockdata/transaction/txin.rs +++ b/dash/src/blockdata/transaction/txin.rs @@ -24,9 +24,10 @@ use bincode::{Decode, Encode}; use crate::blockdata::script::ScriptBuf; +use crate::blockdata::transaction::outpoint::OutPoint; +use crate::blockdata::witness::Witness; use crate::consensus::{Decodable, Encodable, encode}; -use crate::transaction::outpoint::OutPoint; -use crate::{Witness, io}; +use crate::io; /// A transaction input, which defines old coins to be consumed #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] From 37ce04e07fecd7b97828e66e312a476a047e82c3 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Thu, 20 Mar 2025 01:07:31 +0800 Subject: [PATCH 46/61] chore: refine outpoint import --- dash/src/blockdata/transaction/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/blockdata/transaction/mod.rs b/dash/src/blockdata/transaction/mod.rs index bd8020ca..15657f9c 100644 --- a/dash/src/blockdata/transaction/mod.rs +++ b/dash/src/blockdata/transaction/mod.rs @@ -52,7 +52,7 @@ use crate::consensus::{Decodable, Encodable, encode}; use crate::hash_types::{InputsHash, Txid, Wtxid}; use crate::prelude::*; use crate::sighash::LegacySighash; -pub use crate::transaction::outpoint::OutPoint; +pub use self::outpoint::OutPoint; use crate::{Weight, io}; /// Used for signature hash for invalid use of SIGHASH_SINGLE. From 1459f411ba334e9f6c544601d2ea31a70ce283cb Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Mar 2025 12:54:43 +0800 Subject: [PATCH 47/61] chore: fix merge --- dash/src/network/message_qrinfo.rs | 2 +- dash/src/sml/masternode_list_engine/mod.rs | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dash/src/network/message_qrinfo.rs b/dash/src/network/message_qrinfo.rs index 56fdb428..47b73a87 100644 --- a/dash/src/network/message_qrinfo.rs +++ b/dash/src/network/message_qrinfo.rs @@ -4,11 +4,11 @@ use std::{fmt, io}; #[cfg(feature = "bincode")] use bincode::{Decode, Encode}; +use crate::blockdata::transaction::special_transaction::quorum_commitment::QuorumEntry; use crate::consensus::encode::{read_compact_size, read_fixed_bitset, write_fixed_bitset}; use crate::consensus::{encode, Decodable, Encodable}; use crate::internal_macros::impl_consensus_encoding; use crate::network::message_sml::MnListDiff; -use crate::block_data::transaction::special_transaction::quorum_commitment::QuorumEntry; use crate::hash_types::BlockHash; /// The `getqrinfo` message requests a `qrinfo` message that provides the information diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index b0a672fb..9aec2a6b 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -43,6 +43,11 @@ impl MasternodeListEngineBTreeMapBlockContainer { self.block_heights.insert(block_hash, height); self.block_hashes.insert(height, block_hash); } + + pub fn clear(&mut self) { + self.block_hashes.clear(); + self.block_heights.clear(); + } } #[derive(Clone, Eq, PartialEq)] @@ -111,6 +116,12 @@ impl MasternodeListEngineBlockContainer { MasternodeListEngineBlockContainer::BTreeMapContainer(map) => map.block_hashes.len(), } } + + pub fn clear(&mut self) { + match self { + MasternodeListEngineBlockContainer::BTreeMapContainer(map) => map.clear(), + } + } } #[derive(Clone, Eq, PartialEq)] @@ -176,10 +187,8 @@ impl MasternodeListEngine { } pub fn clear(&mut self) { - self.block_hashes.clear(); - self.block_heights.clear(); + self.block_container.clear(); self.masternode_lists.clear(); - self.known_chain_locks.clear(); self.known_snapshots.clear(); self.rotated_quorums_per_cycle.clear(); self.quorum_statuses.clear(); @@ -661,7 +670,7 @@ impl MasternodeListEngine { diff_end_height: Option, verify_quorums: bool, previous_chain_lock_sigs: Option<[BLSSignature; 3]>, - ) -> Result<(BlockHash, BlockHash, Option, SmlError> { + ) -> Result, SmlError> { let base_block_hash = masternode_list_diff.base_block_hash; let block_hash = masternode_list_diff.block_hash; if let Some(known_genesis_block_hash) = self @@ -690,7 +699,7 @@ impl MasternodeListEngine { } }; self.masternode_lists.insert(diff_end_height, masternode_list); - return Ok((base_block_hash, block_hash, None)); + return Ok(None); } } @@ -814,7 +823,7 @@ impl MasternodeListEngine { self.block_container.feed_block_height(diff_end_height, block_hash); - Ok((base_block_hash, block_hash, rotation_sig)) + Ok(rotation_sig) } #[cfg(feature = "quorum_validation")] From f748f6e72cd3b8978c6740ee267a13834dfef893 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Mar 2025 13:38:56 +0800 Subject: [PATCH 48/61] chore: remove unused constraint --- dash/src/sml/masternode_list_engine/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index 9aec2a6b..5626c928 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -385,7 +385,6 @@ impl MasternodeListEngine { ) -> Result<(), QuorumValidationError> where FH: Fn(&BlockHash) -> Result, - FS: Fn(&BlockHash) -> Result, ClientDataRetrievalError>, { // Fetch and process block heights using the provided callback if let Some(fetch_height) = fetch_block_height { From df893fbcabca0eaba64a9fc7368f55b911531657 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Mar 2025 13:43:02 +0800 Subject: [PATCH 49/61] chore: oops --- dash/src/sml/masternode_list_engine/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/sml/masternode_list_engine/mod.rs b/dash/src/sml/masternode_list_engine/mod.rs index 5626c928..932e91b1 100644 --- a/dash/src/sml/masternode_list_engine/mod.rs +++ b/dash/src/sml/masternode_list_engine/mod.rs @@ -376,7 +376,7 @@ impl MasternodeListEngine { Ok(()) } - pub fn feed_qr_info( + pub fn feed_qr_info( &mut self, qr_info: QRInfo, verify_tip_non_rotated_quorums: bool, From c051fcca671d52a4b557f2533ab21480322332ac Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Mar 2025 13:50:29 +0800 Subject: [PATCH 50/61] chore: export VerifyingChainLockSignaturesType --- dash/src/sml/quorum_entry/qualified_quorum_entry.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs index 0e40f030..8230562a 100644 --- a/dash/src/sml/quorum_entry/qualified_quorum_entry.rs +++ b/dash/src/sml/quorum_entry/qualified_quorum_entry.rs @@ -12,6 +12,7 @@ use bincode::{Decode, Encode}; #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] #[cfg_attr(feature = "bincode", derive(Encode, Decode))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum VerifyingChainLockSignaturesType { Rotating([BLSSignature; 4]), NonRotating(BLSSignature), From 3899a549abbdeac0674ce0c7a9ce56510d068085 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 25 Mar 2025 14:36:22 +0800 Subject: [PATCH 51/61] chore: export SMLError --- dash/src/sml/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/src/sml/error.rs b/dash/src/sml/error.rs index f3b33bac..2de64396 100644 --- a/dash/src/sml/error.rs +++ b/dash/src/sml/error.rs @@ -8,6 +8,7 @@ use crate::BlockHash; #[cfg_attr(feature = "bincode", derive(Encode, Decode))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] +#[cfg_attr(feature = "apple", ferment_macro::export)] pub enum SmlError { /// Error indicating that the base block is not the genesis block. #[error("Base block is not the genesis block: {0}")] From 61d8ec55daad86df99e7f42a1fa81069d90d03d4 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sat, 29 Mar 2025 20:12:56 +0800 Subject: [PATCH 52/61] chore: bls-signatures update --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 414c609d..5f9a10a9 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", tag = "1.3.5", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "09c00502f301bde2bb4e3591848fd8a29b49d81b", optional = true } ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } [dev-dependencies] From f6c2837f5b72de33ff97724e9ab936110a4a94a4 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 1 Apr 2025 20:02:19 +0800 Subject: [PATCH 53/61] chore: try one trick --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 5f9a10a9..0295ba48 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "09c00502f301bde2bb4e3591848fd8a29b49d81b", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "5a8c30af319c1d9467a4cb0f8c847a12efe6614e", optional = true } ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } [dev-dependencies] From 534ba33e2c8be31e8d0304c680b26d1004c3e828 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 1 Apr 2025 20:42:27 +0800 Subject: [PATCH 54/61] chore: one more bls trick --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 0295ba48..6ea9283c 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "5a8c30af319c1d9467a4cb0f8c847a12efe6614e", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "1fbd8055622365d488611241fe56670da29dd877", optional = true } ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } [dev-dependencies] From aa4e98a964bf6d472dff25cfc6a7f853bdb2c6f2 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Fri, 4 Apr 2025 11:51:58 +0800 Subject: [PATCH 55/61] chore: bls with lower ios target --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 6ea9283c..4e2a335f 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "1fbd8055622365d488611241fe56670da29dd877", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "a52c196bdcdbdce7a5f0f67038c6d237a14607b8", optional = true } ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } [dev-dependencies] From 9cd29dd7c3335503b71cae2e51a7de8333af13aa Mon Sep 17 00:00:00 2001 From: pankcuf Date: Sun, 6 Apr 2025 18:41:22 +0800 Subject: [PATCH 56/61] chore: ferment 0.2 --- dash/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 4e2a335f..4191ef3d 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -73,8 +73,8 @@ ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "a52c196bdcdbdce7a5f0f67038c6d237a14607b8", optional = true } -ferment = { git = "https://github.com/dashpay/ferment", package = "ferment", optional = true } -ferment-macro = { git = "https://github.com/dashpay/ferment", package = "ferment-macro", optional = true } +ferment = { version = "0.2", package = "ferment", optional = true } +ferment-macro = { version = "0.2", package = "ferment-macro", optional = true } [dev-dependencies] serde_json = "1.0.96" serde_test = "1.0.19" From f5213fe5f552938120b2d9d957ef98b879a78ef6 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 8 Apr 2025 13:33:51 +0800 Subject: [PATCH 57/61] chore: update bls-signatures version --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index 4191ef3d..d70f2db4 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "a52c196bdcdbdce7a5f0f67038c6d237a14607b8", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "ccda6b06366777dbab33a8b96928a2f81ab358a3", optional = true } ferment = { version = "0.2", package = "ferment", optional = true } ferment-macro = { version = "0.2", package = "ferment-macro", optional = true } [dev-dependencies] From 1aeeb4b0c62dd8850a3aba7bd75f98deac973756 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Tue, 8 Apr 2025 13:57:52 +0800 Subject: [PATCH 58/61] chore: update bls-signatures --- dash/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/Cargo.toml b/dash/Cargo.toml index d70f2db4..fac325cd 100644 --- a/dash/Cargo.toml +++ b/dash/Cargo.toml @@ -72,7 +72,7 @@ lazy_static = "1.5.0" ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true } blake3 = "1.5" thiserror = "1" -bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "ccda6b06366777dbab33a8b96928a2f81ab358a3", optional = true } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "a0fec2f4da2bdbb753e6287b0546ae0b08e74e02", optional = true } ferment = { version = "0.2", package = "ferment", optional = true } ferment-macro = { version = "0.2", package = "ferment-macro", optional = true } [dev-dependencies] From eb511ff478391c8d3d9ddb3fc06a6ec43f77f4b7 Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 16 Apr 2025 17:54:02 +0800 Subject: [PATCH 59/61] chore: fix testnet genesis --- dash/src/network/constants.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dash/src/network/constants.rs b/dash/src/network/constants.rs index f325af73..9a1fb31e 100644 --- a/dash/src/network/constants.rs +++ b/dash/src/network/constants.rs @@ -163,12 +163,7 @@ impl Network { hex::decode("00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c") .expect("expected valid hex"); block_hash.reverse(); - Some(BlockHash::from_byte_array( - hex::decode("00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c") - .expect("expected valid hex") - .try_into() - .expect("expected 32 bytes"), - )) + Some(BlockHash::from_byte_array(block_hash.try_into().expect("expected 32 bytes"))) } Network::Devnet => None, Network::Regtest => None, From 7d23770ff019a6389a3cbee747e62d403c1a552e Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 16 Apr 2025 21:01:43 +0800 Subject: [PATCH 60/61] chore: fix: message impl --- dash/src/network/message_qrinfo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/network/message_qrinfo.rs b/dash/src/network/message_qrinfo.rs index 0dbc7dfa..c3b843c3 100644 --- a/dash/src/network/message_qrinfo.rs +++ b/dash/src/network/message_qrinfo.rs @@ -158,7 +158,7 @@ impl Decodable for QRInfo { pub struct QuorumSnapshot { pub skip_list_mode: MNSkipListMode, pub active_quorum_members: Vec, // Bitset, length = (active_quorum_members_count + 7) / 8 - pub skip_list: Vec, // Array of uint32_t + pub skip_list: Vec, // Array of uint32_t } impl Display for QuorumSnapshot { From 6b336b952ffda05f0e2c4079a5e707b2aae2bc7a Mon Sep 17 00:00:00 2001 From: pankcuf Date: Wed, 16 Apr 2025 21:12:59 +0800 Subject: [PATCH 61/61] chore: add Vec consensus_encode impl --- dash/src/consensus/encode.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/src/consensus/encode.rs b/dash/src/consensus/encode.rs index d4f2ec9c..b322e6b5 100644 --- a/dash/src/consensus/encode.rs +++ b/dash/src/consensus/encode.rs @@ -741,6 +741,7 @@ impl_vec!(TxIn); impl_vec!(Vec); impl_vec!(u16); impl_vec!(u32); +impl_vec!(i32); impl_vec!(u64); impl_vec!(TapLeafHash); impl_vec!(VarInt);