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
SwiftExampleApp: replacing a network's wallet manager ignores a non-clean shutdown and a failed wallet restore #5816
When WalletManagerStore.activate replaces a network's cached manager because the SDK was rebuilt (revisiting a network, a devnet edit, the Docker toggle):
Non-clean shutdown.PlatformWalletManager.shutdown() reports workers that missed their join budget (all_clean() in Rust), but platform_wallet_manager_destroy returns success, and the store restores and publishes the replacement anyway. The old workers keep their persistence callbacks, so they and the new manager can touch the same persisted wallet state. Before feat(swift-sdk): use SPV-synced quorums for Platform proof verification #3417 the replaced manager was not shut down at all.
Failed restore. A loadFromPersistor() error is caught as non-fatal, so the replacement is published empty and nothing retries it. The wallets vanish from the active manager until restart. restorableWalletIds() also swallows a SwiftData fetch failure with try?, so a load can "succeed" with zero wallets.
KotlinExampleApp's store has the same gaps. A draft fix for (1) was written during #3417: destroy returns ErrorShutdownIncomplete, Swift exposes allWorkersStopped, and the store refuses the replacement and quarantines the network until restart.
Further limits of the manager handover, left out of #3417 (which refuses a second activate for a network while one is in flight, 04cceb8). They all need one gate around the whole SDK-rebuild transaction rather than around activate alone:
Docker toggle from two windows: a refused rebuild rolls the Docker setting back to the value it captured when tapped, so with two windows toggling at once the setting can disagree with the SDK the other window publishes.
bootstrap() runs in every window (also on v5.1-dev): a window opened while another window's bootstrap is still replacing the manager publishes its own SDK, then has its activate refused, so the manager stays on the earlier SDK.
Different networks can still interleave across the shutdown await.
A shutdown that never completes keeps its network refused until relaunch.
Activity
shumkov commentedon Nov 10, 2026
Further limits of the manager handover, left out of #3417 (which refuses a second
activatefor a network while one is in flight, 04cceb8). They all need one gate around the whole SDK-rebuild transaction rather than aroundactivatealone:bootstrap()runs in every window (also on v5.1-dev): a window opened while another window's bootstrap is still replacing the manager publishes its own SDK, then has itsactivaterefused, so the manager stays on the earlier SDK.