From d41bc4e1c91ef591593b06047c2d3cb3b9eefcba Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:08:09 +0100 Subject: [PATCH 01/12] build: don't use dev version of rust-dashcore, revert to v0.40.0 --- Cargo.lock | 260 +++++-------------------- packages/rs-dapi/Cargo.toml | 8 +- packages/rs-dpp/Cargo.toml | 10 +- packages/rs-platform-wallet/Cargo.toml | 6 +- packages/rs-platform-wallet/src/lib.rs | 19 +- packages/rs-sdk-ffi/Cargo.toml | 2 +- 6 files changed, 64 insertions(+), 241 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30c17c6e8c5..1bff9430a0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1418,18 +1418,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", @@ -1510,38 +1499,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", @@ -1549,13 +1507,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", @@ -1569,18 +1527,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", @@ -1588,14 +1546,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", @@ -1605,9 +1562,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", @@ -1618,60 +1575,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", @@ -1682,52 +1596,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", @@ -1916,9 +1803,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", @@ -1930,8 +1817,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", @@ -3567,20 +3454,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", @@ -3594,43 +3480,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", @@ -3639,27 +3499,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", ] @@ -4569,11 +4415,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", "serde", "thiserror 1.0.69", ] @@ -5356,8 +5202,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", @@ -7048,18 +6894,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 2d4775a05d1..664efa0bffa 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 74af603e462..600f096125b 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 serde = { version = "1.0", features = ["derive"] } 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 e10bf4d06b4..12c06fb3702 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"] } From ce695533ebb09fe316f26dbe129a41512f04beb2 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 11:16:51 +0100 Subject: [PATCH 02/12] chore: add some validations to rs-sdk-ffi build_ios.sh --- packages/rs-sdk-ffi/build_ios.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/rs-sdk-ffi/build_ios.sh b/packages/rs-sdk-ffi/build_ios.sh index 6a01b36ffac..c0a066cdf61 100755 --- a/packages/rs-sdk-ffi/build_ios.sh +++ b/packages/rs-sdk-ffi/build_ios.sh @@ -323,6 +323,16 @@ fi # Build dash-spv-ffi from local rust-dashcore for device and simulator RUST_DASHCORE_PATH="$PROJECT_ROOT/../rust-dashcore" SPV_CRATE_PATH="$RUST_DASHCORE_PATH/dash-spv-ffi" +verify_spv_artifact() { + local artifact_path="$1" + local label="$2" + if [ ! -f "$artifact_path" ]; then + echo -e "${RED}❌ Missing dash-spv-ffi artifact (${label}) at:${NC}" + echo " $artifact_path" + echo -e "${YELLOW} Ensure the previous cargo build step produced this target.${NC}" + exit 1 + fi +} if [ -d "$SPV_CRATE_PATH" ]; then echo -e "${GREEN}Building dash-spv-ffi (local rust-dashcore)${NC}" pushd "$SPV_CRATE_PATH" >/dev/null @@ -352,6 +362,17 @@ if [ -d "$SPV_CRATE_PATH" ]; then fi fi popd >/dev/null + if [ "$BUILD_ARCH" != "x86" ]; then + verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" "device (aarch64-apple-ios)" + fi + if [ "$BUILD_ARCH" = "universal" ]; then + verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" "simulator arm64 (aarch64-apple-ios-sim)" + verify_spv_artifact "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" "simulator x86_64" + elif [ "$BUILD_ARCH" = "x86" ]; then + verify_spv_artifact "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" "simulator x86_64" + else + verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" "simulator arm64 (aarch64-apple-ios-sim)" + fi else echo -e "${YELLOW}⚠ Local rust-dashcore not found at $SPV_CRATE_PATH; SPV symbols must be provided by rs-sdk-ffi${NC}" fi From f2683a380a7945f1864e4d74039e77ac4d6184b6 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:59:26 +0100 Subject: [PATCH 03/12] chore: fix deps --- packages/rs-sdk-ffi/build_ios.sh | 73 ++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/packages/rs-sdk-ffi/build_ios.sh b/packages/rs-sdk-ffi/build_ios.sh index c0a066cdf61..934b656059c 100755 --- a/packages/rs-sdk-ffi/build_ios.sh +++ b/packages/rs-sdk-ffi/build_ios.sh @@ -323,16 +323,42 @@ fi # Build dash-spv-ffi from local rust-dashcore for device and simulator RUST_DASHCORE_PATH="$PROJECT_ROOT/../rust-dashcore" SPV_CRATE_PATH="$RUST_DASHCORE_PATH/dash-spv-ffi" -verify_spv_artifact() { - local artifact_path="$1" +SPV_SEARCH_DIRS=() +if [ -n "${CARGO_TARGET_DIR:-}" ]; then + SPV_SEARCH_DIRS+=("$CARGO_TARGET_DIR") +fi +SPV_SEARCH_DIRS+=("$SPV_CRATE_PATH/target" "$RUST_DASHCORE_PATH/target") +find_spv_artifact() { + local target_dir="$1" + for base in "${SPV_SEARCH_DIRS[@]}"; do + local candidate="$base/$target_dir/release/libdash_spv_ffi.a" + if [ -f "$candidate" ]; then + echo "$candidate" + return 0 + fi + done + return 1 +} +require_spv_artifact() { + local target_dir="$1" local label="$2" - if [ ! -f "$artifact_path" ]; then - echo -e "${RED}❌ Missing dash-spv-ffi artifact (${label}) at:${NC}" - echo " $artifact_path" - echo -e "${YELLOW} Ensure the previous cargo build step produced this target.${NC}" - exit 1 + local path + if path=$(find_spv_artifact "$target_dir"); then + echo "$path" + return 0 fi + + echo -e "${RED}❌ Missing dash-spv-ffi artifact (${label}).${NC}" + echo " Checked the following locations:" + for base in "${SPV_SEARCH_DIRS[@]}"; do + echo " - $base/$target_dir/release/libdash_spv_ffi.a" + done + echo -e "${YELLOW} Ensure the cargo build step produced this target or set CARGO_TARGET_DIR accordingly.${NC}" + exit 1 } +DEVICE_SPV_LIB="" +SIM_ARM_SPV_LIB="" +SIM_X86_SPV_LIB="" if [ -d "$SPV_CRATE_PATH" ]; then echo -e "${GREEN}Building dash-spv-ffi (local rust-dashcore)${NC}" pushd "$SPV_CRATE_PATH" >/dev/null @@ -363,15 +389,15 @@ if [ -d "$SPV_CRATE_PATH" ]; then fi popd >/dev/null if [ "$BUILD_ARCH" != "x86" ]; then - verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" "device (aarch64-apple-ios)" + DEVICE_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios" "device (aarch64-apple-ios)")" fi if [ "$BUILD_ARCH" = "universal" ]; then - verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" "simulator arm64 (aarch64-apple-ios-sim)" - verify_spv_artifact "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" "simulator x86_64" + SIM_ARM_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios-sim" "simulator arm64 (aarch64-apple-ios-sim)")" + SIM_X86_SPV_LIB="$(require_spv_artifact "x86_64-apple-ios" "simulator x86_64")" elif [ "$BUILD_ARCH" = "x86" ]; then - verify_spv_artifact "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" "simulator x86_64" + SIM_X86_SPV_LIB="$(require_spv_artifact "x86_64-apple-ios" "simulator x86_64")" else - verify_spv_artifact "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" "simulator arm64 (aarch64-apple-ios-sim)" + SIM_ARM_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios-sim" "simulator arm64 (aarch64-apple-ios-sim)")" fi else echo -e "${YELLOW}⚠ Local rust-dashcore not found at $SPV_CRATE_PATH; SPV symbols must be provided by rs-sdk-ffi${NC}" @@ -398,11 +424,11 @@ if [ "$BUILD_ARCH" != "x86" ]; then mkdir -p "$OUTPUT_DIR/device" cp "$PROJECT_ROOT/target/aarch64-apple-ios/release/librs_sdk_ffi.a" "$OUTPUT_DIR/device/" # Merge with dash-spv-ffi device lib if available - if [ -f "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" ]; then + if [ -n "$DEVICE_SPV_LIB" ] && [ -f "$DEVICE_SPV_LIB" ]; then echo -e "${GREEN}Merging device libs (rs-sdk-ffi + dash-spv-ffi)${NC}" libtool -static -o "$OUTPUT_DIR/device/libDashSDKFFI_combined.a" \ "$OUTPUT_DIR/device/librs_sdk_ffi.a" \ - "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" + "$DEVICE_SPV_LIB" COMBINED_DEVICE_LIB=1 fi fi @@ -466,10 +492,21 @@ fi if [ -f "$OUTPUT_DIR/simulator/librs_sdk_ffi.a" ]; then # Try to merge with SPV sim lib if it exists SIM_SPV_LIB="" - if [ -f "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" ]; then - SIM_SPV_LIB="$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" - elif [ -f "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" ]; then - SIM_SPV_LIB="$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" + if [ "$BUILD_ARCH" = "x86" ]; then + SIM_SPV_LIB="$SIM_X86_SPV_LIB" + elif [ "$BUILD_ARCH" = "universal" ]; then + if [ -n "$SIM_ARM_SPV_LIB" ] && [ -f "$SIM_ARM_SPV_LIB" ] && [ -n "$SIM_X86_SPV_LIB" ] && [ -f "$SIM_X86_SPV_LIB" ]; then + UNIVERSAL_SIM_SPV_LIB="$OUTPUT_DIR/simulator/libdash_spv_ffi_universal.a" + echo -e "${GREEN}Creating universal simulator dash-spv-ffi library...${NC}" + lipo -create "$SIM_ARM_SPV_LIB" "$SIM_X86_SPV_LIB" -output "$UNIVERSAL_SIM_SPV_LIB" + SIM_SPV_LIB="$UNIVERSAL_SIM_SPV_LIB" + elif [ -n "$SIM_ARM_SPV_LIB" ] && [ -f "$SIM_ARM_SPV_LIB" ]; then + SIM_SPV_LIB="$SIM_ARM_SPV_LIB" + else + SIM_SPV_LIB="$SIM_X86_SPV_LIB" + fi + else + SIM_SPV_LIB="$SIM_ARM_SPV_LIB" fi if [ -n "$SIM_SPV_LIB" ]; then echo -e "${GREEN}Merging simulator libs (rs-sdk-ffi + dash-spv-ffi)${NC}" From 8ceb6f9e42c91128fbd0e74952b8481ad13bca61 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 13:15:57 +0100 Subject: [PATCH 04/12] chore: trying to fix swift build --- packages/swift-sdk/build_ios.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/swift-sdk/build_ios.sh b/packages/swift-sdk/build_ios.sh index 84454aa8232..40c0f46b831 100755 --- a/packages/swift-sdk/build_ios.sh +++ b/packages/swift-sdk/build_ios.sh @@ -33,12 +33,17 @@ 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" +LIB_SIM_DIR="$DEST_XCFRAMEWORK_DIR/ios-arm64-simulator" +LIB_SIM_MAIN="" +if [[ -f "$LIB_SIM_DIR/librs_sdk_ffi.a" ]]; then + LIB_SIM_MAIN="$LIB_SIM_DIR/librs_sdk_ffi.a" +elif [[ -f "$LIB_SIM_DIR/libDashSDKFFI_combined.a" ]]; then + LIB_SIM_MAIN="$LIB_SIM_DIR/libDashSDKFFI_combined.a" +else + echo "❌ Missing simulator library (expected librs_sdk_ffi.a or libDashSDKFFI_combined.a) in $LIB_SIM_DIR" exit 1 fi +LIB_SIM_SPV="$LIB_SIM_DIR/libdash_spv_ffi.a" echo " - Verifying required SPV symbols are present in XCFramework libs" # Prefer ripgrep if available; fall back to grep for portability # Avoid -q with pipefail, which can cause nm to SIGPIPE and fail the check. From fa61036952f70f5a1d82a7b35dad5e1577b1b429 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 13:44:35 +0100 Subject: [PATCH 05/12] chore: cargo clean --- .github/workflows/swift-sdk-build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/swift-sdk-build.yml b/.github/workflows/swift-sdk-build.yml index dba9b89c615..ed2476b3f1c 100644 --- a/.github/workflows/swift-sdk-build.yml +++ b/.github/workflows/swift-sdk-build.yml @@ -150,6 +150,16 @@ 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 DashSDKFFI.xcframework and install into Swift package run: | bash packages/swift-sdk/build_ios.sh From b9f1b61a517456c3f1dcb3f30a3bcc9ab7b286e2 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 13:45:02 +0100 Subject: [PATCH 06/12] chore: build_ios.sh check symbol changes --- packages/swift-sdk/build_ios.sh | 38 +++++++++++++++------------------ 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/packages/swift-sdk/build_ios.sh b/packages/swift-sdk/build_ios.sh index 40c0f46b831..039c33dd65b 100755 --- a/packages/swift-sdk/build_ios.sh +++ b/packages/swift-sdk/build_ios.sh @@ -33,17 +33,11 @@ rm -rf "$DEST_XCFRAMEWORK_DIR" cp -R "$SRC_XCFRAMEWORK_DIR" "$DEST_XCFRAMEWORK_DIR" # Verify required SPV symbols are present in the binary -LIB_SIM_DIR="$DEST_XCFRAMEWORK_DIR/ios-arm64-simulator" -LIB_SIM_MAIN="" -if [[ -f "$LIB_SIM_DIR/librs_sdk_ffi.a" ]]; then - LIB_SIM_MAIN="$LIB_SIM_DIR/librs_sdk_ffi.a" -elif [[ -f "$LIB_SIM_DIR/libDashSDKFFI_combined.a" ]]; then - LIB_SIM_MAIN="$LIB_SIM_DIR/libDashSDKFFI_combined.a" -else - echo "❌ Missing simulator library (expected librs_sdk_ffi.a or libDashSDKFFI_combined.a) in $LIB_SIM_DIR" +mapfile -t SIM_LIBS < <(find "$DEST_XCFRAMEWORK_DIR" -maxdepth 2 -type f -name "*.a" -path "*simulator*" 2>/dev/null) +if [[ ${#SIM_LIBS[@]} -eq 0 ]]; then + echo "❌ Missing simulator static libraries inside $DEST_XCFRAMEWORK_DIR (searched for *.a under *simulator* slices)" exit 1 fi -LIB_SIM_SPV="$LIB_SIM_DIR/libdash_spv_ffi.a" echo " - Verifying required SPV symbols are present in XCFramework libs" # Prefer ripgrep if available; fall back to grep for portability # Avoid -q with pipefail, which can cause nm to SIGPIPE and fail the check. @@ -54,21 +48,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 From 0745c0dd9ee2f566a0659136098acfb0f9d9ba27 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 13:55:22 +0100 Subject: [PATCH 07/12] fix build_ios.sh --- packages/swift-sdk/build_ios.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/swift-sdk/build_ios.sh b/packages/swift-sdk/build_ios.sh index 039c33dd65b..b53da707272 100755 --- a/packages/swift-sdk/build_ios.sh +++ b/packages/swift-sdk/build_ios.sh @@ -33,7 +33,10 @@ rm -rf "$DEST_XCFRAMEWORK_DIR" cp -R "$SRC_XCFRAMEWORK_DIR" "$DEST_XCFRAMEWORK_DIR" # Verify required SPV symbols are present in the binary -mapfile -t SIM_LIBS < <(find "$DEST_XCFRAMEWORK_DIR" -maxdepth 2 -type f -name "*.a" -path "*simulator*" 2>/dev/null) +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 From 24522b5978d28ad0e48ff39038b0edfef36dd7c9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:10:30 +0100 Subject: [PATCH 08/12] chore: build_ios.sh --- packages/rs-sdk-ffi/build_ios.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/packages/rs-sdk-ffi/build_ios.sh b/packages/rs-sdk-ffi/build_ios.sh index 934b656059c..173245a8dcd 100755 --- a/packages/rs-sdk-ffi/build_ios.sh +++ b/packages/rs-sdk-ffi/build_ios.sh @@ -359,6 +359,29 @@ require_spv_artifact() { DEVICE_SPV_LIB="" SIM_ARM_SPV_LIB="" SIM_X86_SPV_LIB="" +reinforce_combined_with_spv() { + local combined_lib="$1" + shift + if [ ! -f "$combined_lib" ]; then + return 0 + fi + + local spv_lib + for target_dir in "$@"; do + if spv_lib=$(find_spv_artifact "$target_dir"); then + break + fi + done + if [ -z "${spv_lib:-}" ]; then + echo -e "${YELLOW}⚠ Unable to find dash-spv-ffi library to reinforce $(basename "$combined_lib")${NC}" + return 0 + fi + + echo -e "${GREEN}Embedding dash-spv-ffi symbols from $spv_lib into $(basename "$combined_lib")${NC}" + libtool -static -o "${combined_lib}.tmp" "$combined_lib" "$spv_lib" + mv "${combined_lib}.tmp" "$combined_lib" +} + if [ -d "$SPV_CRATE_PATH" ]; then echo -e "${GREEN}Building dash-spv-ffi (local rust-dashcore)${NC}" pushd "$SPV_CRATE_PATH" >/dev/null @@ -430,6 +453,7 @@ if [ "$BUILD_ARCH" != "x86" ]; then "$OUTPUT_DIR/device/librs_sdk_ffi.a" \ "$DEVICE_SPV_LIB" COMBINED_DEVICE_LIB=1 + reinforce_combined_with_spv "$OUTPUT_DIR/device/libDashSDKFFI_combined.a" "aarch64-apple-ios" fi fi @@ -513,6 +537,13 @@ if [ -f "$OUTPUT_DIR/simulator/librs_sdk_ffi.a" ]; then libtool -static -o "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" \ "$OUTPUT_DIR/simulator/librs_sdk_ffi.a" \ "$SIM_SPV_LIB" + if [ "$BUILD_ARCH" = "universal" ]; then + reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "aarch64-apple-ios-sim" "x86_64-apple-ios" + elif [ "$BUILD_ARCH" = "x86" ]; then + reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "x86_64-apple-ios" + else + reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "aarch64-apple-ios-sim" + fi XCFRAMEWORK_CMD="$XCFRAMEWORK_CMD -library $OUTPUT_DIR/simulator/libDashSDKFFI_combined.a -headers $HEADERS_DIR" else XCFRAMEWORK_CMD="$XCFRAMEWORK_CMD -library $OUTPUT_DIR/simulator/librs_sdk_ffi.a -headers $HEADERS_DIR" From 7d97ffa8aee0558a7fd3c09032732d9618ab3015 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:13:38 +0100 Subject: [PATCH 09/12] chore: revert build_ios.sh --- packages/rs-sdk-ffi/build_ios.sh | 101 ++----------------------------- 1 file changed, 6 insertions(+), 95 deletions(-) diff --git a/packages/rs-sdk-ffi/build_ios.sh b/packages/rs-sdk-ffi/build_ios.sh index 173245a8dcd..6a01b36ffac 100755 --- a/packages/rs-sdk-ffi/build_ios.sh +++ b/packages/rs-sdk-ffi/build_ios.sh @@ -323,65 +323,6 @@ fi # Build dash-spv-ffi from local rust-dashcore for device and simulator RUST_DASHCORE_PATH="$PROJECT_ROOT/../rust-dashcore" SPV_CRATE_PATH="$RUST_DASHCORE_PATH/dash-spv-ffi" -SPV_SEARCH_DIRS=() -if [ -n "${CARGO_TARGET_DIR:-}" ]; then - SPV_SEARCH_DIRS+=("$CARGO_TARGET_DIR") -fi -SPV_SEARCH_DIRS+=("$SPV_CRATE_PATH/target" "$RUST_DASHCORE_PATH/target") -find_spv_artifact() { - local target_dir="$1" - for base in "${SPV_SEARCH_DIRS[@]}"; do - local candidate="$base/$target_dir/release/libdash_spv_ffi.a" - if [ -f "$candidate" ]; then - echo "$candidate" - return 0 - fi - done - return 1 -} -require_spv_artifact() { - local target_dir="$1" - local label="$2" - local path - if path=$(find_spv_artifact "$target_dir"); then - echo "$path" - return 0 - fi - - echo -e "${RED}❌ Missing dash-spv-ffi artifact (${label}).${NC}" - echo " Checked the following locations:" - for base in "${SPV_SEARCH_DIRS[@]}"; do - echo " - $base/$target_dir/release/libdash_spv_ffi.a" - done - echo -e "${YELLOW} Ensure the cargo build step produced this target or set CARGO_TARGET_DIR accordingly.${NC}" - exit 1 -} -DEVICE_SPV_LIB="" -SIM_ARM_SPV_LIB="" -SIM_X86_SPV_LIB="" -reinforce_combined_with_spv() { - local combined_lib="$1" - shift - if [ ! -f "$combined_lib" ]; then - return 0 - fi - - local spv_lib - for target_dir in "$@"; do - if spv_lib=$(find_spv_artifact "$target_dir"); then - break - fi - done - if [ -z "${spv_lib:-}" ]; then - echo -e "${YELLOW}⚠ Unable to find dash-spv-ffi library to reinforce $(basename "$combined_lib")${NC}" - return 0 - fi - - echo -e "${GREEN}Embedding dash-spv-ffi symbols from $spv_lib into $(basename "$combined_lib")${NC}" - libtool -static -o "${combined_lib}.tmp" "$combined_lib" "$spv_lib" - mv "${combined_lib}.tmp" "$combined_lib" -} - if [ -d "$SPV_CRATE_PATH" ]; then echo -e "${GREEN}Building dash-spv-ffi (local rust-dashcore)${NC}" pushd "$SPV_CRATE_PATH" >/dev/null @@ -411,17 +352,6 @@ if [ -d "$SPV_CRATE_PATH" ]; then fi fi popd >/dev/null - if [ "$BUILD_ARCH" != "x86" ]; then - DEVICE_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios" "device (aarch64-apple-ios)")" - fi - if [ "$BUILD_ARCH" = "universal" ]; then - SIM_ARM_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios-sim" "simulator arm64 (aarch64-apple-ios-sim)")" - SIM_X86_SPV_LIB="$(require_spv_artifact "x86_64-apple-ios" "simulator x86_64")" - elif [ "$BUILD_ARCH" = "x86" ]; then - SIM_X86_SPV_LIB="$(require_spv_artifact "x86_64-apple-ios" "simulator x86_64")" - else - SIM_ARM_SPV_LIB="$(require_spv_artifact "aarch64-apple-ios-sim" "simulator arm64 (aarch64-apple-ios-sim)")" - fi else echo -e "${YELLOW}⚠ Local rust-dashcore not found at $SPV_CRATE_PATH; SPV symbols must be provided by rs-sdk-ffi${NC}" fi @@ -447,13 +377,12 @@ if [ "$BUILD_ARCH" != "x86" ]; then mkdir -p "$OUTPUT_DIR/device" cp "$PROJECT_ROOT/target/aarch64-apple-ios/release/librs_sdk_ffi.a" "$OUTPUT_DIR/device/" # Merge with dash-spv-ffi device lib if available - if [ -n "$DEVICE_SPV_LIB" ] && [ -f "$DEVICE_SPV_LIB" ]; then + if [ -f "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" ]; then echo -e "${GREEN}Merging device libs (rs-sdk-ffi + dash-spv-ffi)${NC}" libtool -static -o "$OUTPUT_DIR/device/libDashSDKFFI_combined.a" \ "$OUTPUT_DIR/device/librs_sdk_ffi.a" \ - "$DEVICE_SPV_LIB" + "$SPV_CRATE_PATH/target/aarch64-apple-ios/release/libdash_spv_ffi.a" COMBINED_DEVICE_LIB=1 - reinforce_combined_with_spv "$OUTPUT_DIR/device/libDashSDKFFI_combined.a" "aarch64-apple-ios" fi fi @@ -516,34 +445,16 @@ fi if [ -f "$OUTPUT_DIR/simulator/librs_sdk_ffi.a" ]; then # Try to merge with SPV sim lib if it exists SIM_SPV_LIB="" - if [ "$BUILD_ARCH" = "x86" ]; then - SIM_SPV_LIB="$SIM_X86_SPV_LIB" - elif [ "$BUILD_ARCH" = "universal" ]; then - if [ -n "$SIM_ARM_SPV_LIB" ] && [ -f "$SIM_ARM_SPV_LIB" ] && [ -n "$SIM_X86_SPV_LIB" ] && [ -f "$SIM_X86_SPV_LIB" ]; then - UNIVERSAL_SIM_SPV_LIB="$OUTPUT_DIR/simulator/libdash_spv_ffi_universal.a" - echo -e "${GREEN}Creating universal simulator dash-spv-ffi library...${NC}" - lipo -create "$SIM_ARM_SPV_LIB" "$SIM_X86_SPV_LIB" -output "$UNIVERSAL_SIM_SPV_LIB" - SIM_SPV_LIB="$UNIVERSAL_SIM_SPV_LIB" - elif [ -n "$SIM_ARM_SPV_LIB" ] && [ -f "$SIM_ARM_SPV_LIB" ]; then - SIM_SPV_LIB="$SIM_ARM_SPV_LIB" - else - SIM_SPV_LIB="$SIM_X86_SPV_LIB" - fi - else - SIM_SPV_LIB="$SIM_ARM_SPV_LIB" + if [ -f "$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" ]; then + SIM_SPV_LIB="$SPV_CRATE_PATH/target/aarch64-apple-ios-sim/release/libdash_spv_ffi.a" + elif [ -f "$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" ]; then + SIM_SPV_LIB="$SPV_CRATE_PATH/target/x86_64-apple-ios/release/libdash_spv_ffi.a" fi if [ -n "$SIM_SPV_LIB" ]; then echo -e "${GREEN}Merging simulator libs (rs-sdk-ffi + dash-spv-ffi)${NC}" libtool -static -o "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" \ "$OUTPUT_DIR/simulator/librs_sdk_ffi.a" \ "$SIM_SPV_LIB" - if [ "$BUILD_ARCH" = "universal" ]; then - reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "aarch64-apple-ios-sim" "x86_64-apple-ios" - elif [ "$BUILD_ARCH" = "x86" ]; then - reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "x86_64-apple-ios" - else - reinforce_combined_with_spv "$OUTPUT_DIR/simulator/libDashSDKFFI_combined.a" "aarch64-apple-ios-sim" - fi XCFRAMEWORK_CMD="$XCFRAMEWORK_CMD -library $OUTPUT_DIR/simulator/libDashSDKFFI_combined.a -headers $HEADERS_DIR" else XCFRAMEWORK_CMD="$XCFRAMEWORK_CMD -library $OUTPUT_DIR/simulator/librs_sdk_ffi.a -headers $HEADERS_DIR" From 487bfd258023f332592debdaa42f1f63e5a04318 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:26:47 +0100 Subject: [PATCH 10/12] ci: build dashcore explicitly --- .github/workflows/swift-sdk-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/swift-sdk-build.yml b/.github/workflows/swift-sdk-build.yml index ed2476b3f1c..b5629ac5828 100644 --- a/.github/workflows/swift-sdk-build.yml +++ b/.github/workflows/swift-sdk-build.yml @@ -160,6 +160,17 @@ jobs: (cd "$RUST_DASHCORE_DIR" && cargo clean || true) fi + - name: Build dash-spv-ffi static libs explicitly + shell: bash + run: | + set -euxo pipefail + 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 From 04f957bb4898e18bcb604b567ad1cd4c298d3746 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:34:34 +0100 Subject: [PATCH 11/12] ci: some iphone target settings --- .github/workflows/swift-sdk-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/swift-sdk-build.yml b/.github/workflows/swift-sdk-build.yml index b5629ac5828..7ff843599f5 100644 --- a/.github/workflows/swift-sdk-build.yml +++ b/.github/workflows/swift-sdk-build.yml @@ -164,6 +164,11 @@ jobs: 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 }}" From 34856abca62f002dcfd5b373e42ae4699f0d86f5 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:46:59 +0100 Subject: [PATCH 12/12] ci: collect logs --- .github/workflows/swift-sdk-build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/swift-sdk-build.yml b/.github/workflows/swift-sdk-build.yml index 7ff843599f5..a32c6de0d3a 100644 --- a/.github/workflows/swift-sdk-build.yml +++ b/.github/workflows/swift-sdk-build.yml @@ -180,6 +180,31 @@ jobs: 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