Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/package-filters/rs-packages-direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ dash-platform-queries:
dash-sdk:
- packages/rs-sdk/**

dash-platform-cxx:
- packages/rs-platform-cxx/**

rs-sdk-ffi:
- packages/rs-sdk-ffi/**

Expand Down
11 changes: 11 additions & 0 deletions .github/package-filters/rs-packages-no-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ platform-encryption: &platform_encryption
dash-platform-queries: &platform_queries
- packages/dash-platform-queries/**

dash-platform-cxx:
- packages/rs-platform-cxx/**
- *platform_queries
- *context_provider
- *dpp
- *drive
- *dapi_grpc
- packages/rs-drive-proof-verifier/**
- packages/rs-sdk/**
- packages/rs-dapi-client/**

dash-sdk: &sdk
- packages/rs-drive-proof-verifier/**
- packages/rs-sdk/**
Expand Down
12 changes: 12 additions & 0 deletions .github/package-filters/rs-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,18 @@ dash-platform-queries: &platform_queries
- .github/workflows/tests*
- packages/dash-platform-queries/**

dash-platform-cxx:
- .github/workflows/tests*
- packages/rs-platform-cxx/**
- *platform_queries
- *context_provider
- *dpp
- *drive
- *dapi_grpc
- packages/rs-drive-proof-verifier/**
- packages/rs-sdk/**
- packages/rs-dapi-client/**

dash-sdk: &sdk
- .github/workflows/tests*
- packages/rs-drive-proof-verifier/**
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests-rs-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ jobs:
done
done

# The C++ embedding surface must link and run from the staged headers
# and archive alone; the Rust tests cannot see a broken header layout.
# (dash-platform-cxx wraps the full dash-sdk, networking included, so it
# is deliberately absent from the transport-free cuts above.)
- name: Link the Platform CXX embedder from C++
run: packages/rs-platform-cxx/scripts/cxx-smoke.sh

- name: Detect immutable structure changes
if: github.event_name == 'pull_request'
run: |
Expand Down Expand Up @@ -342,6 +349,7 @@ jobs:
--package rs-sdk-ffi \
--package platform-wallet-ffi \
--package rs-dapi-client \
--package dash-platform-cxx \
--package platform-serialization \
--package dapi-grpc \
--package json-schema-compatibility-validator \
Expand Down
145 changes: 140 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ members = [
"packages/document-history-contract",
"packages/keyword-search-contract",
"packages/rs-sdk-ffi",
"packages/rs-platform-cxx",
"packages/wasm-drive-verify",
"packages/dash-platform-balance-checker",
"packages/rs-dapi",
Expand Down
10 changes: 6 additions & 4 deletions packages/dash-platform-queries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ downstream code may need to:
Embedders that bring their own transport and trust context and only need the
verification/query layer:

- **Dash Core's platform GUI** — fetches over its own gRPC-Web transport,
serves quorum keys from its locally synced LLMQ state via a
[`ContextProvider`](../rs-context-provider), and verifies every response
proof with [`drive-proof-verifier`](../rs-drive-proof-verifier).
- Block explorers, Electrum-style servers, hardware-wallet tooling — anything
that talks to DAPI its own way but must not trust responses.

Dash Core's platform GUI consumes the full `dash-sdk` instead, through
[`dash-platform-cxx`](../rs-platform-cxx): it serves quorum keys from its
locally synced LLMQ state via a [`ContextProvider`](../rs-context-provider)
and signatures from its wallet, and lets the SDK own transport, retries and
proof verification.

If you want networking, retries, and a managed connection pool, use
`dash-sdk` — it consumes this crate internally.

Expand Down
51 changes: 51 additions & 0 deletions packages/rs-platform-cxx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[package]
name = "dash-platform-cxx"
version.workspace = true
authors = ["Dash Core Group <dev@dash.org>"]
edition = "2021"
rust-version.workspace = true
license = "MIT"
description = "CXX bindings over dash-sdk for C++ embedders that supply their own trust context and signing keys"

[lib]
name = "dash_platform_cxx"
crate-type = ["staticlib", "rlib"]

[features]
default = []
# dash-sdk's mock transport, for tests that replay canned proved responses
# through the same client code an embedder runs. Never enabled by embedders.
mocks = ["dash-sdk/mocks"]

[dependencies]
cxx = "1.0"
dash-sdk = { path = "../rs-sdk", default-features = false, features = [
"dpns-contract",
"dashpay-contract",
] }
dash-context-provider = { path = "../rs-context-provider", default-features = false }
dash-platform-queries = { path = "../dash-platform-queries", default-features = false }
dpp = { path = "../rs-dpp", default-features = false, features = [
"state-transitions",
"state-transition-signing",
"state-transition-validation",
"identity-serialization",
"identity-hashing",
"bls-signatures",
"dpns-contract",
"dashpay-contract",
] }
drive = { path = "../rs-drive", default-features = false, features = ["verify"] }
platform-version = { path = "../rs-platform-version" }
tokio = { version = "1.40", features = ["rt-multi-thread", "net", "time"] }
hex = "0.4"
futures = "0.3"
async-trait = "0.1"

[build-dependencies]
cxx-build = "1.0"

[dev-dependencies]
dash-platform-cxx = { path = ".", features = ["mocks"] }
serde_json = "1"
serde = { version = "1", features = ["derive"] }
Loading
Loading