Skip to content

Commit dc4dc8e

Browse files
ci(sdk): test dash-sdk-cxx and guard its trust closure
Add the crate to the Rust package filters and the workspace nextest run, and two steps to the workspace job: fail when a trusted HTTP quorum provider, an HTTP client or OpenSSL enters the crate's normal dependency closure, or when its sources reach for built-in network seeds; and link and run the C++ smoke test from the staged headers and static archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4e4385f commit dc4dc8e

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

‎.github/package-filters/rs-packages-direct.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ dash-platform-queries:
131131
dash-sdk:
132132
- packages/rs-sdk/**
133133

134+
dash-sdk-cxx:
135+
- packages/rs-sdk-cxx/**
136+
134137
rs-sdk-ffi:
135138
- packages/rs-sdk-ffi/**
136139

‎.github/package-filters/rs-packages-no-workflows.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ dash-sdk: &sdk
153153
- *dapi_client
154154
- *drive
155155

156+
dash-sdk-cxx:
157+
- packages/rs-sdk-cxx/**
158+
- *sdk
159+
156160
rs-sdk-ffi: &sdk_ffi
157161
- packages/rs-sdk-ffi/**
158162
- *simple-signer

‎.github/package-filters/rs-packages.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ dash-sdk: &sdk
181181
- *dapi_client
182182
- *drive
183183

184+
dash-sdk-cxx:
185+
- .github/workflows/tests*
186+
- packages/rs-sdk-cxx/**
187+
- *sdk
188+
184189
rs-sdk-ffi: &sdk_ffi
185190
- .github/workflows/tests*
186191
- packages/rs-sdk-ffi/**

‎.github/workflows/tests-rs-workspace.yml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,30 @@ jobs:
269269
done
270270
done
271271
272+
# Dash Core links dash-sdk-cxx as a static archive whose trust anchors
273+
# are its own quorum keys and masternode list: no trusted HTTP
274+
# provider, HTTP client or OpenSSL may enter its closure, and it builds
275+
# its SDK from the embedder's endpoints only.
276+
- name: Check the dash-sdk-cxx trust closure
277+
run: |
278+
closure=$(cargo tree -p dash-sdk-cxx -e normal --prefix none --locked | awk '{print $1}' | sort -u)
279+
for banned in rs-sdk-trusted-context-provider reqwest openssl-sys native-tls; do
280+
if grep -qx "$banned" <<<"$closure"; then
281+
echo "::error::$banned leaked into dash-sdk-cxx's dependency tree"
282+
exit 1
283+
fi
284+
done
285+
if grep -rnE 'new_mainnet|new_testnet|fetch_unproved|dash_network_seeds' \
286+
packages/rs-sdk-cxx/src packages/rs-sdk-cxx/include; then
287+
echo "::error::dash-sdk-cxx must build its SDK from the embedder's endpoints only"
288+
exit 1
289+
fi
290+
291+
# The Rust tests cannot see a broken header layout: link and run the
292+
# C++ side from the staged headers and archive alone.
293+
- name: Link dash-sdk-cxx from C++
294+
run: packages/rs-sdk-cxx/scripts/cxx-smoke.sh
295+
272296
- name: Detect immutable structure changes
273297
if: github.event_name == 'pull_request'
274298
run: |
@@ -455,6 +479,7 @@ jobs:
455479
--package platform-wallet \
456480
--package platform-wallet-storage \
457481
--package rs-sdk-ffi \
482+
--package dash-sdk-cxx \
458483
--package platform-wallet-ffi \
459484
--package rs-dapi-client \
460485
--package platform-serialization \

0 commit comments

Comments
 (0)