BoltzExchange / boltz-backend

Boltz Backend
https://boltz.exchange
GNU Affero General Public License v3.0
108 stars 41 forks source link

Implement internal timeout for invoice payments #609

Open maybeast opened 1 month ago

maybeast commented 1 month ago

Current Situation

When we're unable to process an invoice payment for 10 minutes, we reset LND's mission control. This reduces the node's routing efficiency and is not ideal, especially if it continues for hours.

Proposed Solution

Introduce a configurable internal timeout (X) that would allow the system to either:

  1. Attempt the payment using another available node, or
  2. Mark the swap as invoice.failedToPay

Benefits

  1. Improved node efficiency: Prevents prolonged periods of reduced routing efficiency caused by frequent mission control resets.
  2. Enhanced user experience: Invoices that cannot be paid will fail faster, resulting in quicker refunds for users.
kilrau commented 1 month ago

Good stuff, how about limiting resetmcs to e.g. 3 per swap for now for faster failing? As currently CLN is still not available for paying invoices...