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-storage: keep an exported invitation key from being offered again after a deleted row, a power loss or a backup restore #6324
TL;DR: With the SQLite store, a wallet can hand out an invitation key it already exported in three storage situations: a deleted key record, a power loss right after the export, or a restore from an older backup. Tracks the protections the SQLite store still needs.
User story
As a wallet user sending identity invitations, I want every invitation to use a key that was never exported before, to achieve invitations that nobody holding an older invitation can claim.
Power loss. The default configuration (Synchronous::Normal with WAL) survives an app crash but not an OS crash or power loss, so the write marking the key used can be lost after the invitation left the device.
Older backup. Restoring an intact SQLite backup taken before the invitation brings back a store in which the key was never used; nothing in the rows shows the rollback.
Expected behavior
An exported invitation key is never offered again, whatever happens to the store afterwards.
Detailed discussion
Options per case: (1) a durable issuance floor or tombstone table independent of core_address_pool rows (the SQLite load returns funding_issuance_floors empty today); (2) a power-loss barrier for the invitation export write (synchronous = FULL for that commit, or advertise invitation creation only for durable configurations); (3) mark a store restored from a backup as needing a resync before invitation export, or start a fresh issuance range after a restore.
Activity