feat(qt): back Dash Platform GUI internals with real grovedb/drive/dpp crates - #67
feat(qt): back Dash Platform GUI internals with real grovedb/drive/dpp crates#67PastaPastaPasta wants to merge 265 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 284 files, which is 184 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (284)
You can disable this status message by setting the 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 |
bd04fed to
d7ad8ad
Compare
The conflict occurs due a difference in glibc version between the Guix environment and the targets compiled, this is only a problem for Linux targets so the issue doesn't extend to Windows
…ging Merging per-crate staticlibs with 'ar -x' into a flat directory silently drops object files once member basenames collide, which happens as soon as two crates share dependencies (measured: 373 of 374 members collide between two crates built from one workspace). Replace the merge with an umbrella staticlib crate, rust/dashrust, that depends on each component as an rlib: cargo deduplicates shared dependencies, applies LTO across the whole graph, and emits a single archive. Component crates keep their own cxx bridges and codegen; per-crate Makefile includes now contribute only cxxbridge artifacts. Optional components become cargo features on the umbrella crate, plumbed from configure via RUST_CRATE_FEATURES. Per-crate dist-hook recipes are replaced by an aggregate dist-hook so additional crates do not collide on automake's one-recipe-per-Makefile rule.
The dashpay/platform v4.1.0 workspace declares rust-version 1.92; rustc 1.85.1 refuses nine of its crates by name. Hashes regenerated with contrib/devtools/update-rust-hashes.py. cxx/cxxbridge stay at 1.0.192, which compiles unchanged under 1.92.
The offline cargo configuration was generated into the source tree, which pollutes srcdir and races when multiple out-of-tree builds for different hosts share one checkout. Cargo discovers .cargo/config.toml by walking up from its invocation directory, so a config under the build tree's root works for both in-tree and out-of-tree builds.
cargo vendor handles git dependencies, but consuming the vendor directory offline requires per-git-source replacement stanzas in .cargo/config.toml, which the build system previously did not generate (only crates.io was redirected). Derive the stanzas deterministically from Cargo.lock with contrib/devtools/cargo-vendor-git-sources.sh — output verified byte-identical to what cargo vendor itself prints — and append them when generating the offline config. Git dependencies are unavoidable for upcoming components: crates.io copies of the dashpay/platform crates are stale or name-squatted.
…d JSON fc892c3 rpc: Fail to return undocumented or misdocumented JSON (MarcoFalke) f4bc4a7 rpc: Add m_skip_type_check to RPCResult (MarcoFalke) Pull request description: This avoids documentation shortcomings such as the ones fixed in commit e7b6272, 138d55e, 577bd51, f8c84e0, 0ee9a00, 13f4185, or faecb2e ACKs for top commit: fanquake: ACK fc892c3 - tested that this catches issue, i.e bitcoin#24691: Tree-SHA512: 9d0d7e6291bfc6f67541a4ff746d374ad8751fefcff6d103d8621c0298b190ab1d209ce96cfc3a0d4a6a5460a9f9bb790eb96027b16e5ff91f2512e40c92ca84 Co-authored-by: fanquake <fanquake@gmail.com>
… JSON-RPC interface Includes 6a1a66c rpc: render Type::ANY in help text instead of aborting RPCResult::Type::ANY triggers NONFATAL_UNREACHABLE() in ToSections(), which crashes the help() RPC when a command uses Type::ANY in a nested result field. Previously this was never hit because Type::ANY was only used as a top-level alternate result type, filtered out before ToSections() is called. getopenrpcinfo() will use this result type, so render it like other types allowing it to be used in nested result definitions like schema. Co-authored-by: will <will@256k1.dev>
(cherry picked from commit a706ccd)
(cherry picked from commit 474a2a6)
(cherry picked from commit 5f4a543)
…-builders base Move all seven dashpay/platform git dependencies from the old feat/transport-free-embedder-core pin (e8e1961fe54f) to rev 2a6dbe39065104981b7f9bb4fbee598aab869fe4, the head of refactor/document-query-decode-builders (PR dashpay/platform#4389) whose content is the rebased equivalent on the current v4.2-dev base. No FFI-visible API drift: the crate builds unchanged and all 31 rust/platform tests pass against the new revision. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follow-up to the wallet-seams signature adaptation: the DashPay flow hardening commit routes both the send and accept paths through prepareReceivingKeychain, so the creation_time bound must be threaded through it. The accept path forwards the contact request document's created_at; the send path passes 0 (unknown) since it may re-run for a friendship first established before this session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ENABLE_PLATFORM_GUI block linking libdash_platform.a and mbedtls into test_dash was lost while re-expressing the Rust link gating on the optional-rust-components base; the platform unit tests reference the client library directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Thread PLATFORM_GUI through the Guix pipeline: the host-side pre-download now fetches the Rust standard libraries and vendored crates (network and git are unavailable inside the build container), the flag survives the --pure environment whitelist, and the in-container depends invocation enables the Platform packages. Default Guix builds are unchanged; the flag is opt-in via the environment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extract the identity flow's persisted record and the contact payment
cursor encoding into src/platform/walletrecords.{h,cpp} so they are
shared with the recovery orchestrator and unit-testable without Qt. Add
IdentityFlow::reload() for externally synthesized records, let a
recovered identity without a username (IDENTITY_CONFIRMED, empty label)
wait for the user and register just the name from its existing credits,
and let PlatformRecovery reuse ContactFlow's request crypto.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PlatformRecovery probes getIdentityByPublicKeyHash over MASTER auth keys (gap limit 5, three-way found/proven-absent/unanswered tally so a network outage is never read as 'no identity'), synthesizes the identity/0 record from namesOfIdentity (REGISTERED with the proven name, or IDENTITY_CONFIRMED so the GUI offers registration), restores established contacts by decrypting their xpub from the incoming request and re-importing friendship keychains, rebuilds outbound payment cursors from wallet history, and starts a bounded background rescan. Armed from updateNodeContext() once evonode endpoints exist; runs at most once per session and leaves everything retryable when incomplete. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A recovered identity without a username shows a dedicated dashboard state with a 'Choose a username' action, and the wizard starts at name entry with funding-free wording instead of dead-ending on the progress view. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Round-trips the shared identity record serialization (including the nameless shape seed-only recovery synthesizes) and rejects malformed payloads; pins the pure payment-cursor computation and its 4-byte LE record encoding; and rebuilds a cursor end to end from a restored wallet's transaction history via real DIP-15 derivations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The prebuilt rust binaries request /lib/ld-linux-*.so.1 which does not exist inside the guix shell container, so fix-elf-interpreter.sh must patch them. It silently skipped because patchelf was absent from the manifest, leaving cargo unable to exec (ENOENT) when native_cxxbridge built. Add patchelf to the manifest and make the script fail hard when patchelf is missing inside a Guix environment; the patch change also invalidates the stale native_rust depends cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With the interpreter patched, rustc still failed to start inside the guix container because librustc_driver needs libz.so.1 and no zlib is on any runtime search path there. Add zlib to the manifest and extend fix-elf-interpreter.sh to copy libz.so.1 (like libgcc_s.so.1) into the toolchain lib directory resolved via the ORIGIN-based RPATH. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mbedtls ships as a .tar.bz2 and tar delegates to lbzip2 inside the Guix container, which the manifest did not provide; extraction failed with Cannot exec. First bzip2-compressed depends package to enter the Guix path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cargo-compiled build scripts link libgcc_s.so.1 without an RPATH; in the Guix container GUIX_LD_WRAPPER_DISABLE_RPATH is set and the loader has no default search path providing it, so they fail to start. Set LD_LIBRARY_PATH in CARGO_ENV to the rustc sysroot lib directory, where the depends toolchain stages libgcc_s.so.1 and libz.so.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nces libcxxbridge and libdashrust reference each other: C++ bridge wrappers call Rust-implemented externs while Rust code calls generated C++ shims like the WalletSigner one. With a single-pass linker, binaries that never call a bridge's C++ wrappers directly (dashd with the platform bridge) leave the shim object unextracted, and references introduced later by libdashrust fail with undefined platform_ffi cxxbridge symbols. List both archives twice in RUST_COMPONENT_LIBS so a second scan converges. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a workflow_dispatch trigger with a 'hosts' input (default x86_64-linux-gnu) that narrows the build matrix to a single host, and a 'platform_gui' boolean input that passes PLATFORM_GUI=1 into the guix-start invocation so dispatch runs can build the Platform GUI with vendored Rust crates. Also include the native_cxxbridge and top-level Cargo.lock files in the depends-sources cache key so stale source caches do not hide vendored crate changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The upstream slices were rebased after dropping an out-of-scope dapi-grpc doc hunk from dashpay/platform#4388, which moved the head of the stacked dashpay#4389 branch this pin tracks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The upstream query-core series was rebased onto the latest v4.2-dev, which absorbed the new having-range aggregate modules into the extracted crate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follows the upstream re-export of DocumentQuerySdk alongside DocumentQuery and the restack it produced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Picks up the request-binding gate in verify_documents_response (rejects requests the server would not have proved) and the QuerySettings/block-info compatibility restorations upstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Track dashpay/platform refactor/document-query-decode-builders at 3285b1c99bca after its restack; over-cap document query limits now fail as Error::Drive(InvalidLimit) with pre-proof rejection of limits above 100 and out-of-bounds wire versions. No wrapper adaptations needed: the FFI suite passes unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
walletdb.cpp now reads platformkeys::SEED_ID_RECORD to tell seed-pin damage apart from opaque Platform cache damage, closing a wallet/platformseed -> wallet/scriptpubkeyman -> wallet/walletdb include cycle. The cycle exists on the wallet-seams foundation head itself; whitelist it here until the foundation PR breaks it properly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wallet-seams removed the unused label parameter from importFriendshipKeychains; the receiving chain is labeled explicitly through setAddressBook instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
475abf4 to
bd66a25
Compare
Only a malformed reserved platform/seed-id record is fatal wallet corruption: silently dropping it could unpin the Platform seed and let a multi-seed wallet sign under another identity. All other Platform data records are opaque cache/metadata, so a damaged one now follows the wallet's noncritical-record policy instead of preventing the wallet from opening. The reserved record key moves to a shared constant, and walletdb_tests pins both sides of the policy.
GetPlatformSeed accepted any nonempty stored mnemonic, but CMnemonic::ToSeed hashes arbitrary strings, so a corrupt mnemonic record would silently derive an unrelated Platform key universe. Require the phrase to pass BIP39 validation before it can become a seed candidate; an invalid phrase is skipped like an unreadable one, so a pinned wallet fails closed. platformkeys_tests covers both the rejected invalid phrase and the unchanged valid-mnemonic path.
platform#4389 gained DPNS salt-contract docs, pub(crate) narrowing of the singular proto decoders, and aggregate-cap boundary tests. No FFI-surface changes; rust/platform suite passes 31/31 against the new rev.
What this is
The composite reference implementation of Dash Platform usernames, profiles, and DashPay contacts in dash-qt, assembled from the current train foundations (tracked in dashpay#7512). It exists to prove the whole path end-to-end — platform crates, core build, wallet seams, GUI — while the individual train PRs are reviewed and merged. It is an integration branch, not a merge candidate.
Branch structure (bottom-up)
feat/optional-rust-components, headeeb3b915) — opt-in Rust + cxxbridge build foundation, validated-hosts target set, Guix-baseline-proven.dashpay/wallet-seams) — DIP-13/14/15 key provider, opaque platform data records, fail-closed platform-seed pinning, friendship keychain import with preserved descriptor state. Includes the cross-implementation derivation vector against rust-dashcore's key-wallet (mobile parity).rust/platformcxx bridge over canonical Platform crates, Qt identity/username/profile/contacts flows.--enable-platform-guinow layers on the base's--enable-rust(implies it, adds theplatformcrate feature and the mbedtls/tenderdash/protoc depends packages) instead of replacing it. Default builds do zero Rust work; dashd links no Platform code in any configuration.Pinned upstream
rust/platformpins dashpay/platform#4389 head (2a6dbe390651, branchrefactor/document-query-decode-builders, on currentv4.2-dev) — the transport-free embedder series: dapi-grpctransportfeature (dashpay#4344, merged), proof-vector corpus (dashpay#4345, merged),dash-platform-queriessplit (dashpay#4388), wire-request decode + pure DPNS/DashPay builders (dashpay#4389). Zero API drift from the previous pin; includes DashPay contract v2 (dashpay#4380 — optional profile payment-address fields; no changes required to the DIP-15 flows).Validation
rust/platform: 31 crate tests green at the new pin.platformkeys_tests,dip14_tests,platform_client_tests,platform_dpp_tests,platform_drive_tests— 54 cases green; dash-qt links with 941 bridge symbols.Known follow-ups
panic = "unwind"workspace profile now also applies to--enable-rust-only builds (deliberate: cxx converts residual panics into catchable C++ exceptions at the bridge) — called out for review.