guix: support PLATFORM_GUI=1 release builds - #7628
Draft
PastaPastaPasta wants to merge 9 commits into
Draft
Conversation
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 a vendor-<package>-crates target and extracts the archive before building, so cargo builds run locked and fully offline.
…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.
libdash_platform.a is a DAPI client for the Dash Platform GUI: a gRPC-Web-over-TLS transport on mbedtls with per-query endpoint pinning and scoped freshness, GroveDB drive queries whose proofs verify through the Platform-owned CXX bridge bound to the quorum-signed root, DPP identity/document decoding and state-transition construction where the signable bytes are the broadcast bytes, and versioned serialization for DashPay's per-wallet records. The new --enable-platform-gui configure flag requires the GUI and wallet, autodetects mbedtls and link-tests the Platform CXX archive from depends. Nothing outside the flag changes: dashd and default builds do not compile or link any of this.
Unit suites for the transport (dechunking, retry, freshness), DPP and drive layers run against Rust-generated fixed vectors: GroveDB proofs (keys, ranges, subqueries, absence, references, sum trees), DPP identities and state transitions, drive queries and quorum signatures. platformkeys_tests gains Platform record round-trip and payment-cursor coverage, and a fuzz target exercises the bridge's decode and verify entry points.
…lane The lane introduced with the depends knob now passes --enable-platform-gui to configure, so the platform unit suites run in CI.
createAssetLockTransaction builds and funds an asset lock paying credits to a Platform funding key, at the payload version consensus accepts: version 2 is invalid until the v24 hard fork applies to the next block, and version 1 stays valid after activation, so a transaction built at the boundary is safe either way. CommitTransaction gains an optional broadcast_error out-parameter and a matching interfaces::Wallet::commitTransaction overload: a mempool rejection is reported to the caller instead of only the log, while the transaction stays committed to the wallet so the caller may abandon it. Both seams are wallet-type-agnostic and compiled unconditionally.
Adds the DashPay tab behind --enable-platform-gui: username registration (asset lock, identity registration and DPNS preorder/domain as a crash-recoverable state machine), a profile dialog, contacts with encrypted DIP-15 xpub exchange and private receiving-chain import, send-to-username contact payments with per-contact payment cursors, and seed-only recovery that rediscovers identities, contacts and payment cursors from Platform and wallet history. The tab requires a descriptor wallet: legacy wallets get a migrate prompt and cannot reach any Platform flow or spend. The Send dialog's temporarily-unavailable distinction is guarded under ENABLE_PLATFORM_GUI so default builds keep their exact error behavior.
Guix builds accept a PLATFORM_GUI knob: guix-build prefetches the Rust standard libraries and the platform_cxx vendored-crates archive outside the offline container (they are host-independent and need network and git access), and passes the knob through to the containerized depends build. The manifest gains patchelf and zlib for the prebuilt Rust toolchain and lbzip2 for bzip2 depends archives. The Guix workflow gains workflow_dispatch with host and platform_gui inputs so a single-host Platform build can be exercised on demand; scheduled and tag builds are unchanged and never set the knob.
Open
18 tasks
|
Guix Automation has failed due to the HEAD commit not being signed by an authorized core-team member. Please rebase and sign or push a new empty signed commit to allow Guix build to happen. |
|
This pull request has conflicts, please rebase. |
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
Final PR of the DashPay series (stacked on #7623 → #7626 → #7627; tracking: #7512). Makes Guix release builds able to produce
--enable-platform-guibinaries.What was done?
guix-buildprefetches the Rust standard libraries and theplatform_cxxvendored-crates archive outside the offline build container (host-independent, need network/git), and passesPLATFORM_GUI=1through to the containerized depends build.patchelf+zlib(prebuilt Rust toolchain interpreter fix) andlbzip2(bzip2 depends archives).workflow_dispatchwithhostsandplatform_guiinputs so a single-host Platform build can be exercised on demand. Scheduled and tag builds are unchanged and never set the knob — release binaries only include the Platform GUI when explicitly requested.How Has This Been Tested?
PLATFORM_GUI=1Guix run against this exact series is queued and its result will be posted here before undraft. Until then treat this PR as the mechanism, not a proven artifact.Breaking Changes
None. Default Guix builds (schedule, tags,
guix-buildlabel) are byte-for-byte unaffected — the knob defaults to off everywhere.Checklist: