Repository navigation
build: make the workspace lockfile vendorable again - #5473
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configure BLS dependency sources Cargo.toml, packages/rs-dpp/Cargo.toml |
The workspace adds dashcore-crypto and patches four Bitcoin crates to a pinned rust-bitcoin revision. rs-dpp replaces the optional dash-pkc dependency and enables BLS through dashcore-crypto. |
Use re-exported BLS types packages/rs-dpp/src/bls/bls_signatures.rs, packages/rs-dpp/tests/bls_compatibility.rs |
The BLS implementation and compatibility test use types from dashcore_crypto::dash_pkc::bls. |
Invitation WIF test
| Layer / File(s) | Summary |
|---|---|
Validate WIF Base58 checksum packages/rs-sdk/src/platform/dashpay/invitation.rs |
The WIF round-trip test uses decode_check before checking the network byte. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- build: shrink the vendoring
[patch.crates-io]on the next rust-dashcore bump #5648: This follow-up concerns the root Cargo patch entries added in this change and their reduction during a laterrust-dashcorerevision update.
Possibly related PRs
- dashpay/platform#5517: Updates workspace
rust-dashcoredependencies, which can change the dependency sources aligned here. - dashpay/platform#5639: Updates workspace
rust-dashcoredependencies and lockfile source resolution. - dashpay/platform#5471: Moves the invitation codec into
rs-sdkand includes related WIF handling.
Suggested reviewers: lklimek, shumkov
Merge Risk: 
Minimal · previous review 44b4c
-
The dependency alignment and WIF test update are consistent with their intended contracts, with no established merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 3 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 2
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit c7b0e20) · triage: normal |
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 |
) * [c5534aa] sdk%build: take rust-bitcoin crates from `rust-dashcore`'s revision (pasta) * [9cf731c] sdk%build: take sample rust-bitcoin crates from the same revision (pasta) * [9eb1280] pkc%refac: group external test imports in `secret_bytes` (pasta) Description: ````` ## Summary Take the rust-bitcoin crates from the same git revision that `rust-dashcore`'s `bitcoin-crypto` uses (`7ba35c7c`), instead of from crates.io. - `base58ck`, `bitcoin_hashes`, `bitcoin-consensus-encoding`, `bitcoin-internals`, `bitcoin-primitives` and `bitcoin-units` become `{ version, git, rev }` workspace dependencies. Keeping `version` means `cargo publish` still resolves them from crates.io. - That revision drops `base58ck::decode`, so `pkgs/pkc/src/ecdsa/secret_bytes.rs` reads checksums through `decode_check`. - `Cargo.lock` is regenerated. ## Why `rust-dashcore` needs secp256k1 0.33, but the published `bitcoin-crypto` 0.3.0 still uses 0.32, so it takes `bitcoin-crypto` from a rust-bitcoin git revision. A git dependency also pulls its sibling crates from that revision, so `rust-dashcore` ends up with git copies of `base58ck` 0.5.0, `bitcoin_hashes` 1.2.0, `bitcoin-internals` 0.7.0 and `bitcoin-units` 0.5.0. `base-sdk` takes the same crates by version from crates.io. The two copies share a name and version but not code (`base58ck`'s `src/lib.rs` differs by 428 lines), so Cargo builds both side by side. `cargo vendor` cannot: it keys vendored directories by name and version and fails with ``` found duplicate version of package `base58ck v0.5.0` vendored from two sources: crates-io, and git rust-bitcoin rev 7ba35c7c1dd6 ``` Dash Core's depends and Guix builds vendor the Platform workspace offline, so this blocks any Platform commit that pulls in both. dashpay/platform#5473 works around it with a root `[patch.crates-io]`, which Cargo only honours at the top level of a build; this change removes the disagreement at its source. ## Follow-ups (not in this PR) 1. `rust-dashcore`: point its direct `base58ck` (and `bitcoin_hashes`) dependency at the same git revision and bump its `base-sdk` pin. 2. `platform`: bump the `rust-dashcore` pin and drop the `[patch.crates-io]` workaround from #5473. The git revision is temporary; once a `bitcoin-crypto` release on secp256k1 0.33 is published, all of these can return to crates.io versions. ## Testing - `cargo test --workspace --locked`: passes. - `cargo clippy --workspace --all-targets --locked -- -D warnings` and `cargo fmt --all --check`: clean. - `cargo deny check` (advisories, bans, licenses, sources): ok. - `cargo vendor --locked`: succeeds; each of the six crates appears once in `Cargo.lock`, all from the git source. - `maint/lint/lint_commit.py -c HEAD`: passes. Not run locally: `taplo` (TOML format), CodeQL and semgrep lints. 🤖 Generated with [Claude Code](https://claude.com/claude-code) `````
42a2204 to
01d2c8d
Compare
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The dependency-source unification and lockfile changes match the stated vendoring goal, and the updated Base58 test uses the available checked decoder correctly. However, patching the pinned Dashcore dependency removes dpp::dashcore::base58::decode through DPP’s public re-export, so the PR’s “Breaking Changes: None” declaration is inaccurate. Rust workspace tests and JS builds were still in progress, with no failed code checks reported.
🟡 2 suggestion(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (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); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a cross-cutting dependency and build-resolution change with a small API call adjustment, but dependency and lockfile changes do not by themselves meet the critical-surface bar. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `Cargo.toml`:
- [SUGGESTION] Cargo.toml:85-88: Declare or preserve the removed public Base58 API
These patches select the rust-bitcoin revision whose Base58 API no longer provides `decode`. Because `packages/rs-dpp/src/lib.rs:16` publicly re-exports `dashcore`, downstream users can observe this through `dpp::dashcore::base58::decode`, which will no longer compile. Updating the internal invitation test covers Platform’s only current caller but does not preserve downstream compatibility. Either retain a compatibility API in the owning rust-dashcore layer, or mark this release as breaking and document migration to `decode_check`; the current `Breaking Changes: None` declaration is inaccurate.
- [SUGGESTION] Cargo.toml:79-88: Add a CI guard for duplicate Cargo sources
The PR’s primary goal is to keep `cargo vendor --locked` working, but the repository has no persistent check that detects a future same-name, same-version package resolving from multiple sources. A later dependency bump could silently reintroduce the split and break Dash Core’s offline bundle. Add a lightweight CI guard, such as running `cargo vendor --locked` into a temporary directory or checking the lockfile for duplicate `(name, version)` pairs with different sources.
|
Bots are done — your move: post |
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
44b4c42 to
1cb6deb
Compare
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
`cargo vendor --locked` cannot put one name and version from two sources into a single directory source. `v5.1-dev` has two such splits: - rust-dashcore takes `bitcoin-crypto` from rust-bitcoin rev 7ba35c7c, whose base58ck 0.5.0, bitcoin_hashes 1.2.0, bitcoin-internals 0.7.0 and bitcoin-units 0.5.0 also come from crates.io through base-sdk and dashcore-crypto (since #5307); - rust-dashcore aca02026 pins base-sdk d9e0d241 while dpp kept dash-pkc at 33fcc59e, so dash-num, dash-pkc and dash-types come from two git revs (since #5514). No `[patch]` can merge those. Move dpp's dash-pkc to d9e0d241. Between the two revs `pkc` only moves its errors to thiserror (same messages), gates serde apart from codec and adds an ADX check that `portable` (enabled through dashcore/bls) satisfies. BLS signing and verification are unchanged. Patch crates.io to the same rust-bitcoin rev for the four crates. The git base58ck has no unchecked `decode`, which `dashcore::base58` re-exports, so the WIF test in rs-sdk's invitation module uses `decode_check`, which yields the same payload. The lockfile only loses packages: the duplicate copies, plus bitcoin-internals 0.5.0 and hex-conservative 0.3.2. #5648 tracks shrinking the patch on the next rust-dashcore bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dpp pinned dash-pkc to a base-sdk rev of its own, which had to be kept equal to rust-dashcore's by hand: a second rev duplicates dash-pkc, dash-num and dash-types in the lockfile and breaks `cargo vendor`. dashcore-crypto already re-exports dash_pkc, so take it from there at the same rust-dashcore rev as dashcore. A rust-dashcore bump now carries dpp's dash-pkc with it. The lockfile keeps the same packages; only dpp's edge moves from dash-pkc to dashcore-crypto. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1cb6deb to
c7b0e20
Compare
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The dependency consolidation at this exact head correctly removes same-name, same-version source splits and routes DPP's BLS code through the pinned rust-dashcore re-export. One in-scope regression-prevention suggestion remains: the repository has no lightweight guard against future duplicate Cargo sources; the Rust workspace test check is still in progress in the supplied CI snapshot, while no related failure is reported.
🟡 1 suggestion(s)
1 carried-forward finding(s) already raised on this PR; not re-posting as new inline comments.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a cross-cutting Rust dependency and lockfile change that alters the compiled cryptographic dependency revisions and a base58 test call, but it does not itself modify cryptographic algorithms, consensus rules, signatures, key handling, or other critical behavior. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `Cargo.toml`:
- [SUGGESTION] Cargo.toml:86-90: Add a CI guard for duplicate Cargo sources
(existing thread: https://github.com/dashpay/platform/pull/5473#discussion_r4406228931)
This PR fixes a vendoring failure that can be reintroduced by a later dependency update: two packages with the same name and version resolved from different sources cause `cargo vendor --locked` to fail. The existing Dash Core bundle check runs only when Dash Core moves its Platform pin, so it is a late and conditional signal rather than a repository-level regression check. Add a lightweight lockfile check for duplicate `(name, version)` pairs with distinct `source` values, or an appropriate focused vendoring validation, so dependency changes detect this invariant before the next downstream pin bump.
|
Bots are done — your move: post |
|
Approved |
…ehind PLATFORM_GUI=1 bfe078a ci: build linux64 against depends with PLATFORM_GUI=1 (pasta) 2525537 build: add --enable-platform-gui (pasta) 3a4de8a build(depends): build dash-sdk-cxx behind a PLATFORM_GUI knob (pasta) 30f071c build(depends): add a prebuilt Rust toolchain and per-host standard library (pasta) Pull request description: ## Issue being fixed or feature implemented The Dash Platform GUI (DPNS usernames, DashPay profiles, contacts and contact payments) links a Rust library: `dash-sdk-cxx`, from `packages/rs-sdk-cxx` in dashpay/platform (dashpay/platform#4633). It is a thin cxx binding of `dash-sdk`, which handles transport, proof verification and state-transition assembly. Core keeps the keys, the trust inputs and the UI. This PR is only the build foundation: depends can build the binding behind `PLATFORM_GUI=1`, and `configure --enable-platform-gui` can link it. Nothing in `src/` uses it yet. #7512 has the full map of the stack. ## Decision requested Before reviewing the code, maintainers need to answer one question: **should depends carry a prebuilt, sha256-pinned Rust toolchain and a prebuilt protoc, built only when `PLATFORM_GUI=1` is set?** If the answer is no, this PR closes, and the stacked client and GUI PRs (#7670, #7671, #7765, #7766, #7767) need a different design. The wallet seams in #7763 are useful either way. **What depends would carry (only with `PLATFORM_GUI=1`)** | Package | What | Pinned by | |---|---|---| | `native_rust` | prebuilt `rustc` and `cargo` 1.98.1 (the toolchain dashpay/platform pins), from the component `.tar.xz` archives, for the four build hosts depends supports | sha256 of each static.rust-lang.org archive | | `rust_stdlib` | prebuilt Rust standard library for the host, and for the build machine when it differs; every Linux host uses the glibc (`-unknown-linux-gnu`) one | sha256 per host | | `native_protobuf` | prebuilt `protoc` 32.0, which build scripts in the crate closure (such as tenderdash-proto's) use to generate protobuf code | sha256 per build host | | `platform_cxx` | `dash-sdk-cxx` (`libdash_sdk_cxx.a`, headers `dash/sdk/*.h`), built `--frozen --offline` from a Platform source tarball and a crate bundle, both at one Platform commit | commit plus two sha256s | **Costs** - Download: the Rust toolchain's rustc and cargo components are 57 MB to 91 MB per build architecture (91 MB for x86_64 Linux), plus 26 MB to 30 MB of standard library per host (and for the build machine when it is a different target). The Platform tarball is 158 MB and the crate bundle 63 MB. - Mirror: every pin bump adds those two Platform archives to the depends sources mirror. The bundle has no upstream URL, and GitHub does not promise stable bytes for its archive endpoint. - CI: one more depends job (`x86_64-pc-linux-gnu_platform_gui`). The `linux64` job builds against it instead of the shared `x86_64-pc-linux-gnu` depends, which `linux64_asan` and `linux64_fuzz` keep, so there is no extra build or test job. - Maintenance: whoever bumps the pin runs `contrib/devtools/platform-bundle.sh <commit>`, which prints the new pins and reproduces the bundle hash, and uploads both archives. `contrib/devtools/update-rust-hashes.py` refreshes the toolchain pins. **Precedents** - Zcash carries a prebuilt Rust toolchain in its depends. `native_rust.mk`, `rust_stdlib.mk` and `update-rust-hashes.py` are derived from Zcash's. - libmultiprocess is an external library that depends pins by commit. - `PLATFORM_GUI` copies the `MULTIPROCESS` knob, which is the approach requested on #7109. **Default builds are unchanged.** Without `PLATFORM_GUI=1`, depends builds the same package set as develop for every host, and config.site leaves `--enable-platform-gui` off. With it, config.site sets the option to `auto`, which configure keeps on only when the GUI and the wallet are built, so `--enable-fuzz`, `--without-gui` and `--disable-wallet` still configure against those depends. With the option, only `dash-qt`, `test_dash` and `test_dash-qt` link `dash-sdk-cxx`, so `dashd`, `dash-cli`, `dash-tx`, `dash-util`, `dash-wallet`, `bench_dash` and the fuzz binary never link Rust on any OS. CI enforces this: `linux64` builds with the option, and `contrib/devtools/check-no-rust.py` then fails that job if any of those seven binaries contains Rust or cxx-bridge symbols, or has no symbols to check. **It is an opt-in developer build, not a release one.** With `PLATFORM_GUI=1` inside a Guix environment, depends stops with an error, so release binaries are built without it. The remaining Guix work: Guix's own Rust versus the prebuilt one, the mingw-w64 `dlltool`, a two-builder hash match, ring and blst on armhf, ppc64 and riscv64, and a per-binary Windows DLL allowlist for `dash-qt`. `depends/README.md` and `doc/dependencies.md` say this, and that CI builds and tests it on x86_64 Linux only. ## Merge gates 1. **Policy (maintainers).** The decision above. A maintainer approved this PR on 2026-10-21, at the previous pin. The head has changed since (the docs, the two host fixes below, and the rebase onto develop with the CI job move), so it needs a fresh review. 2. **Platform merge. Done.** dashpay/platform#5473 (makes the workspace lockfile vendorable) merged on 2026-10-29, and dashpay/platform#4633 merged on 2026-11-02 into the protected `v5.1-dev` branch. This PR pins that merge commit, `fb463c282ea09adf93dd5d256fc9471969f7a46f`. 3. **Mirror upload. Done (2026-11-02).** Both archives are on the depends sources mirror, and each returns 200 with the pinned sha256: - `platform-fb463c282ea09adf93dd5d256fc9471969f7a46f.tar.gz`, sha256 `8ccb913069ce8d96a32443e98e44e85c331694727cc37c321364711ddaa04039` - `dash-sdk-cxx-crates-fb463c282ea09adf93dd5d256fc9471969f7a46f.tar.gz`, sha256 `da47a0ca89ed023f357a70e19d097f42bd4fe76221ee7bfd1c4eca0102b5f70e` 4. **CI. Done on the fork.** This PR's dashpay CI runs develop's workflows (`pull_request_target`), which have no Platform GUI job, so a green PR run says nothing about the CI commit. The branch's own workflows ran in a fork `push` run against the real mirror (see below). ## What was done? **depends** - `native_rust`, `rust_stdlib`, `native_protobuf` and `platform_cxx`, all added only by `PLATFORM_GUI=1`. Combining it with `NO_QT` or `NO_WALLET` is an error. - The package is named `platform_cxx`, and the configure variables are named `PLATFORM_CXX_*`, after the `PLATFORM_GUI` feature's C++ binding rather than after the crate. The stacked PRs consume those variables, and the crate name appears only where it is the artifact: `-p dash-sdk-cxx`, `libdash_sdk_cxx.a`, `dash_sdk_cxx.pc` and `dash-sdk-cxx-crates-<commit>.tar.gz`. - `platform_cxx` builds only from the two sha256-pinned archives. Cargo runs with `--frozen --offline` and never touches the network. tenderdash-proto's sources come from a Tenderdash archive inside the bundle, next to the `TENDERDASH_COMMITISH` that names it. - Isolation: only the bundle's Cargo configuration is used. Cargo runs from `/` with `--config`, and its home is private. Variables that would change the build (wrappers, `CARGO_BUILD_*`, `CARGO_PROFILE_*`, `CARGO_TARGET_*`, every variable named after the host's or the build machine's Rust triple in either spelling, such as `CC_x86_64-unknown-linux-gnu` or `CFLAGS_x86_64_unknown_linux_gnu`, the generic `CC`/`CFLAGS`/`AR`/`RANLIB` and `HOST_*`/`TARGET_*` fallbacks cc-rs reads, `TENDERDASH_*`) are unset. The depends compilers and flags are then set in Cargo's own environment, after those removals. The release profile is pinned to Platform's (`panic = "unwind"`). - The depends host compiler links the crate and compiles its C and C++. The depends build compiler links build scripts and proc macros. The build directory is remapped out of the objects. - The build fails if the dependency graph (`cargo tree -e normal,build`, matched by exact crate name) reaches the trusted context provider, a general-purpose HTTP client (reqwest, isahc, attohttpc, surf, curl) or a system TLS library (openssl, native-tls, hyper-tls). ureq is allowed: it is only `tenderdash-proto-compiler`'s archive downloader, which never runs, because the bundle carries the archive and Cargo is offline. - **System libraries.** `platform_cxx.mk` holds a vetted per-OS list of the system libraries the archive needs. rustc prints its own list (`--print=native-static-libs`), and the build fails if that list has a library that is neither vetted nor in an explicit, commented ignore set. For example, glibc's `-lutil` and `-lrt` are ignored, because `symbol-check.py` does not allow them and the standard library imports nothing from them. The vetted list goes to configure through an installed `dash_sdk_cxx.pc`. The Linux and macOS lists are within `symbol-check.py`'s allowed libraries; the mingw-w64 one is not (`ntdll.dll`, and the DLLs raw-dylib imports add, which rustc never reports), and the comment says so. Guix refuses `PLATFORM_GUI`, so `symbol-check.py` never sees these builds. - **mingw-w64:** rustc also reports `-lwindows.0.52.0`, the import library windows-targets 0.52 bundles (socket2 0.5, through hyper-util). It is in the ignore set: every function it names is in the vetted mingw-w64 import libraries, and the `dash-qt` link fails loudly if a later pin needs one that is not. - **powerpc64-linux-gnu:** `PLATFORM_GUI` is refused before anything is fetched. Rust links linux-gnu targets with its bundled rust-lld, which rejects big-endian POWER's ELFv1 objects, and the options to use the depends linker instead are unstable there. `depends/README.md` names it, and the hosts `rust_stdlib.mk` has no entry for (such as `powerpc64le-linux-gnu`), as unavailable. - **Docs:** `depends/README.md` and `doc/dependencies.md` describe it as an opt-in developer build: Guix refuses it, release binaries are built without it, CI builds and tests it on x86_64 Linux only, and Rust and protoc are pinned prebuilt binaries verified by SHA256. - `contrib/devtools/platform-bundle.sh <commit>` produces the crate bundle reproducibly and prints the pins. - `contrib/devtools/update-rust-hashes.py` refreshes the toolchain pins, checking each download against the `.sha256` file published next to it. **configure:** `--enable-platform-gui` (default no) requires the GUI and the wallet. The `auto` that PLATFORM_GUI depends set becomes `no` without them, with a notice. It takes `PLATFORM_CXX_CFLAGS` and `PLATFORM_CXX_LIBS` from `dash_sdk_cxx.pc` through `PKG_CHECK_MODULES`, and both can be overridden as usual. It then link-tests creating and shutting down a `dash_sdk::PlatformClient` (`#include <dash/sdk/ffi.h>`). `PLATFORM_CXX_LIBS` is added to the link of `dash-qt`, `test_dash` and `test_dash-qt` only. **CI** - A `linux64_platform_gui` depends job builds with `PLATFORM_GUI=1`, and `linux64` builds against it instead of the shared `x86_64-pc-linux-gnu` depends, as `linux64_tsan` builds against `linux64_multiprocess`'s. #8058 removed `linux64_sqlite`, which this PR used before; `linux64` is the only x86_64 job left with the wallet and GUI and no sanitizers. `linux64_asan` and `linux64_fuzz` keep the plain depends. The new depends job is in the fast tier, with the `linux64` build it feeds. - `linux64` then runs `check-no-rust.py` on the seven binaries. Its other checks are unchanged and now cover the option: `test_dash` (which links `dash-sdk-cxx`), `check-stdlib-paths` and the previous-releases functional tests. It does not run `test_dash-qt`; this PR adds no Qt tests. - The new depends job's cache check runs on x86_64, like its build. Pull request CI runs develop's workflows with the pull request's own `ci/` scripts, so a pull request based before this one has no matrix entry for `linux64_platform_gui` and guesses its host from the machine. On the ARM runner the other depends jobs check on, that host would not match the build runner's and the pull request would lose `linux64` until rebased; on x86_64 it builds the plain depends, as before. - "Cache depends sources" also downloads the x86_64 Linux Platform GUI sources: the toolchain, protoc, standard library and Platform archives. It names the build machine, because its runner may be ARM. Its cache key is unchanged; it hashes `depends/packages/*`, which the new packages change. Pinned: dashpay/platform `fb463c282ea09adf93dd5d256fc9471969f7a46f` (`packages/rs-sdk-cxx`, crate `dash-sdk-cxx`), with the tarball and crate bundle listed under merge gate 3. ## How Has This Been Tested? Environment-scrub revision (head `bfe078a835a7`, same base and pin; only `build(depends): build dash-sdk-cxx…` changes, the other three commits are identical): - Per-target variables were injected in both spellings for both triples (for example `CFLAGS_x86_64_unknown_linux_gnu=-Werror=bogus`, `ARFLAGS_aarch64_unknown_linux_gnu=--bogus`, `CXXSTDLIB_x86_64_unknown_linux_gnu=c++`). The environment Cargo receives no longer contains any of them, natively and for `HOST=aarch64-linux-gnu`; at parse time this also holds for mingw-w64 and x86_64 macOS. Without the injected variables, the environment Cargo receives is the same as at `406cf256e5fa`. - With those variables injected, `make -C depends PLATFORM_GUI=1` builds `platform_cxx` natively and for `HOST=aarch64-linux-gnu`. Both report the same `native-static-libs` as a clean build (`-lstdc++ -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc`), and ring's build script sees no injected build-machine `CFLAGS`. At `406cf256e5fa` the same aarch64 build fails: blake3 on the injected `ARFLAGS`, then ring on the injected build-machine `CFLAGS`. - Fork `push` run [42869942430](https://github.com/PastaPastaPasta/dash/actions/runs/42869942430) at `bfe078a835a7`: every job passed. All 48 PR checks passed too. Three of them (the x86_64 and aarch64 depends jobs and `mac-build`) first failed when their self-hosted runners lost contact with GitHub mid-build; they passed when rerun. Review-fix revision (head `406cf256e5fa`, same base and pin), x86_64 Linux: - `make -C depends PLATFORM_GUI=1` builds every package with the new toolchain recipes, including `platform_cxx` (system-library and forbidden-crate checks pass). `update-rust-hashes.py --check` passes for all 16 pins. - A reviewer built `rust_stdlib` for `HOST=x86_64-w64-mingw32`, which fetches and stages both standard libraries (the host's and the build machine's). - configure against that prefix: the default gives `platform gui = yes` and the link test passes. `--enable-fuzz`, `--without-gui` and `--disable-wallet` each configure with `platform gui = no`. `--without-gui --enable-platform-gui` still stops with "requires the GUI". - The forbidden-crate pattern matches nothing in the real `cargo tree` for x86_64 Linux, mingw-w64 or aarch64 macOS, with `CARGO_TERM_UNICODE` true or false. A positive control (`ureq|hyper`) matches. - `platform-bundle.sh fb463c28…` (now dropping Platform's `.cargo` before pruning) reproduces the pinned bundle hash `da47a0ca…`. - Fork `push` run [42857408117](https://github.com/PastaPastaPasta/dash/actions/runs/42857408117) at `406cf256e5fa`: every job passed, including the `PLATFORM_GUI` depends job and the `linux64` build and tests, except `linux64_multiprocess-lint`. Its runner received a shutdown signal during clang-tidy. Earlier revisions: Rebased onto develop `4c5c0153500f`, at this pin (`fb463c28`), in an `ubuntu:noble` container on x86_64 Linux, commit by commit in one tree: - `build(depends): add a prebuilt Rust toolchain…`: default depends, configure and build pass. - `build(depends): build dash-sdk-cxx…`: `make -C depends PLATFORM_GUI=1` builds every package, including `platform_cxx` from the two archives, and stages `libdash_sdk_cxx.a`, `dash/sdk/ffi.h` and `dash_sdk_cxx.pc`. Configure and build pass. - `build: add --enable-platform-gui`: from a clean tree, configure with the `linux64` job's flags (`--enable-zmq --with-libs=no --enable-reduce-exports`, `-DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE`, `LDFLAGS=-static-libstdc++`, gcc-14, plus `--enable-external-signer --enable-werror`) and `--enable-platform-gui` reports `platform gui = yes`, and the build passes. - `ci: build linux64…`, on that build: - `check-no-rust.py` passes for `dashd`, `dash-cli`, `dash-tx`, `dash-util`, `dash-wallet`, `bench_dash` and the fuzz binary. - A positive control linked against `libdash_sdk_cxx.a` (create and shut down a `PlatformClient`, as configure's link test does) fails `check-no-rust.py`, which lists its Rust symbols. `dash-qt`, `test_dash` and `test_dash-qt` pass it here: they link the archive, but nothing in this PR calls the binding, so no archive member is pulled in. - `make -C src check-stdlib-paths` passes. - `make check` passes (156 `test_dash` test files, `test_dash-qt`, univalue, minisketch, secp256k1, bench sanity). - Disabled, at the head: default depends (no `dash_sdk_cxx.pc` in the prefix) and default configure (`platform gui = no`) build. `check-no-rust.py` passes for all ten binaries, `dash-qt`, `test_dash` and `test_dash-qt` included, and `make check` passes. - Lints: lint-whitespace, lint-files, lint-shell, lint-shell-locale, lint-python-utf8-encoding and lint-tests pass. actionlint reports nothing in `build.yml` beyond develop's own four findings. - Fork `push` run [42354400055](https://github.com/PastaPastaPasta/dash/actions/runs/42354400055) at 86902f7 passed every job. The `x86_64-pc-linux-gnu_platform_gui` cache check ran on x86_64; its depends job built `platform_cxx` from the pinned archives. `linux64-build` staged that depends (`DEP_OPTS: PLATFORM_GUI=1`), configured with `platform gui = yes`, and ran `check-stdlib-paths` and `check-no-rust.py`. `linux64-test` passed. The sources cache had an exact hit, so its download step did not run in this run; run 41517453011 below exercised it. Not exercised: a pull request based before this one running develop's workflows after this merges. Its cache check now runs on x86_64, which is reasoned from `00_setup_env.sh` and `build-depends.yml`, not observed. Before that rebase, at this pin (`fb463c28`), on develop `92f2bfbc9ddb`: - Linux x86_64, in an `ubuntu:noble` container with gcc-11 and the `linux64_sqlite` configure flags plus `--enable-werror`, with the stacked PRs #7763, #7670, #7671 and #7765–#7767 applied on top: - `make -C depends PLATFORM_GUI=1` builds every package, including `platform_cxx` from the two archives. - `dash-qt`, `test_dash` and `test_dash-qt` build. - `check-no-rust.py` passes for `dashd`, `dash-cli`, `dash-tx`, `dash-util`, `dash-wallet`, `bench_dash` and the fuzz binary. - `make check` passes, and so does `test_dash-qt` with `QT_QPA_PLATFORM=minimal`. - macOS: two runs of `contrib/devtools/platform-bundle.sh` into separate `SOURCES_PATH`s produced byte-identical bundles and tarballs, with the hashes above. - Fork `push` run [41517453011](https://github.com/PastaPastaPasta/dash/actions/runs/41517453011) at 42c8e10 passed, with the `linux64_sqlite` CI design this PR had then. At the previous pin (`dc4dc8e8`), on macOS 27 (aarch64-apple-darwin, Xcode 27 SDK), unless stated: - `make -C depends PLATFORM_GUI=1` builds every package, including `platform_cxx` from the two archives. rustc reports `-lc++ -framework Security -framework CoreFoundation -liconv -lSystem -lc -lm`, and the system-library check and the forbidden-crate check pass. - `pkg-config --static --cflags --libs dash_sdk_cxx` from the depends prefix gives `-I<prefix>/lib/pkgconfig/../../include -L<prefix>/lib/pkgconfig/../../lib -ldash_sdk_cxx -framework Security -framework CoreFoundation`. - `configure --enable-platform-gui` finds `dash-sdk-cxx` through pkg-config, and its link test passes. Without the `.pc` file configure stops and says to build depends with `PLATFORM_GUI=1`. With `PLATFORM_CXX_LIBS=-ldash_sdk_cxx`, which drops the vetted frameworks, the link test fails on the missing framework symbols. - Without `PLATFORM_GUI=1`, `make -C depends print-packages print-native_packages print-all_packages` gives the same result as develop for the native host and for x86_64 Linux, armhf, aarch64 Linux, riscv64, ppc64, mingw-w64, x86_64 macOS and arm64 macOS. With `GUIX_ENVIRONMENT` set, `PLATFORM_GUI=1` stops with the Guix error, and a default build does not. - Two runs of `contrib/devtools/platform-bundle.sh` into separate `SOURCES_PATH`s produced byte-identical bundles and tarballs. depends fetched the tarball from GitHub again during the build, and it matched the pin. - Lints: lint-shell, lint-shell-locale, lint-whitespace, lint-files and lint-python-utf8-encoding pass. actionlint reports nothing new in the touched workflows compared with develop. Not run at this pin: the macOS and mingw-w64 `platform_cxx` builds. Not run at all: Guix, or a build on armhf, ppc64 or riscv64. ## Breaking Changes None. Without `PLATFORM_GUI=1` and `--enable-platform-gui`, depends and configure behave as before. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Top commit has no ACKs. Tree-SHA512: 17ddacb35004f89257eb8eb27d993d1dd79be2131d0ee4d01f10668974a17f10223b59edfdf9d51be985e1ecfbc0638568f254085435c962d3d00b25b3bb7d1a
Issue being fixed or feature implemented
Dash Core builds Platform offline from a vendored workspace (dashpay/dash#7623). Its bundle script runs
cargo vendor --locked, and that fails onv5.1-dev:Cargo can't put one name and version from two sources into a single directory source.
v5.1-devhas two such splits, which #5307 and #5514 introduced:bitcoin-cryptofrom rust-bitcoin rev 7ba35c7c, because the crates.io release needs secp256k1 0.32, not 0.33. That rev also carries base58ck 0.5.0, bitcoin_hashes 1.2.0, bitcoin-internals 0.7.0 and bitcoin-units 0.5.0. base-sdk and rust-dashcore'sdashcore-cryptotake the same versions from crates.io.aca02026, which pins base-sdkd9e0d241. dpp kept its owndash-pkcat33fcc59e, sodash-num,dash-pkcanddash-types0.1.0-beta appear from two git revisions.[patch]can't merge those.What was done?
dash-pkcfromdashcore-crypto's re-export (dashcore_crypto::dash_pkc) instead of pinning base-sdk itself.dashcore-cryptois a new workspace dependency at the same rust-dashcore rev asdashcore. This makes dpp used9e0d241, the base-sdk revision rust-dashcore already uses, and every rust-dashcore bump now moves it too.[patch.crates-io]that points the four rust-bitcoin crates at the same rev asbitcoin-crypto. Each of the four is needed: the vendor probe was rerun one line at a time, and each line uncovered the next duplicate.Cargo.lock. Nine packages are removed and nothing is added or changes version; dpp's own entry listsdashcore-cryptoinstead ofdash-pkc. The removed packages are:33fcc59ecopies ofdash-num,dash-pkcanddash-types;bitcoin-internals0.5.0 andhex-conservative0.3.2, which only the crates.iobitcoin-unitsused.What changes in compiled code:
dpp's BLS code now builds against
dash-pkcd9e0d241instead of33fcc59e. Between those revisions thepkcsources change only in these ways:thiserrorwith the same messages;len() % 16 != 0becomes!len().is_multiple_of(16);serdeno longer impliescodec;compile_error!fires forblson x86_64 without ADX unlessportableis on.BLS signing and verification are untouched. dpp's
bls-signaturesalways enablesdashcore/bls, which turns ondash-pkc/portable, so that check passes.blstwas already a single package built withportable, still at 0.3.17.The revision also raises base-sdk's MSRV to 1.89; the toolchain is 1.98. Because dpp's copy is now the same package as rust-dashcore's, it also gets
std,ecdsa,eddsaandserde. None of those features gate BLS code.dash-pkcanddashcore-cryptonow build against the gitbase58ckandbitcoin_hashes. The functions they use behave the same:encode_unbounded,decode_check,sha256,sha256dandripemd160are unchanged;encode_unboundedpanic on some 90-byte payloads.dashcore::base58re-exportsbase58ck, so it now has the git API. That API dropsdecode, the variant without the checksum. Platform's only call was a test inrs-sdk'sdashpay/invitation.rs. The test checks a WIF's network byte, and it now usesdecode_check, which returns the same payload with the checksum verified and stripped.[patch]only applies at the workspace root, so crates that depend on Platform by git are unaffected. dashpay/rust-dashcore#1224 removed thebase58cksplit upstream. Once Platform bumps past it, the patch shrinks tobitcoin-internalsalone; #5648 tracks that.How Has This Been Tested?
Cargo 1.98.1 (the pinned toolchain), on
v5.1-deva317e4d:cargo vendor --locked "$(mktemp -d)": fails onv5.1-dev, succeeds on this branch (822 crates).cargo check --locked --workspace --all-targetsandcargo clippy --locked --workspace --all-targets -- -D warnings: pass.cargo test --locked -p dpp --features bls-signatures --lib bls: 22 passed.cargo test --locked -p dpp --features bls-signatures --test bls_compatibility: 9 passed.cargo check --locked -p dpp --no-default-features: passes.cargo test --locked -p dash-sdk --lib should_round_trip_a_wif: passes.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
PR Hygiene ·
c7b0e20/self-reviewedCargo.lock,Cargo.toml) — QuantumExplorer or shumkovdpp(packages/rs-dpp/Cargo.toml,packages/rs-dpp/src/bls/bls_signatures.rs,packages/rs-dpp/tests/bls_compatibility.rs) — QuantumExplorer or shumkovrust-sdk(packages/rs-sdk/src/platform/dashpay/invitation.rs) — lklimek or shumkovWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.