build: pin platform_cxx to the SDK-backed dash-platform-cxx crate - #7669
Draft
PastaPastaPasta wants to merge 7 commits into
Draft
build: pin platform_cxx to the SDK-backed dash-platform-cxx crate#7669PastaPastaPasta wants to merge 7 commits into
PastaPastaPasta wants to merge 7 commits into
Conversation
This was referenced Sep 8, 2026
native_rust installs the pinned prebuilt Rust toolchain as a native package and rust_stdlib provides the precompiled standard library for every supported cross target; contrib/devtools/update-rust-hashes.py maintains both pins together. funcs.mk gains a cargo environment wired to the depends cross toolchain and a per-package crate-vendoring template: any package that declares a vendored archive name and a cargo manifest gets its vendored-crate archive modeled as a real make target, created by cargo vendor when absent and required by the package's preprocess stamp and by make download, so a clean build can never reach the offline cargo build without vendored sources. Preprocessing extracts the archive and generates a rustc linker wrapper that preserves the full configured compiler command (target and sysroot flags, and any env prefix), since -C linker= takes a single executable.
…I knob
PLATFORM_GUI=1 adds mbedtls, native_protobuf, tenderdash_sources and platform_cxx to the package set. platform_cxx builds libdash_platform_cxx.a and its installed headers from a pinned dashpay/platform commit (packages/rs-platform-cxx), offline via the per-package vendored crates. config.site.in exports enable_platform_gui and PLATFORM_CXX_{CFLAGS,LIBS} discovery for the configure flag that arrives with the first C++ consumer.
…lane The new lane builds depends with PLATFORM_GUI=1 (producing and hash-verifying the Platform CXX archive offline from vendored crates), then builds dash-qt against that prefix and runs the unit tests. The cache-sources producer generates and caches the platform-cxx vendored-crates archive, handing it to same-run consumers as an artifact on cache miss. The --enable-platform-gui configure flag is added to this lane's BITCOIN_CONFIG by the Platform client library PR; until then the lane proves the depends knob and prefix link-compatibility. build.yml runs PR validation from the base branch (pull_request_target), so the lane first runs on push CI for this branch and takes effect for PRs after merge.
The all-target rust-std downloader wrote directly to the final source-cache path and treated any existing file as complete, so a partial file left behind by an interrupted download made every subsequent 'make PLATFORM_GUI=1 download' fail on the same archive until it was removed by hand. Verify an existing archive against the pinned hash and re-fetch it when it does not match, downloading to a temp path and only moving a verified archive into place, matching fetch_file_inner.
…ry is missing Inside a Guix environment there are no default loader search paths, so a toolchain staged without libgcc_s/libz next to it is nonfunctional and would be cached in that state. Treat a missing required runtime library as a staging failure there, consistent with the existing fatal patchelf check; outside Guix it remains a warning since the system loader can still resolve the libraries.
The linker wrapper carries a shebang, so the lint-files check requires the executable bit; cargo invokes it through the RUSTFLAGS -C linker= path either way.
PastaPastaPasta
force-pushed
the
feat/platform-sdk-depends
branch
from
September 8, 2026 19:57
dfc6f13 to
cfc50a2
Compare
…crate dashpay/platform#4633 rebuilds the Platform CXX bindings as a thin bridge over dash-sdk: the SDK owns DAPI transport, retries and proof verification, and Core supplies endpoints, quorum keys, its ChainLock height and wallet signatures. The crate is an ordinary workspace member now, so the package vendors from the workspace root (the lockfile made vendorable by dashpay/platform#4631), builds with -p dash-platform-cxx, and installs the header tree the crate's build.rs stages plus the static archive; the nested standalone manifest and install.sh are gone with the old design. mbedtls leaves depends: the SDK carries its own TLS stack (rustls with the system trust store), so Core no longer links a TLS library for Platform. The vendoring config gains the workspace's git sources. Validated on aarch64-apple-darwin: make -C depends PLATFORM_GUI=1 platform_cxx vendors 840 crates (150 MB archive) and builds the crate offline in 3 minutes; the staged prefix carries include/dash/platform/{ffi.h,signer.h}, include/rust/cxx.h and lib/libdash_platform_cxx.a. The knob-off package set is unchanged.
PastaPastaPasta
force-pushed
the
feat/platform-sdk-depends
branch
from
September 8, 2026 21:20
cfc50a2 to
bece665
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Stacked on #7623 (its five commits come first; review the last commit only). Refreshes the
platform_cxxpin #7623's description promised before merge, to the SDK-backed rebuild of the Platform CXX bindings: dashpay/platform#4633 (stacked on dashpay/platform#4631 and #4632). Tracking: #7512.The maintainers' direction on the Platform side was to use the SDK rather than keep a transport-free verifier fed by a C++ transport. The measured evidence before adopting it: the full
dash-sdktype-checks for every Rust target inrust_stdlib.mkplusriscv64gc-unknown-linux-gnu; a release-built C++ driver verified every query the GUI makes against live testnet through the crate (proof-verified against quorum keys exported from a synced node, corrupted keys rejected at the BLS check); a statically linkedx86_64-unknown-linux-muslbuild of that driver ran under emulation with identical results. The dependency graph grows from 281 to 337 crates; macOS linksSecurity+CoreFoundation(rustls reads the system trust store), Windowsws2_32 bcrypt crypt32 userenv ntdll, all withinsymbol-check.py's allowlists.What was done?
platform_cxx.mkpins dashpay/platformb283a5f71644(the Merge #16557: [wallet] restore coinbase and confirmed/conflicted checks in SubmitMemoryPoolAndRelay() #4633 head, restacked on the amended refactor: numerous refactoring throughout llmq/ folder #4631) and, because the crate is an ordinary workspace member now, vendors from the workspace root, builds with-p dash-platform-cxx, and installs the header tree the crate'sbuild.rsstages plus the static archive. The nested standalone manifest andinstall.share gone with the old design.mbedtlsleaves depends: the SDK carries its own TLS stack, so Core no longer links a TLS library for Platform.cargo-config.tomlgains the workspace's 13 git sources; build: make the workspace lockfile vendorable with --locked platform#4631 is what makescargo vendor --lockedsucceed on that workspace.How Has This Been Tested?
make -C depends PLATFORM_GUI=1 platform_cxxonaarch64-apple-darwin: vendors 840 crates (150 MB archive), builds the crate offline in 3 minutes, stagesinclude/dash/platform/{ffi.h,signer.h},include/rust/cxx.handlib/libdash_platform_cxx.a.make -C depends print-packages).PLATFORM_GUI=1at this pin (the earlier two-builder reproducibility result atc9d6fbd459d9covered the transport-free archive; the SDK archive is unknown until guix: support PLATFORM_GUI=1 release builds #7672's Guix run).Breaking Changes
None. Everything is behind
PLATFORM_GUI=1, which nothing sets by default.Checklist: