Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dashcore = { git = "https://github.com/dashpay/rust-dashcore", features = [
"rand",
"signer",
"serde",
], default-features = false, tag = "v0.37.0" }
], default-features = false, tag = "v0.38.0" }
Copy link
Contributor

@coderabbitai coderabbitai bot Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Using a specific commit hash instead of semantic version

The change from a semantic version tag to a specific commit reference is likely part of the workaround mentioned in the PR objective for fixing the reversed QuorumHash issue. While pinning to an exact commit increases reproducibility, it makes dependency management harder in the future.

Consider adding a comment in the code or creating a follow-up ticket to eventually revert back to semantic versioning once a permanent solution for the QuorumHash issue is implemented.


🏁 Script executed:

#!/bin/bash
# Check where the specific commit falls in the version history
echo "Checking if this commit is between v0.36.0 and v0.37.0 or relates to quorum hash fixes"

git ls-remote --tags https://github.com/dashpay/rust-dashcore | grep -E "v0.3[67]"

curl -s https://api.github.com/repos/dashpay/rust-dashcore/commits/217197c796ff296f428593b391a00f9200beceac | jq '.commit.message'

Length of output: 671


Action: Document Temporary Dependency Pinning

The dependency declaration in packages/rs-dpp/Cargo.toml is currently using an explicit tag ("v0.38.0") for the rust-dashcore dependency. Our verification confirms that the pinned commit (with the message "feat: add get_quorum_info_reversed") is indeed the temporary workaround addressing the reversed quorum issue. However, pinning to this specific reference instead of using a semantic version adds long-term maintenance overhead.

  • Location: packages/rs-dpp/Cargo.toml, line 32.
  • Impact: This change locks the dependency to a commit that may not receive compatible future updates.
  • Recommendation:
    • Add an inline comment explaining that the explicit tag is a temporary measure for the reversed quorum issue.
    • Consider creating a follow-up ticket to revert to semantic versioning once a permanent fix is available.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware, but we aren't publishing crates at the moment so we have to use repo + tag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shumkov Thanks for the clarification. You're right - using a Git repository with tags is the appropriate approach when working with dependencies that aren't published to crates.io. The tag-based versioning you're using (v0.38.0) is actually preferable to commit hashes as it maintains semantic version information while addressing your current workflow constraints.

🐰 nods in understanding


✏️ Learnings added
Learnt from: shumkov
PR: dashpay/platform#2489
File: packages/rs-dpp/Cargo.toml:32-32
Timestamp: 2025-03-11T09:39:22.632Z
Learning: In the Dash Platform project, dependencies are currently managed using Git repository references with tags (repo+tag format in Cargo.toml) rather than published crates, as the team is not currently publishing crates to crates.io.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

env_logger = { version = "0.11" }
getrandom = { version = "0.2", features = ["js"] }
hex = { version = "0.4" }
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rand = "0.8.5"
tempfile = "3.3.0"
hex = "0.4.3"
indexmap = { version = "2.2.6", features = ["serde"] }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.38.0" }
dpp = { path = "../rs-dpp", features = ["abci"] }
simple-signer = { path = "../simple-signer" }
rust_decimal = "1.2.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ where
(
*quorum_hash,
VerificationQuorum {
public_key: validator_set.threshold_public_key().clone(),
public_key: *validator_set.threshold_public_key(),
index: validator_set.quorum_index(),
},
)
Expand Down
19 changes: 11 additions & 8 deletions packages/rs-drive-abci/src/rpc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ macro_rules! retry {
}

let mut last_err = None;
for i in 0..MAX_RETRIES {
let result = (0..MAX_RETRIES).find_map(|i| {
match $action {
Ok(result) => return Ok(result),
Ok(result) => Some(Ok(result)),
Err(e) => {
match e {
dashcore_rpc::Error::JsonRpc(
Expand All @@ -187,16 +187,19 @@ macro_rules! retry {
},
),
) => {
// Delay before next try
last_err = Some(e);
let delay = fibonacci(i + 2) * FIB_MULTIPLIER;
std::thread::sleep(Duration::from_secs(delay));
None
}
_ => return Err(e),
};
_ => Some(Err(e)),
}
}
}
}
Err(last_err.unwrap()) // Return the last error if all attempts fail
});

result.unwrap_or_else(|| Err(last_err.unwrap()))
}};
}

Expand Down Expand Up @@ -267,7 +270,7 @@ impl CoreRPCLike for DefaultCoreRPC {
&self,
height: Option<CoreHeight>,
) -> Result<ExtendedQuorumListResult, Error> {
retry!(self.inner.get_quorum_listextended(height))
retry!(self.inner.get_quorum_listextended_reversed(height))
}

fn get_quorum_info(
Expand All @@ -278,7 +281,7 @@ impl CoreRPCLike for DefaultCoreRPC {
) -> Result<QuorumInfoResult, Error> {
retry!(self
.inner
.get_quorum_info(quorum_type, hash, include_secret_key_share))
.get_quorum_info_reversed(quorum_type, hash, include_secret_key_share))
}

fn get_protx_diff_with_masternodes(
Expand Down
4 changes: 2 additions & 2 deletions packages/rs-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ envy = { version = "0.4.2", optional = true }
futures = { version = "0.3.30" }
derive_more = { version = "1.0", features = ["from"] }
# dashcore-rpc is only needed for core rpc; TODO remove once we have correct core rpc impl
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.38.0" }
lru = { version = "0.12.5", optional = true }
bip37-bloom-filter = { git = "https://github.com/dashpay/rs-bip37-bloom-filter", branch = "develop" }
zeroize = { version = "1.8", features = ["derive"] }
Expand Down Expand Up @@ -95,7 +95,7 @@ offline-testing = ["mocks"]
# Requires configuration of Dash Platform connectivity.
# See [README.md] for more details.
#
# Without this feature enabled, tests will use test vectors from `tests/vectors/` instead of connecting to live
# Without this feature enabled, tests will use test vectors from `tests/vectors/` instead of connecting to live
# Dash Platform.
#
# If both `offline-testing` and `network-testing` are enabled, "offline-testing" will take precedence.
Expand Down
2 changes: 1 addition & 1 deletion packages/simple-signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ rust-version.workspace = true

[dependencies]
bincode = { version = "2.0.0-rc.3", features = ["serde"] }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.37.0" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.38.0" }
dpp = { path = "../rs-dpp", features = ["abci"] }
base64 = { version = "0.22.1" }
Loading