Skip to content

Fund BOLT12 LSPS2 test service per JIT channel - #1241

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-11-fix-bolt12-lsps2-restart
Nov 18, 2026
Merged

tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-11-fix-bolt12-lsps2-restart

Conversation

@tnull

@tnull tnull commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

The BOLT12 LSPS2 integration test has failed consistently since it landed together with the funding-input locks. Its service holds a single coin but opens three JIT channels without syncing in between. Because the first funding transaction is withheld until the client claims, its input stays locked and the service has no funds left for the second JIT channel after the client restarts.

Fund the service with one coin per JIT channel, mirroring how the BOLT11 LSPS2 integration test was adapted for the same locks. The locks themselves are correct: without them, the service would have double-spent the same coin across the funding transactions.

Co-Authored-By: HAL 9000

@ldk-reviews-bot

ldk-reviews-bot commented Nov 17, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @jkczyz as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull tnull added this to the 0.8 milestone Nov 17, 2026
@tnull
tnull requested review from jkczyz and removed request for joostjager November 17, 2026 13:26

@jkczyz jkczyz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor corrections.

🤖 The commit message says the first funding transaction's input stays locked because the transaction is withheld until the client claims. But the client claims that payment before the restart. The lock holds until the wallet sees the funding transaction confirm, and the test mines no blocks after the JIT channels open. The restart doesn't matter either. Maybe:

The BOLT12 LSPS2 integration test has failed consistently since it
landed together with the funding-input locks. Its service holds a
single coin but opens three JIT channels without mining or syncing in
between. A funding transaction's inputs stay locked until the wallet
sees it confirm, and the wallet learns of its change only from a sync,
so the service has no coin left for the second JIT channel.

Comment thread tests/integration_tests_rust.rs Resolved
The BOLT12 LSPS2 integration test has failed consistently since it
landed together with the funding-input locks. Its service holds a
single coin but opens three JIT channels without mining or syncing in
between. A funding transaction's inputs stay locked until the wallet
sees it confirm, and the wallet learns of its change only from a sync,
so the service has no coin left for the second JIT channel.

Fund the service with one coin per JIT channel, mirroring how the
BOLT11 LSPS2 integration test was adapted for the same locks. The
locks themselves are correct: without them, the service would have
double-spent the same coin across the funding transactions.

Co-Authored-By: HAL 9000
@tnull
tnull force-pushed the 2026-11-fix-bolt12-lsps2-restart branch from 5a4ee7a to caceee0 Compare November 18, 2026 09:07
@tnull
tnull requested a review from jkczyz November 18, 2026 09:13
@tnull
tnull merged commit 8f909b3 into lightningdevkit:main Nov 18, 2026
14 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants