diff --git a/.github/workflows/swift-sdk-build.yml b/.github/workflows/swift-sdk-build.yml index dba9b89c615..a32c6de0d3a 100644 --- a/.github/workflows/swift-sdk-build.yml +++ b/.github/workflows/swift-sdk-build.yml @@ -150,10 +150,61 @@ jobs: rustup toolchain install "$TOOLCHAIN" --profile minimal --no-self-update rustup target add --toolchain "$TOOLCHAIN" aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios + - name: Clean previous Rust build artifacts + shell: bash + run: | + set -euxo pipefail + cargo clean || true + RUST_DASHCORE_DIR="$(dirname "$GITHUB_WORKSPACE")/rust-dashcore" + if [ -d "$RUST_DASHCORE_DIR" ]; then + (cd "$RUST_DASHCORE_DIR" && cargo clean || true) + fi + + - name: Build dash-spv-ffi static libs explicitly + shell: bash + run: | + set -euxo pipefail + export IPHONEOS_DEPLOYMENT_TARGET="18.0" + export IPHONESIMULATOR_DEPLOYMENT_TARGET="18.0" + export CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS="${CARGO_TARGET_AARCH64_APPLE_IOS_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}" + export CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS="${CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONESIMULATOR_DEPLOYMENT_TARGET}" + export CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS="${CARGO_TARGET_X86_64_APPLE_IOS_RUSTFLAGS:-} -C link-arg=-mios-version-min=${IPHONESIMULATOR_DEPLOYMENT_TARGET}" + RUST_DASHCORE_DIR="$(dirname "$GITHUB_WORKSPACE")/rust-dashcore" + cd "$RUST_DASHCORE_DIR/dash-spv-ffi" + TOOLCHAIN="${{ steps.dashcore_toolchain.outputs.channel }}" + cargo +"$TOOLCHAIN" build --lib --release --target aarch64-apple-ios + cargo +"$TOOLCHAIN" build --lib --release --target aarch64-apple-ios-sim + cargo +"$TOOLCHAIN" build --lib --release --target x86_64-apple-ios + - name: Build DashSDKFFI.xcframework and install into Swift package run: | bash packages/swift-sdk/build_ios.sh + - name: Collect build logs on failure + if: failure() + shell: bash + run: | + set -euxo pipefail + shopt -s nullglob + LOG_DIR="$RUNNER_TEMP/swift-sdk-build-logs" + mkdir -p "$LOG_DIR" + for path in /tmp/*.log; do + if [ -f "$path" ]; then + cp "$path" "$LOG_DIR/" + fi + done + if [ -d "$HOME/.cargo" ]; then + find "$HOME/.cargo" -name "*.log" -maxdepth 3 -type f -print0 2>/dev/null | xargs -0 -I{} cp "{}" "$LOG_DIR/" || true + fi + find "$GITHUB_WORKSPACE" -maxdepth 4 -name "*.log" -type f -print0 2>/dev/null | xargs -0 -I{} cp "{}" "$LOG_DIR/" || true + + - name: Upload build logs artifact + if: failure() + uses: actions/upload-artifact@v4 + with: + name: swift-sdk-build-logs + path: ${{ runner.temp }}/swift-sdk-build-logs + - name: Zip XCFramework and compute checksum run: | cd packages/swift-sdk diff --git a/Cargo.lock b/Cargo.lock index aa6e91cf47d..1dafca57573 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1386,18 +1386,7 @@ dependencies = [ [[package]] name = "dash-network" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" -dependencies = [ - "bincode 2.0.0-rc.3", - "bincode_derive", - "hex", - "serde", -] - -[[package]] -name = "dash-network" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "bincode 2.0.0-rc.3", "bincode_derive", @@ -1476,38 +1465,7 @@ dependencies = [ [[package]] name = "dash-spv" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" -dependencies = [ - "anyhow", - "async-trait", - "bincode 1.3.3", - "blsful", - "chrono", - "clap", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "hex", - "hickory-resolver", - "indexmap 2.11.4", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "log", - "rand 0.8.5", - "rayon", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tokio-util", - "tracing", - "tracing-appender", - "tracing-subscriber", -] - -[[package]] -name = "dash-spv" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "anyhow", "async-trait", @@ -1515,13 +1473,13 @@ dependencies = [ "blsful", "clap", "crossterm", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "dashcore", + "dashcore_hashes", "hex", "hickory-resolver", "indexmap 2.11.4", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "key-wallet", + "key-wallet-manager", "log", "rand 0.8.5", "serde", @@ -1535,18 +1493,18 @@ dependencies = [ [[package]] name = "dash-spv-ffi" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "cbindgen 0.29.0", "clap", - "dash-spv 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dash-spv", + "dashcore", "env_logger 0.10.2", "futures", "hex", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet", "key-wallet-ffi", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet-manager", "libc", "log", "once_cell", @@ -1554,14 +1512,13 @@ dependencies = [ "serde", "serde_json", "tokio", - "tokio-util", "tracing", ] [[package]] name = "dashcore" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "anyhow", "base64-compat", @@ -1571,9 +1528,9 @@ dependencies = [ "bitvec", "blake3", "blsful", - "dash-network 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dash-network", + "dashcore-private", + "dashcore_hashes", "ed25519-dalek", "hex", "hex_lit", @@ -1584,60 +1541,17 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "dashcore" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" -dependencies = [ - "anyhow", - "base64-compat", - "bech32 0.9.1", - "bincode 2.0.0-rc.3", - "bincode_derive", - "bitvec", - "blake3", - "blsful", - "dash-network 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "hex", - "hex_lit", - "log", - "rustversion", - "secp256k1", - "serde", - "thiserror 2.0.17", -] - [[package]] name = "dashcore-private" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" - -[[package]] -name = "dashcore-private" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" - -[[package]] -name = "dashcore-rpc" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" -dependencies = [ - "dashcore-rpc-json 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "hex", - "jsonrpc", - "log", - "serde", - "serde_json", -] +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" [[package]] name = "dashcore-rpc" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ - "dashcore-rpc-json 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "dashcore-rpc-json", "hex", "jsonrpc", "log", @@ -1648,52 +1562,25 @@ dependencies = [ [[package]] name = "dashcore-rpc-json" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "bincode 2.0.0-rc.3", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dashcore", "hex", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet", "serde", "serde_json", "serde_repr", "serde_with 2.3.3", ] -[[package]] -name = "dashcore-rpc-json" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" -dependencies = [ - "bincode 2.0.0-rc.3", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "hex", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "serde", - "serde_json", - "serde_repr", - "serde_with 2.3.3", -] - -[[package]] -name = "dashcore_hashes" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" -dependencies = [ - "bincode 2.0.0-rc.3", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "rs-x11-hash", - "secp256k1", - "serde", -] - [[package]] name = "dashcore_hashes" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "bincode 2.0.0-rc.3", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "dashcore-private", "rs-x11-hash", "secp256k1", "serde", @@ -1882,9 +1769,9 @@ dependencies = [ "chrono", "chrono-tz", "ciborium", - "dash-spv 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore-rpc 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dash-spv", + "dashcore", + "dashcore-rpc", "data-contracts", "derive_more 1.0.0", "dpp", @@ -1896,8 +1783,8 @@ dependencies = [ "itertools 0.13.0", "json-schema-compatibility-validator", "jsonschema", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet", + "key-wallet-manager", "lazy_static", "log", "nohash-hasher", @@ -3530,20 +3417,19 @@ dependencies = [ [[package]] name = "key-wallet" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "aes", - "async-trait", "base58ck", "bincode 2.0.0-rc.3", "bincode_derive", "bip39", "bitflags 2.9.4", "bs58", - "dash-network 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dash-network", + "dashcore", + "dashcore-private", + "dashcore_hashes", "getrandom 0.2.16", "hex", "hkdf", @@ -3557,43 +3443,17 @@ dependencies = [ "zeroize", ] -[[package]] -name = "key-wallet" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" -dependencies = [ - "base58ck", - "bincode 2.0.0-rc.3", - "bincode_derive", - "bip39", - "bitflags 2.9.4", - "dash-network 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore-private 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "getrandom 0.2.16", - "hex", - "hkdf", - "rand 0.8.5", - "secp256k1", - "serde", - "serde_json", - "sha2", - "tracing", - "zeroize", -] - [[package]] name = "key-wallet-ffi" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "cbindgen 0.29.0", - "dash-network 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dash-network", + "dashcore", "hex", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet", + "key-wallet-manager", "libc", "secp256k1", "tokio", @@ -3602,27 +3462,13 @@ dependencies = [ [[package]] name = "key-wallet-manager" version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd#8f97c4b7599849ba048cdd7ef98276966b71e1fd" -dependencies = [ - "async-trait", - "bincode 2.0.0-rc.3", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "secp256k1", - "zeroize", -] - -[[package]] -name = "key-wallet-manager" -version = "0.40.0" -source = "git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964#e44b1fb2086ad57c8884995f9f93f14de91bf964" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0#c877c1a74d145e2003d549619698511513db925c" dependencies = [ "async-trait", "bincode 2.0.0-rc.3", - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore_hashes 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "dashcore", + "dashcore_hashes", + "key-wallet", "secp256k1", "zeroize", ] @@ -4532,11 +4378,11 @@ dependencies = [ name = "platform-wallet" version = "2.2.0-dev.2" dependencies = [ - "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "dashcore", "dpp", "indexmap 2.11.4", - "key-wallet 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", - "key-wallet-manager 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=8f97c4b7599849ba048cdd7ef98276966b71e1fd)", + "key-wallet", + "key-wallet-manager", "thiserror 1.0.69", ] @@ -5318,8 +5164,8 @@ dependencies = [ "ciborium", "clap", "dapi-grpc", - "dash-spv 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", - "dashcore-rpc 0.40.0 (git+https://github.com/dashpay/rust-dashcore?rev=e44b1fb2086ad57c8884995f9f93f14de91bf964)", + "dash-spv", + "dashcore-rpc", "dotenvy", "dpp", "envy", @@ -7001,18 +6847,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" -dependencies = [ - "crossbeam-channel", - "thiserror 2.0.17", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.30" diff --git a/packages/rs-dapi/Cargo.toml b/packages/rs-dapi/Cargo.toml index 1f83ff8550f..16b3dc3d87e 100644 --- a/packages/rs-dapi/Cargo.toml +++ b/packages/rs-dapi/Cargo.toml @@ -78,15 +78,17 @@ zeromq = { git = "https://github.com/gvz/zmq.rs", rev = "b0787de310befaedd1f762e xxhash-rust = { version = "0.8.15", features = ["xxh3"] } # Dash Platform dependencies (using workspace versions) -dpp = { path = "../rs-dpp", default-features = false, features = ["state-transitions"] } +dpp = { path = "../rs-dpp", default-features = false, features = [ + "state-transitions", +] } dapi-grpc = { path = "../dapi-grpc", features = ["server", "client", "serde"] } quick_cache = "0.6.16" prometheus = "0.14" once_cell = "1.19" # Dash Core RPC client -dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "e44b1fb2086ad57c8884995f9f93f14de91bf964" } -dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "e44b1fb2086ad57c8884995f9f93f14de91bf964" } +dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0" } +dash-spv = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0" } rs-dash-event-bus = { path = "../rs-dash-event-bus" } diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index 2996a20f22b..d6cff6e07ac 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -24,7 +24,7 @@ chrono = { version = "0.4.35", default-features = false, features = [ ] } chrono-tz = { version = "0.8", optional = true } ciborium = { version = "0.2.2", optional = true } -dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", features = [ +dashcore = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", features = [ "std", "secp-recovery", "rand", @@ -32,10 +32,10 @@ dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b759 "serde", "eddsa", ], default-features = false } -key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } -key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } -dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } -dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } +key-wallet = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } +key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } +dash-spv = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } +dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } env_logger = { version = "0.11" } getrandom = { version = "0.2", features = ["js"] } diff --git a/packages/rs-platform-wallet/Cargo.toml b/packages/rs-platform-wallet/Cargo.toml index 3d9a61ac2d3..68714455e2e 100644 --- a/packages/rs-platform-wallet/Cargo.toml +++ b/packages/rs-platform-wallet/Cargo.toml @@ -11,11 +11,11 @@ description = "Platform wallet with identity management support" dpp = { path = "../rs-dpp" } # Key wallet dependencies (from rust-dashcore) -key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd" } -key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } +key-wallet = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0" } +key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } # Core dependencies -dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd" } +dashcore = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0" } # Standard dependencies thiserror = "1.0" diff --git a/packages/rs-platform-wallet/src/lib.rs b/packages/rs-platform-wallet/src/lib.rs index db4805a8ad1..91be47ee6f2 100644 --- a/packages/rs-platform-wallet/src/lib.rs +++ b/packages/rs-platform-wallet/src/lib.rs @@ -97,26 +97,17 @@ impl PlatformWalletInfo { } /// Implement WalletTransactionChecker by delegating to ManagedWalletInfo -#[async_trait] impl WalletTransactionChecker for PlatformWalletInfo { - async fn check_transaction( + fn check_transaction( &mut self, tx: &Transaction, network: Network, context: TransactionContext, - wallet: &mut Wallet, - update_state_with_wallet_if_found: bool, + update_state_with_wallet_if_found: Option<&Wallet>, ) -> TransactionCheckResult { // Delegate to the underlying wallet info self.wallet_info - .check_transaction( - tx, - network, - context, - wallet, - update_state_with_wallet_if_found, - ) - .await + .check_transaction(tx, network, context, update_state_with_wallet_if_found) } } @@ -373,10 +364,6 @@ impl WalletInfoInterface for PlatformWalletInfo { current_block_height, ) } - fn update_chain_height(&mut self, network: Network, current_height: u32) { - self.wallet_info - .update_chain_height(network, current_height) - } } /// Errors that can occur in platform wallet operations diff --git a/packages/rs-sdk-ffi/Cargo.toml b/packages/rs-sdk-ffi/Cargo.toml index 0d5c27d69d9..4a976f90883 100644 --- a/packages/rs-sdk-ffi/Cargo.toml +++ b/packages/rs-sdk-ffi/Cargo.toml @@ -22,7 +22,7 @@ rs-sdk-trusted-context-provider = { path = "../rs-sdk-trusted-context-provider", simple-signer = { path = "../simple-signer" } # Core SDK integration (always included for unified SDK) -dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f97c4b7599849ba048cdd7ef98276966b71e1fd", optional = true } +dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", tag = "v0.40.0", optional = true } # FFI and serialization serde = { version = "1.0", features = ["derive"] } diff --git a/packages/swift-sdk/build_ios.sh b/packages/swift-sdk/build_ios.sh index 84454aa8232..b53da707272 100755 --- a/packages/swift-sdk/build_ios.sh +++ b/packages/swift-sdk/build_ios.sh @@ -33,10 +33,12 @@ rm -rf "$DEST_XCFRAMEWORK_DIR" cp -R "$SRC_XCFRAMEWORK_DIR" "$DEST_XCFRAMEWORK_DIR" # Verify required SPV symbols are present in the binary -LIB_SIM_MAIN="$DEST_XCFRAMEWORK_DIR/ios-arm64-simulator/librs_sdk_ffi.a" -LIB_SIM_SPV="$DEST_XCFRAMEWORK_DIR/ios-arm64-simulator/libdash_spv_ffi.a" -if [[ ! -f "$LIB_SIM_MAIN" ]]; then - echo "❌ Missing simulator library at $LIB_SIM_MAIN" +SIM_LIBS=() +while IFS= read -r -d '' lib; do + SIM_LIBS+=("$lib") +done < <(find "$DEST_XCFRAMEWORK_DIR" -maxdepth 2 -type f -name "*.a" -path "*simulator*" -print0 2>/dev/null || true) +if [[ ${#SIM_LIBS[@]} -eq 0 ]]; then + echo "❌ Missing simulator static libraries inside $DEST_XCFRAMEWORK_DIR (searched for *.a under *simulator* slices)" exit 1 fi echo " - Verifying required SPV symbols are present in XCFramework libs" @@ -49,21 +51,23 @@ else fi CHECK_OK=1 -if nm -gU "$LIB_SIM_MAIN" 2>/dev/null | "${SEARCH_CMD[@]}" "_dash_spv_ffi_config_add_peer" >/dev/null; then - : -elif [[ -f "$LIB_SIM_SPV" ]] && nm -gU "$LIB_SIM_SPV" 2>/dev/null | "${SEARCH_CMD[@]}" "_dash_spv_ffi_config_add_peer" >/dev/null; then - : -else - echo "❌ Missing symbol: dash_spv_ffi_config_add_peer (in both main and spv libs)" +check_symbol() { + local symbol="$1" + for lib in "${SIM_LIBS[@]}"; do + if nm -gU "$lib" 2>/dev/null | "${SEARCH_CMD[@]}" "_${symbol}" >/dev/null; then + return 0 + fi + done + return 1 +} + +if ! check_symbol "dash_spv_ffi_config_add_peer"; then + echo "❌ Missing symbol: dash_spv_ffi_config_add_peer across simulator libs: ${SIM_LIBS[*]}" CHECK_OK=0 fi -if nm -gU "$LIB_SIM_MAIN" 2>/dev/null | "${SEARCH_CMD[@]}" "_dash_spv_ffi_config_set_restrict_to_configured_peers" >/dev/null; then - : -elif [[ -f "$LIB_SIM_SPV" ]] && nm -gU "$LIB_SIM_SPV" 2>/dev/null | "${SEARCH_CMD[@]}" "_dash_spv_ffi_config_set_restrict_to_configured_peers" >/dev/null; then - : -else - echo "❌ Missing symbol: dash_spv_ffi_config_set_restrict_to_configured_peers (in both main and spv libs)" +if ! check_symbol "dash_spv_ffi_config_set_restrict_to_configured_peers"; then + echo "❌ Missing symbol: dash_spv_ffi_config_set_restrict_to_configured_peers across simulator libs: ${SIM_LIBS[*]}" CHECK_OK=0 fi