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 payment admitted during a wallet's first shielded bind can read the store before its notes are restored #6204
A shielded install (install_shielded_views_in_one_transaction in packages/rs-platform-wallet/src/wallet/platform_wallet.rs) records the coordinator the wallet is bound on and publishes the wallet's keys before it restores the wallet's notes from the host's snapshot. Between those two steps the wallet reads as bound, and its store holds no note yet.
A payment that does not wait for the bind can start in that window: it passes its binding check, derives its spend key from the published keys, selects from the store before the restore, and fails with ShieldedNoUnspentNotes although the account is funded. Nothing is reserved or sent, and the same payment goes through once the bind has returned.
not the token pool transfer and unshield, which hold the configuration lock through settlement.
Why it is not fixed by making the three wait
Waiting for the configuration lock orders a payment behind any bind in flight, a routine re-bind of a ready wallet included, and a bind can wait a long time holding that lock: it takes shield_guard next, which an asset-lock funding holds across a ChainLock wait with no deadline (#5518). The payment would then return neither a result nor an error.
Suggested fix
Keep the early coordinator record (a bind dropped while it waits must leave the wallet knowing it is registered), and track readiness to spend separately from it: an account whose restore has not finished is refused with a retryable setup error, and an account that is already ready does not wait for a routine re-bind. ShieldedInstall::is_hydrated is close to that signal.
Activity