Repository navigation
build: make the workspace lockfile vendorable again - #5473
PastaPastaPasta wants to merge 1 commit into
Conversation
Since #5307 bumped rust-dashcore, the lockfile holds base58ck 0.5.0, bitcoin_hashes 1.2.0, bitcoin-internals 0.7.0 and bitcoin-units 0.5.0 twice: from crates.io (via base-sdk's dash-pkc, dash-num and dash-types, and rust-dashcore's dashcore-crypto) and from rust-bitcoin rev 7ba35c7c (via bitcoin-crypto in dashcore-crypto). `cargo vendor --locked` cannot put one name and version from two sources into a single directory source, so it fails with "found duplicate version of package `base58ck v0.5.0` vendored from two sources". Patch crates.io to the same rust-bitcoin rev for those four crates, so each has one source again. bitcoin-internals 0.5.0 and hex-conservative 0.3.2, used only by the crates.io bitcoin-units, drop out of the lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 42a2204) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Verified the complete two-file diff at head 42a2204 against the supplied reviewer evidence and cached upstream sources; no actionable in-scope defects were found. The patches use the existing rust-bitcoin revision, and the lockfile removes six registry packages without adding packages or retaining duplicate name/version pairs. This was static verification only: the supplied CI snapshot shows Kotlin checks passing, Rust workspace and wallet tests skipped, and PR Hygiene pending; vendoring and Rust build/test results were not independently reproduced.
Review provenance
Source: reviewer 1: gemini-3.8-flash-high (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — The diff is a small, contained build fix that unifies four dependency sources and removes duplicate lockfile entries without changing application logic. - Phase 1 reviewers:
gemini-3.8-flash-high— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
gemini-3.8-flash-high— antigravity quota: weekly 71% left, 5h 100% left - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort medium); agentphase2-reviewer
|
@coderabbitai review No review for |
Issue being fixed or feature implemented
Dash Core builds Platform offline from a vendored workspace. Its bundle script runs
cargo vendor --locked. That has failed onv5.1-devsince #5307 ("chore(platform)!: update rust-dashcore (incl secp256k1 0.33)"):The rust-dashcore pin from that PR (90359ed5) takes
bitcoin-cryptofrom rust-bitcoin rev 7ba35c7c. It does so because the crates.io release ofbitcoin-crypto0.3.0 needs secp256k1 0.32, not 0.33. That rev carries base58ck 0.5.0, bitcoin_hashes 1.2.0, bitcoin-internals 0.7.0 and bitcoin-units 0.5.0. Base-sdk (dash-pkc, dash-num, dash-types) and rust-dashcore's own dashcore-crypto take the same versions from crates.io. Cargo cannot put one name and version from two sources into a single directory source, so vendoring fails. This undoes #4631, which made the lockfile vendorable on purpose.Neither upstream has aligned yet. rust-dashcore's default branch and base-sdk's HEAD still have the split, so bumping a pin doesn't help.
What was done?
[patch.crates-io]that points the four crates at the same rust-bitcoin rev asbitcoin-crypto, so each has one source again.Cargo.lock. Entries are only removed, never added:bitcoin-internals0.5.0 andhex-conservative0.3.2, which only the crates.iobitcoin-unitsused.bitcoin-cryptorev. A different rev would add a second git source and bring the failure back.The reverse patch, mapping the git copies to crates.io, doesn't compile: git
bitcoin-primitives0.103.1 losesencoding::VecDecoderand other items.What changes in compiled code: dash-pkc and dashcore-crypto now build against the git
base58ckandbitcoin_hashes. They only use these, and none of them behave differently:Base58CkString::encode_unbounded: same algorithm.decode_check: same algorithm. The error enum is restructured but has the sameDisplay.sha256,sha256d,ripemd160: only lint attributes differ.Base58CkString's inline layout, which is identical.bitcoin_hashescode change is inhkdf, which neither crate uses.bitcoin-internals0.7.0 has the same source as the crates.io copy.The crates.io
bitcoin-primitives0.103.0, behind dash-types' optionalbitcoin-primitivesfeature, is never activated in this workspace. If someone turns that feature on later, it will probably fail to compile against the gitbitcoin-units, because the two use differentbitcoin-consensus-encodingversions.[patch]only applies at the workspace root. Crates that depend on Platform by git are unchanged: they still build, and they still can't vendor. The lasting fix is a single source in rust-dashcore; this patch can go once that lands.Platform has no vendoring check in CI, so none is added. To reproduce:
It fails on
v5.1-devand succeeds on this branch.How Has This Been Tested?
Cargo 1.98.1 (the pinned toolchain):
cargo vendor --lockedon the whole workspace:v5.1-dev(5b5daf6): fails with the error above;cargo check --locked -p dpp --all-features: passes.cargo check --locked -p dash-sdk -p platform-wallet -p platform-wallet-ffi -p drive-abci: passes.cargo test --locked -p simple-signer -p platform-wallet --lib: 1240 and 6 passed. These include the WIF, address and ECDSA key tests that go through dash-pkc's base58 and hashing.dash-sdk-cxxbranch rebases cleanly onto this one with no lockfile conflict. There,cargo vendor --lockedsucceeds andcargo check --locked -p dash-sdk-cxxpasses.Breaking Changes
None.
Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code