Skip to content

bug: a savings payment to an ended exit is retried as an ordinary send #2157

Description

@ovitrif

Found while fixing savings payments a force transfer no longer needs (#2142):

  • An ended exit's address is forgotten when a new exit starts. An exit that ends Done with no kept change writes nothing to the earlier-addresses list. A new exit then overwrites its record. A savings payment to the first exit that's still unresolved is then treated as an ordinary send: Send Pending offers Retry to the old, unmonitored address instead of the release. This predates fix: release savings payments a force transfer no longer needs #2142.
  • Progress shows stale funding after a refused Pay from savings. When Pay from savings is refused because funding arrived, the funding shown stays as it was until the next refresh.
  • Retry stays hidden after an exit needs funding again. Payment Pending stops checking the exit once it offers to cancel the payment. If the exit then needs funding again after a rebuild, the cancel fails and Retry stays hidden until Payment Pending is reopened (fix: release savings payments a force transfer no longer needs #2142 (comment)).
  • Declining the cancellation fee can block Retry. releaseApproved is saved before the fee dialog. If the user dismisses it and the exit later needs a top-up, Retry stays unavailable even after Payment Pending is reopened. Save it only once the fee is approved, and keep recovery for an authorized release (PaykitPaymentProofRepo.kt, fix: release savings payments a force transfer no longer needs #2142 (review)).
  • Retry and Pay from savings are offered when dispatch would refuse them. When an unconfirmed payment from another wallet already covers the funding, retry dispatch refuses. Payment Pending still offers Retry and takes the user through fee approval, and Progress still offers Pay from savings. Offer both from the same funding eligibility check, and recheck it before dispatch (SendPendingViewModel.kt, SparkExitViewModel.kt, same review).
  • The fee reminder can be missed when covering funding drops out. A savings hold that expires while an unconfirmed output plus a smaller confirmed one cover the fee sends no reminder. If the unconfirmed output then disappears, Progress asks for the rest, but the worker has no hold transition left to notify on, and the confirmed partial payment suppresses the first-funding reminder (SparkExitRepo.kt, SparkExitWorker.kt, fix: keep the force transfer's fee request in step with the savings send #2155 (review)).
  • An empty journal and one address read can release a hold too early. An accepted attempt replaced after local follow-up, followed by an interrupted preparation, can leave the journal empty. If the funding host hasn't seen the accepted payment yet (missing counters read as zero), the hold is released and a new request shows while that payment may still arrive. Check whether that sequence is reachable, and require more evidence before releasing if it is (SparkExitRepo.kt, SparkExitChain.kt, same review).
  • A failed funding read can undo the reduced request. The fallback only reuses a read from the same tick, so a failed read publishes the full request while a partial payment seen earlier still counts. This predates fix: keep the force transfer's fee request in step with the savings send #2155 (SparkExitRepo.kt, same review).
  • A stop mid-retry can end the hold too early. A savings payment paid again from Progress keeps the journal's attempt rejected until the retry's outcome is saved. A stop in between relaunches with the attempt still rejected, which ends the hold, so the ask shows again while the retried transaction may still land. Tell a retry in flight from one a node refused before ending the hold.

Activity

  1. added theissue type on Nov 27, 2026
  2. added this to the 3.2.0 milestone on Nov 27, 2026
  3. ovitrif commented on Nov 27, 2026

    @ovitrif
    CollaboratorAuthor

    Moved to 3.2.0: these are Spark exit bugs found while fixing #2142, and 3.2.0 isn't cut yet, so the fix ships with the Spark release.

  4. self-assigned this
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions