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
Two findings from the automated review of #829.
Replay recovery (step 3b). The step-10 notifications are sent after the CAS
commits, so a crash or a lost send queue in between left the escrow funded and
the buyer never cued to send fiat — and the step-3 status check rejected every
retry, making the documented idempotent retry path unreachable. An order this
handler already locked (escrow stored, still Active) whose submitted token
matches the stored one now replays the notifications and returns Ok(()): no
mint round-trip, no second write. A different token on a locked order is a
second funding the escrow can never honour, so it is rejected. The exception is
scoped to Active, so a stale "escrow locked, send fiat" is never replayed onto
a trade that has moved on.
Cross-order token uniqueness (step 6b). The 2-of-3 condition commits to trade
keys, not to an order id, and the mint reports proofs unspent until the first
redeem — so two orders reusing the same trade keys could both validate the very
same token and go Active against one redeemable escrow. The handler now rejects
a token already escrowed elsewhere before the mint round-trip, and the CF-4 CAS
carries a NOT EXISTS leg that closes the check-then-act race atomically. A CAS
that matches zero rows because another order took the token is reported as
InvalidCashuToken rather than a silent no-op. This is token-level uniqueness;
proof-level (Y = hash_to_curve) uniqueness arrives with TA-1f.
Track A §4 of the spec is updated to match, along with its Definition of Done.
0 commit comments