You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
platform-wallet: a shielded Clear followed by a restart stops scanning the tip account of an identity removed from the device #6306
A wallet scans one shielded account per identity (the identity's tip account, shielded_identity_account_index). When an identity is removed from the device while its profile still publishes that account's address, the account keeps scanning because its persisted viewing key row records the account index: a bind adds every identity account that has a row.
A shielded Clear deletes the viewing key rows (it has to: Clear is the recovery for an account whose stored key no longer matches the seed). After #5934 the bind that follows a Clear in the same process still adds the account, because the wallet handle keeps its keys across a Clear. Two cases are not covered:
the process ends between the Clear and the next seed bind;
the Clear runs on a handle that never installed keys in this process (a cold-start bind that failed, which is one reason a user runs Clear).
In both, the next bind no longer adds the removed identity's account, so tips sent to its still-published address are not scanned.
Impact
No funds are lost. The account is derived from the seed, and once the identity is back on the device the bind adds its account again and the scan starts from zero, so tips received meanwhile are found. Neither example app shows a removed identity's shielded balance in the meantime. An identity comes back by user action (wallet search), not by itself.
On v5.2-dev before #5934 the Kotlin app kept viewing key rows across a Clear, so this is new there. The Swift app already deleted them on every Clear.
Proposed fix
Keep only the account indices, in Rust's own shielded store file, in a table a Clear keeps and a wallet removal drops (as shielded_tip_recipients is kept):
in NetworkShieldedCoordinator::clear_admitted, before the reset, record (wallet_id, account_index) for the identity accounts in the coordinator's registry and in a best-effort host.load(). A failed load is logged and does not stop the Clear; a failed write aborts the Clear with nothing reset, as the pending-wipe mark does;
the coordinator loads the rows into memory when it is built, and bind_shielded_locked reads that copy, so the bind path takes no store lock;
Test: bind with a row for a removed identity's account, Clear, build a fresh wallet handle and coordinator on the same store file, bind from the seed, and assert the account is registered and its row written again.
Fixed in #5934 (e33a2f3), with one change from the design above: the account numbers are recorded when a wallet's accounts are registered, not at Clear time from a host load. A registration writes the identity accounts not kept yet and takes no store lock when it adds none, so Clear gains no host call and no new way to fail. The coordinator holds the copy a seed bind reads.
Left open: a wallet whose only binds since that change failed before they registered has nothing recorded, so a Clear in that state still stops scanning a removed identity's account until the identity is back on the device.
Activity
fix(platform-wallet): keep a wallet's identity accounts scanning afte…
QuantumExplorer commentedon Nov 25, 2026
Fixed in #5934 (e33a2f3), with one change from the design above: the account numbers are recorded when a wallet's accounts are registered, not at Clear time from a host load. A registration writes the identity accounts not kept yet and takes no store lock when it adds none, so Clear gains no host call and no new way to fail. The coordinator holds the copy a seed bind reads.
Left open: a wallet whose only binds since that change failed before they registered has nothing recorded, so a Clear in that state still stops scanning a removed identity's account until the identity is back on the device.