Skip to content

Commit 086fdd5

Browse files
Merge origin/v4.2-dev: renumber the conflict verdicts to 47/48
Merged #4451 claimed code 42 (ErrorMasternodeWithdrawalUnconfirmed) and #4465 claimed 46 while this PR was open, and open #4313 reserves 43-45, so the registry frontier is 47: ErrorAssetLockInputConflict moves 42→47 and ErrorAssetLockInputContested 43→48 across Rust, Swift, and Kotlin (values, mapping arms, pin tests, and every numeric doc mention). Both sides' additive arms are kept in the FFI From impl, the shielded funding-result wrapper (and its test, under the base's broader name), the Kotlin error hierarchy, and the recovery tests module. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 parents 8b65c41 + 04acc42 commit 086fdd5

846 files changed

Lines changed: 94605 additions & 8998 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actionlint.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Custom labels carried by this repo's self-hosted runners. Without this,
2-
# actionlint flags `runs-on: [self-hosted, rust-ci]` as an unknown label
2+
# actionlint flags `runs-on: [self-hosted, <label>]` as an unknown label
33
# because it can't resolve it against the GitHub-hosted runner names.
44
#
55
# `rust-ci` must be applied to every runner allowed to take the Rust workspace
6-
# test job (Settings -> Actions -> Runners -> <runner> -> Labels).
6+
# test job, and `kotlin-ci` to every runner allowed to take the Kotlin SDK job
7+
# (Settings -> Actions -> Runners -> <runner> -> Labels).
78
self-hosted-runner:
89
labels:
910
- rust-ci
11+
- kotlin-ci

.github/actions/rust/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ runs:
123123
shell: bash
124124
if: runner.os == 'Linux'
125125
run: |
126-
sudo apt update -qq
126+
sudo apt update
127127
# snappy is required by rust rocksdb
128128
sudo apt install -qq --yes clang llvm libsnappy-dev
129129
sudo update-alternatives --set cc /usr/bin/clang

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ rs-dapi-client:
115115
platform-encryption:
116116
- packages/rs-platform-encryption/**
117117

118+
dash-platform-queries:
119+
- packages/dash-platform-queries/**
120+
118121
dash-sdk:
119122
- packages/rs-sdk/**
120123

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ rs-dapi-client: &dapi_client
127127
platform-encryption: &platform_encryption
128128
- packages/rs-platform-encryption/**
129129

130+
dash-platform-queries: &platform_queries
131+
- packages/dash-platform-queries/**
132+
130133
dash-sdk: &sdk
131134
- packages/rs-drive-proof-verifier/**
132135
- packages/rs-sdk/**
136+
- *platform_queries
133137
- *dash_async
134138
- *context_provider
135139
- *sdk_trusted_context_provider

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,15 @@ platform-encryption: &platform_encryption
151151
- .github/workflows/tests*
152152
- packages/rs-platform-encryption/**
153153

154+
dash-platform-queries: &platform_queries
155+
- .github/workflows/tests*
156+
- packages/dash-platform-queries/**
157+
154158
dash-sdk: &sdk
155159
- .github/workflows/tests*
156160
- packages/rs-drive-proof-verifier/**
157161
- packages/rs-sdk/**
162+
- *platform_queries
158163
- *dash_async
159164
- *context_provider
160165
- *sdk_trusted_context_provider

.github/workflows/book-preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
retention-days: 30
4343

4444
- name: Post preview link
45+
# Fork PRs run with a read-only token that cannot post comments
46+
if: github.event.pull_request.head.repo.full_name == github.repository
4547
uses: actions/github-script@v7
4648
with:
4749
script: |

.github/workflows/kotlin-sdk-build.yml

Lines changed: 67 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -24,52 +24,65 @@ on:
2424
- 'scripts/tests/**'
2525
- '.github/workflows/kotlin-sdk-build.yml'
2626

27+
permissions:
28+
contents: read
29+
2730
concurrency:
2831
group: kotlin-sdk-${{ github.workflow }}-${{ github.head_ref || github.ref }}
2932
cancel-in-progress: true
3033

3134
jobs:
3235
kotlin-sdk-build:
3336
name: Kotlin SDK build + tests (x86_64 emulator)
34-
runs-on: ubuntu-latest
37+
runs-on: [self-hosted, kotlin-ci]
38+
# Fork PRs must not execute on a persistent runner. Keep this guard in sync
39+
# with tests-rs-workspace.yml.
40+
if: >-
41+
github.event_name != 'pull_request'
42+
|| github.event.pull_request.head.repo.full_name == github.repository
43+
|| github.event.pull_request.head.repo.owner.login == 'thepastaclaw'
3544
timeout-minutes: 120
3645

3746
steps:
3847
- name: Checkout repository
3948
uses: actions/checkout@v4
49+
with:
50+
# Preserve target/ and other untracked build outputs between runs.
51+
clean: false
52+
53+
- name: Ensure runner dependencies
54+
run: |
55+
set -euo pipefail
56+
57+
MISSING=()
58+
for pkg in build-essential cmake curl jq libgmp-dev libpulse0 libssl-dev libx11-xcb1 pkg-config python3 unzip zip; do
59+
dpkg -s "$pkg" >/dev/null 2>&1 || MISSING+=("$pkg")
60+
done
61+
if [ ${#MISSING[@]} -gt 0 ]; then
62+
echo "Installing: ${MISSING[*]}"
63+
sudo apt-get update -qq
64+
sudo apt-get install -qq --yes "${MISSING[@]}"
65+
fi
66+
67+
if [ ! -x "$HOME/.cargo/bin/rustup" ]; then
68+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
69+
| sh -s -- -y --no-modify-path --default-toolchain none
70+
fi
71+
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
4072
4173
- name: Validate executable SDK parity manifest
4274
run: |
4375
python3 scripts/check_sdk_parity_manifest.py
4476
python3 -m unittest discover -s scripts/tests -p 'test_*.py'
4577
46-
- name: Free disk space
78+
- name: Verify JDK 17
4779
run: |
48-
# The API-35 x86_64 system image + the shielded .so's cargo target
49-
# dir (halo2/Orchard) + gradle outputs overflow the ~21 GB free on
50-
# the runner root fs, surfacing as "No space left on device" during
51-
# system-image install (the emulator then never boots). Reclaim the
52-
# large preinstalled toolchains we don't use before building. None of
53-
# these are needed by this job (JDK via setup-java, Android SDK via
54-
# setup-android, Rust via rustup, NDK reinstalled below).
55-
echo "Before:"; df -h /
56-
sudo rm -rf \
57-
/usr/share/dotnet \
58-
/usr/local/.ghcup \
59-
/opt/ghc \
60-
/opt/hostedtoolcache/CodeQL \
61-
/usr/local/lib/android/sdk/ndk \
62-
/usr/local/share/powershell \
63-
/usr/share/swift \
64-
/opt/microsoft 2>/dev/null || true
65-
sudo docker image prune --all --force 2>/dev/null || true
66-
echo "After:"; df -h /
67-
68-
- name: Set up JDK 17
69-
uses: actions/setup-java@v4
70-
with:
71-
distribution: temurin
72-
java-version: '17'
80+
JAVA_HOME_RESOLVED=$(dirname "$(dirname "$(readlink -f "$(command -v java)")")")
81+
JAVA_VERSION_OUTPUT=$("$JAVA_HOME_RESOLVED/bin/java" -version 2>&1)
82+
printf '%s\n' "$JAVA_VERSION_OUTPUT"
83+
printf '%s\n' "$JAVA_VERSION_OUTPUT" | grep -Eq 'version "17([.]|\")'
84+
echo "JAVA_HOME=$JAVA_HOME_RESOLVED" >> "$GITHUB_ENV"
85+
echo "$JAVA_HOME_RESOLVED/bin" >> "$GITHUB_PATH"
7386
7487
- name: Set up Android SDK
7588
uses: android-actions/setup-android@v3
@@ -85,25 +98,30 @@ jobs:
8598
with:
8699
targets: x86_64-linux-android
87100

88-
- name: Restore cargo cache
89-
uses: actions/cache@v4
90-
with:
91-
path: |
92-
~/.cargo/registry
93-
~/.cargo/git
94-
target
95-
key: kotlin-sdk-cargo-${{ hashFiles('**/Cargo.lock') }}
96-
restore-keys: |
97-
kotlin-sdk-cargo-
98-
99-
- name: Install cargo-ndk
100-
run: cargo install cargo-ndk --locked
101-
102-
- name: Install protoc v32.0 (repo-standard; apt's 3.21 breaks tenderdash-proto)
101+
# Pinned: this runner is persistent, so an unpinned `cargo install`
102+
# leaves whatever version happened to be current on the day it first ran,
103+
# and every later job silently builds with it. Assert after installing so
104+
# a drifted host fails here instead of somewhere in the NDK build.
105+
- name: Ensure cargo-ndk v4.1.2 is installed
106+
run: |
107+
set -euo pipefail
108+
if ! cargo ndk --version 2>/dev/null | grep -qx 'cargo-ndk 4.1.2'; then
109+
cargo install cargo-ndk --version 4.1.2 --locked --force
110+
fi
111+
cargo ndk --version
112+
cargo ndk --version | grep -qx 'cargo-ndk 4.1.2'
113+
114+
- name: Ensure protoc v32.0 is installed (repo-standard; apt's 3.21 breaks tenderdash-proto)
103115
run: |
104-
curl -fsSL -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-x86_64.zip
105-
sudo unzip -o /tmp/protoc.zip -d /usr/local 'bin/protoc' 'include/*'
116+
set -euo pipefail
117+
if ! protoc --version 2>/dev/null | grep -qx 'libprotoc 32.0'; then
118+
curl -fsSL -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-x86_64.zip
119+
sudo unzip -o /tmp/protoc.zip -d /usr/local 'bin/protoc' 'include/*'
120+
fi
106121
protoc --version
122+
# A stale protoc earlier on PATH would shadow the one just unpacked
123+
# into /usr/local; catch that here rather than in a codegen failure.
124+
protoc --version | grep -qx 'libprotoc 32.0'
107125
108126
- name: Build native library (x86_64, dev profile)
109127
working-directory: packages/kotlin-sdk
@@ -126,12 +144,12 @@ jobs:
126144
working-directory: packages/kotlin-sdk
127145
run: ./gradlew :sdk:compileDebugAndroidTestKotlin --stacktrace
128146

129-
- name: Enable KVM for emulator
147+
- name: Verify KVM access
130148
run: |
131-
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
132-
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
133-
sudo udevadm control --reload-rules
134-
sudo udevadm trigger --name-match=kvm
149+
test -c /dev/kvm
150+
test -r /dev/kvm
151+
test -w /dev/kvm
152+
ls -l /dev/kvm
135153
136154
- name: Run instrumented FFI smoke test (API 35 emulator)
137155
uses: reactivecircus/android-emulator-runner@v2

.github/workflows/release-swift-sdk.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ jobs:
127127
uses: arduino/setup-protoc@v3
128128
with:
129129
version: '32.x'
130+
# Without a token the action resolves the protoc release
131+
# unauthenticated, and the shared macOS-runner egress IP burns
132+
# through the 60 req/h anonymous limit.
133+
repo-token: ${{ secrets.GITHUB_TOKEN }}
130134

131135
- name: Build DashSDKFFI.xcframework and install into Swift package
132136
run: |

.github/workflows/tests-rs-nightly-long-running.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
package:
24-
[dash-sdk, rs-dapi-client, rs-dapi, dapi-grpc, dpp, drive-abci, drive-proof-verifier]
24+
[
25+
dash-sdk,
26+
rs-dapi-client,
27+
rs-dapi,
28+
dapi-grpc,
29+
dpp,
30+
drive-abci,
31+
drive-proof-verifier,
32+
dash-platform-queries,
33+
]
2534
steps:
2635
- name: Check out repo
2736
uses: actions/checkout@v4

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

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,29 @@ jobs:
193193
cargo install cargo-machete 2>/dev/null || true
194194
cargo machete
195195
196-
# The transport-free cut is how embedders with their own networking
196+
# The transport-free cuts are how embedders with their own networking
197197
# (Dash Core's platform GUI, explorers) consume verification: feature
198-
# unification hides transport regressions in whole-workspace builds, so
199-
# check the standalone graphs and assert the networking stack stays out
200-
# of the proof-verification tree (native) and out of wasm builds.
201-
- name: Check transport-free feature cut
198+
# unification hides regressions in whole-workspace builds, so check the
199+
# standalone graphs and assert the networking stack stays out of the
200+
# proof-verification tree (native) and out of wasm builds.
201+
- name: Check transport-free feature cuts
202202
run: |
203203
cargo check -p dapi-grpc --no-default-features --features core,platform,client --locked
204204
cargo check -p drive-proof-verifier --locked
205-
for banned in hyper rustls tower; do
206-
if cargo tree -p drive-proof-verifier -e normal -i "$banned" 2>/dev/null | grep -q .; then
207-
echo "::error::$banned leaked into drive-proof-verifier's dependency tree"
208-
exit 1
209-
fi
205+
cargo check -p dash-platform-queries --locked
206+
# Native graphs: assert the networking transport stack stays out.
207+
# `tonic` itself is present (dapi-grpc's generated client types) but
208+
# without its transport feature — which is exactly what the absence
209+
# of hyper/rustls/tower proves. tokio is deliberately NOT asserted
210+
# absent: dash-context-provider depends on dash-async, which uses it
211+
# on native targets, and that edge predates the queries-crate split.
212+
for native_package in drive-proof-verifier dash-platform-queries; do
213+
for banned in hyper rustls tower; do
214+
if cargo tree -p "$native_package" -e normal -i "$banned" 2>/dev/null | grep -q .; then
215+
echo "::error::$banned leaked into $native_package's dependency tree"
216+
exit 1
217+
fi
218+
done
210219
done
211220
for banned in hyper rustls tower mio; do
212221
for wasm_package in dash-sdk wasm-sdk; do

0 commit comments

Comments
 (0)