Skip to content

bug: refused paykit retry can clear a pending same-invoice payment's proof #2124

Backlog

Description

@ovitrif

Description

A Paykit Lightning payment refused at submission is treated as unsent: the manual path fails its proof, and an automatic payment also releases its allowance reservation. Spark can refuse a retry at submission while an earlier transfer of the same invoice still holds under the same key (SparkRepo.kt). If a separate send of the same invoice turns uncertain after the request resolves its endpoint and before LightningRepo starts its checks, that refusal may clear the request's proof, or release the allowance reservation (PaykitPaymentProofRepo.failLightningPayment, PaykitAllowanceExecutor). If the earlier transfer then settles, the request can lose its receipt or allowance accounting.

The ordering is unconfirmed. Raised in review of #2070: #2070 (review)

Expected

A refusal at submission that leaves an earlier transfer of the same invoice pending keeps that transfer's pending outcome. It does not clear the request's proof or release its allowance reservation.

Activity

  1. added this to the 3.3.0 milestone on Nov 26, 2026
  2. added theissue type on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions