Infrastructure517 words3 min decode

Core Lightning Adds Tool to Recover Stuck Lightning Payments After Data Loss

Core Lightning can now reclaim pending Lightning payments from a peer's closing transaction even after losing channel data, Bitcoin Optech's Nov. 20 newsletter details.

Bitcoin Lightning operators could recover stuck payments even after losing channel data
WitnessBitcoin Lightning operators could recover stuck payments even after losing channel datablickpixel / pixabay

Outputs

  1. Bitcoin Optech covered the feature in its Nov. 20 newsletter and Nov. 24 podcast recap.

  2. Both recovery paths require a matching unspent output in the closing transaction.

  3. Recovery claims must confirm on Bitcoin before the peer reclaims the same output after timelock expiry.

  4. The tool produces signed transactions for manual review and broadcast.

  5. Restoring an outdated database can permanently lose funds, the recovery guide warns.

Core Lightning, one of the main implementations of the Bitcoin Lightning Network, can now recover pending payments even after an operator loses channel data, Bitcoin Optech reported in its Nov. 20 newsletter and revisited in its Nov. 24 podcast recap.

That's the core fact. Lightning channels lock funds in multisig contracts, and payments in flight sit in outputs encumbered by timelocks and hashlocks. If a node operator loses their database, those in-flight payments were previously at risk of vanishing with the peer's closing transaction.

What was already recoverable, and what wasn't

Core Lightning's existing recovery process handles the operator's main channel balance. It works when the peer posts a closing transaction the recovering node has never seen. The wallet recovery guide describes using the node secret plus an emergency channel backup to reclaim the main balance after a peer force-closes the channel.

Pending payments were the gap. A closing transaction sets aside an output for each payment still in flight. Until now, those outputs sat out of reach for an operator who had lost their data.

The new tool addresses exactly that output. It reconstructs the spending conditions for each payment the operator wants to recover, then checks them against the actual closing transaction, and skips payments too small to have an output at all. It produces signed transactions for the operator to review and broadcast manually. No blind broadcasting, no automation — the operator stays in the loop.

What does this change for node operators?

Two scenarios split the recovery paths. Both require a matching output in the closing transaction that remains unspent.

For a payment the operator offered, the tool's manual says the operator needs the payment hash and the expiry. Once the timelock expires, the operator can reclaim those funds.

For a payment the peer offered, the operator needs the preimage — the secret that matches the payment hash. Here timing matters. The operator's claim must confirm on Bitcoin before the peer reclaims the same output. Once the timelock expires, the peer can take the funds back, and the window closes.

The operator needs the original node secret, the peer's closing transaction, channel identifiers and key information, plus the details for each payment they want to recover. A cooperating peer can supply the public commitment point tied to the closing transaction while keeping its private keys and commitment secrets private — so cooperation doesn't require anyone to expose sensitive material.

The standing caveat

The recovery guide carries a warning that hasn't changed: restoring an outdated database can permanently lose funds. Recovering a pending payment therefore depends on having enough information to reconstruct that particular output before its timelock expires. The tool widens what's recoverable, but it doesn't remove the operator's responsibility to keep current backups.

With manual review built into the workflow, expect node operators running Core Lightning to fold the tool into their incident runbooks ahead of the next forced-close scenario — and expect the broader Lightning ecosystem to keep chipping away at data-loss edge cases as channel capacity grows.

via cryptonews.net (Source)

More from Marcus Bennett

Marcus Bennett

Show full bio

Senior reporter covering money, funding and market shifts around crypto and web3 industry at Mempool Brief.

1,817 articles