Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ members = [
]

[workspace.dependencies]
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
dash-network-seeds = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
key-wallet-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
dash-network = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "8f78baa6b7979b9bea56501ad75b5a7b7150a711" }
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
dash-network-seeds = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
key-wallet-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
dash-network = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "08bf729de819f52973002f754342fedac14a06db" }

tokio-metrics = "0.5"

Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/sdk-parity-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@
"host": "shared",
"kind": "unit",
"file": "packages/rs-platform-wallet/src/changeset/core_bridge.rs",
"id": "lagged_broadcast_freezes_and_strips_subsequent_watermark",
"command": "cargo test -p platform-wallet lagged_broadcast_freezes_and_strips_subsequent_watermark",
"id": "watermark_is_still_stripped_after_a_fault",
"command": "cargo test -p platform-wallet watermark_is_still_stripped_after_a_fault",
"covers_restart": false
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,10 @@ internal object WalletManagerNative {

/**
* Whether the durable sync watermark has been frozen this session because
* persistence events were dropped or a store was rejected — the persisted
* a persistence store was rejected (the lossless channel cannot drop
* events) — the persisted
* `syncedHeight` is held behind the chain tip and a rescan is pending on
* the next launch. Latches for the process lifetime.
* the next launch. Latches for this manager instance's lifetime.
*/
external fun syncFaultDetected(managerHandle: Long): Boolean

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1123,13 +1123,16 @@ class PlatformWalletManager(
/**
* Whether the native manager has frozen its durable sync watermark this
* session (dashpay/platform#4069). `true` means the wallet-event adapter
* dropped record-bearing events, or a persistence `store()` was rejected,
* had a persistence `store()` rejected — the one remaining fault trigger;
* the lossless persistence channel cannot drop or lag events —
* so the persisted `syncedHeight` is deliberately held behind the chain
* tip and a rescan is pending on the next launch. Poll this to surface a
* hard "verification failed / rescan pending" state instead of leaving
* the fault visible only in the error logs.
*
* The flag latches: once `true` it stays `true` for the process lifetime.
* The flag latches: once `true` it stays `true` for this manager
* instance's lifetime (a destroyed-and-recreated manager — e.g. a network
* switch through WalletManagerStore — starts unlatched).
*/
suspend fun syncFaultDetected(): Boolean = withContext(Dispatchers.IO) {
mapNativeErrors { WalletManagerNative.syncFaultDetected(managerHandle) }
Expand Down
8 changes: 5 additions & 3 deletions packages/rs-platform-wallet-ffi/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,16 @@ pub unsafe extern "C" fn platform_wallet_manager_persistence_capabilities(
/// Whether the manager has frozen its durable sync watermark this session
/// (dashpay/platform#4069).
///
/// `true` means the wallet-event adapter dropped record-bearing events (a
/// broadcast lag) or had a persistence `store()` rejected, so the persisted
/// `true` means a persistence `store()` was rejected — the one remaining
/// fault trigger; the lossless persistence channel cannot drop or lag
/// events — so the affected wallet's persisted
/// `syncedHeight` is deliberately held behind the chain tip and a rescan is
/// pending on the next launch. Hosts poll this to surface a hard
/// "verification failed / rescan pending" state instead of the fault being
/// visible only in error logs.
///
/// The flag latches: once `true` it stays `true` for the process lifetime.
/// The flag latches: once `true` it stays `true` for this manager
/// instance's lifetime (a destroyed-and-recreated manager starts unlatched).
#[no_mangle]
pub unsafe extern "C" fn platform_wallet_manager_sync_fault_detected(
handle: Handle,
Expand Down
12 changes: 12 additions & 0 deletions packages/rs-platform-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ image = { version = "0.25", default-features = false, features = ["png", "jpeg",
# Security
zeroize = "1"

# `log` facade. `changeset/core_bridge.rs` emits watermark-freeze breadcrumbs
# through `log` so they reach Android logcat (the JNI layer installs
# `android_logger` as the global `log` logger, tag `DashSDK`; the Kotlin SDK's
# only `tracing` subscriber writes to stdout, which Android discards).
# Declared here — deliberately NOT inside the `tracing` block above — so this
# crate owns the dependency independently of the encrypted-txMetadata change
# (#4277) that first introduced a `log` line: that change was reverted on
# v4.2-dev (#4279), and a `log` line living in that reverted region gets
# dropped by the 3-way merge, leaving the `log::` calls in core_bridge.rs
# undeclared (E0433). Keeping it in this untouched region makes it survive.
log = "0.4"

# Shielded pool (optional, behind `shielded` feature)
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "a2791bbdca756d6a6113024aec48f09f7a33faa9", optional = true }
# Direct `rusqlite` access so `FileBackedShieldedStore::open_path` can set
Expand Down
Loading
Loading