Skip to content

Commit eba63eb

Browse files
build(depends): pin platform_cxx to the SDK-backed dash-platform-cxx 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.
1 parent 09b3dd5 commit eba63eb

5 files changed

Lines changed: 67 additions & 52 deletions

File tree

‎ci/test/00_setup_env_native_platform_gui.sh‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77
export LC_ALL=C.UTF-8
88

9-
# Builds depends with PLATFORM_GUI=1 so mbedtls and the Platform-owned CXX
10-
# binding archive (libdash_platform_cxx.a, built offline from vendored crates)
11-
# are produced, hash-verified and installed into the depends prefix, then
12-
# builds dash-qt against that prefix. The --enable-platform-gui configure flag
13-
# and the platform_* unit-test suites arrive with the Platform client library
14-
# and are added to BITCOIN_CONFIG there; until then this lane proves the
15-
# depends knob end to end and that the enriched prefix stays link-compatible.
16-
# Functional tests are skipped: there is no dashd-only surface to drive.
9+
# Builds depends with PLATFORM_GUI=1 so the Platform-owned CXX binding
10+
# archive (libdash_platform_cxx.a, dash-sdk built offline from vendored
11+
# crates) is produced, hash-verified and installed into the depends prefix,
12+
# then builds dash-qt against that prefix. The --enable-platform-gui configure
13+
# flag and the platform_* unit-test suites arrive with the Platform client
14+
# library and are added to BITCOIN_CONFIG there; until then this lane proves
15+
# the depends knob end to end and that the enriched prefix stays
16+
# link-compatible. Functional tests are skipped: there is no dashd-only
17+
# surface to drive.
1718
export CONTAINER_NAME=ci_native_platform_gui
1819
export HOST=x86_64-pc-linux-gnu
1920
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"

‎depends/packages/mbedtls.mk‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎depends/packages/packages.mk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ natpmp_packages=libnatpmp
2626
multiprocess_packages = libmultiprocess capnp
2727
multiprocess_native_packages = native_libmultiprocess native_capnp
2828

29-
platform_packages = mbedtls rust_stdlib tenderdash_sources platform_cxx
29+
platform_packages = rust_stdlib tenderdash_sources platform_cxx
3030
platform_native_packages = native_protobuf native_rust
3131

3232
usdt_linux_packages=systemtap

‎depends/packages/platform_cxx.mk‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
package=platform_cxx
6-
$(package)_version=df4fdb68559ef57d50624b7f0841594aef8647e5
6+
$(package)_version=d72b4d5159da3c98417a5249ffdd8273b5f7fc6f
77
$(package)_download_path=https://github.com/dashpay/platform/archive
88
$(package)_download_file=$($(package)_version).tar.gz
99
$(package)_file_name=platform-$($(package)_version).tar.gz
10-
$(package)_sha256_hash=935b64a4f3acf48840706d573acc4c43ce4ac44272265ea96af45e35c47d829a
11-
$(package)_build_subdir=packages/rs-platform-cxx/standalone
10+
$(package)_sha256_hash=5733e9d53765b2e00490409442b96d984341439e05e15ca62429a0ceee1e3bc1
1211
$(package)_dependencies=native_rust rust_stdlib native_protobuf tenderdash_sources
1312
$(package)_patches=cargo-config.toml rustc-linker.sh
1413
$(package)_vendored_file_name=platform-cxx-$($(package)_version)-vendored.tar.gz
15-
$(package)_cargo_manifest=packages/rs-platform-cxx/standalone/Cargo.toml
16-
$(package)_cargo_lock_path=packages/rs-platform-cxx/standalone/Cargo.lock
14+
$(package)_cargo_manifest=Cargo.toml
15+
$(package)_cargo_lock_path=Cargo.lock
1716

1817
define $(package)_preprocess_cmds
1918
true
@@ -26,12 +25,14 @@ define $(package)_build_cmds
2625
CARGO_TARGET_DIR=$($(package)_build_dir)/target \
2726
PROTOC=$(build_prefix)/bin/protoc \
2827
PROTOC_INCLUDE=$(build_prefix)/include \
29-
$($(package)_cargo) build --locked --offline --release --target $(rust_stdlib_target)
28+
$($(package)_cargo) build --locked --offline --release --target $(rust_stdlib_target) -p dash-platform-cxx
3029
endef
3130

31+
# The crate's build.rs stages the generated bridge header, the cxx runtime
32+
# header and signer.h under target/<triple>/release/include; that tree plus
33+
# the static archive is the whole installed interface.
3234
define $(package)_stage_cmds
33-
CARGO_BUILD_TARGET=$(rust_stdlib_target) \
34-
CARGO_PROFILE=release \
35-
CARGO_TARGET_DIR=$($(package)_build_dir)/target \
36-
bash ../install.sh $($(package)_staging_prefix_dir)
35+
mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib && \
36+
cp -R target/$(rust_stdlib_target)/release/include/. $($(package)_staging_prefix_dir)/include/ && \
37+
cp target/$(rust_stdlib_target)/release/libdash_platform_cxx.a $($(package)_staging_prefix_dir)/lib/
3738
endef
Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,70 @@
11
[source.crates-io]
22
replace-with = "vendored-sources"
33

4-
[source.vendored-sources]
5-
directory = "vendored"
4+
[source."git+https://github.com/QuantumExplorer/rust-rocksdb.git?rev=52772eea7bcd214d1d07d80aa538b1d24e5015b7"]
5+
git = "https://github.com/QuantumExplorer/rust-rocksdb.git"
6+
rev = "52772eea7bcd214d1d07d80aa538b1d24e5015b7"
7+
replace-with = "vendored-sources"
68

79
[source."git+https://github.com/dashpay/agora-blsful?rev=0c34a7a488a0bd1c9a9a2196e793b303ad35c900"]
810
git = "https://github.com/dashpay/agora-blsful"
911
rev = "0c34a7a488a0bd1c9a9a2196e793b303ad35c900"
1012
replace-with = "vendored-sources"
1113

12-
[source."git+https://github.com/dashpay/grovedb?rev=a2791bbdca756d6a6113024aec48f09f7a33faa9"]
14+
[source."git+https://github.com/dashpay/bls-signatures?rev=0842b17583888e8f46c252a4ee84cdfd58e0546f"]
15+
git = "https://github.com/dashpay/bls-signatures"
16+
rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f"
17+
replace-with = "vendored-sources"
18+
19+
[source."git+https://github.com/dashpay/grovedb?rev=6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e"]
1320
git = "https://github.com/dashpay/grovedb"
14-
rev = "a2791bbdca756d6a6113024aec48f09f7a33faa9"
21+
rev = "6fc7e1e82de27a56c3428c0d5dd15b5f6a0ea23e"
22+
replace-with = "vendored-sources"
23+
24+
[source."git+https://github.com/dashpay/jsonschema-rs?branch=configure_regexp"]
25+
git = "https://github.com/dashpay/jsonschema-rs"
26+
branch = "configure_regexp"
27+
replace-with = "vendored-sources"
28+
29+
[source."git+https://github.com/dashpay/orchard.git?tag=dashified-0.14.1"]
30+
git = "https://github.com/dashpay/orchard.git"
31+
tag = "dashified-0.14.1"
32+
replace-with = "vendored-sources"
33+
34+
[source."git+https://github.com/dashpay/rs-bip37-bloom-filter?branch=develop"]
35+
git = "https://github.com/dashpay/rs-bip37-bloom-filter"
36+
branch = "develop"
1537
replace-with = "vendored-sources"
1638

1739
[source."git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.5.1"]
1840
git = "https://github.com/dashpay/rs-tenderdash-abci"
1941
tag = "v1.5.1"
2042
replace-with = "vendored-sources"
2143

22-
[source."git+https://github.com/dashpay/rust-dashcore?rev=173ffac0fdc0c73dda0626cf385bbcfcf2437aeb"]
44+
[source."git+https://github.com/dashpay/rust-dashcore?rev=93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd"]
2345
git = "https://github.com/dashpay/rust-dashcore"
24-
rev = "173ffac0fdc0c73dda0626cf385bbcfcf2437aeb"
46+
rev = "93260bf39bac5d9d09e89bfb45e9ea3ff7fdcbcd"
47+
replace-with = "vendored-sources"
48+
49+
[source."git+https://github.com/dashpay/serde-wasm-bindgen?branch=fix/uint8array-to-bytes"]
50+
git = "https://github.com/dashpay/serde-wasm-bindgen"
51+
branch = "fix/uint8array-to-bytes"
2552
replace-with = "vendored-sources"
2653

2754
[source."git+https://github.com/dashpay/vsss-rs?branch=main"]
2855
git = "https://github.com/dashpay/vsss-rs"
2956
branch = "main"
3057
replace-with = "vendored-sources"
58+
59+
[source."git+https://github.com/dashpay/zcash_note_encryption?rev=9f7e93d"]
60+
git = "https://github.com/dashpay/zcash_note_encryption"
61+
rev = "9f7e93d"
62+
replace-with = "vendored-sources"
63+
64+
[source."git+https://github.com/gvz/zmq.rs?rev=b0787de310befaedd1f762e3b9bc711612d8137f"]
65+
git = "https://github.com/gvz/zmq.rs"
66+
rev = "b0787de310befaedd1f762e3b9bc711612d8137f"
67+
replace-with = "vendored-sources"
68+
69+
[source.vendored-sources]
70+
directory = "vendored"

0 commit comments

Comments
 (0)