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: keep a pending shielded spend's state when a rebind drops its account #6159
A same-coordinator bind that leaves out an account runs purge_subwallet. That deletes the account's note-spend recovery records, its token notes along with their holds, and its token pool watermark. Registration only refuses this for identity-funded debits (register_locked skips note spends).
If a shielded spend from that account is still pending when this happens, the wallet loses the spend's hold and its redrive, and its activity row may stay Pending. No funds are at risk, because the notes are on chain:
If the spend landed, a rebind of the account rescans its notes and marks them spent.
If it did not land, the notes come back selectable, and only one of two spends of them can execute.
This applies to every shielded spend: credit transfers, unshields and withdrawals, as well as token pool spends (types 26 and 27). The token pool spends hold the shielded config lock until they return, so a bind cannot run while one is in progress. Nothing protects a spend after it returns as submitted.
Options
Refuse a bind that drops an account with a saved note-spend recovery record, as registration already does for identity-funded debits.
Or keep the dropped account's recovery records and holds until they settle.
Either way, this should be done for all shielded spends together.
Activity