Skip to content

Conversation

wpaulino
Copy link
Contributor

This is crucial for peers that serve liquidity for low-availability (i.e., mobile) nodes. We should allow users to queue a splice request while the peer is offline, such that it is negotiated once reconnected. Note that there currently isn't a way to time out/cancel these requests, this is planned for the near future.

The test added also includes coverage for 0-conf splices, which didn't work because they lacked test coverage to begin with.

Depends on #4079.
Fixes #1621 (comment).

@wpaulino wpaulino added this to the 0.2 milestone Sep 25, 2025
@wpaulino wpaulino requested a review from jkczyz September 25, 2025 00:25
@wpaulino wpaulino self-assigned this Sep 25, 2025
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 25, 2025

👋 Thanks for assigning @TheBlueMatt 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.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 91.33192% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.79%. Comparing base (b6607a7) to head (5452f15).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/splicing_tests.rs 93.31% 10 Missing and 11 partials ⚠️
lightning/src/ln/channelmanager.rs 80.35% 9 Missing and 2 partials ⚠️
lightning/src/ln/channel.rs 87.50% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4122      +/-   ##
==========================================
+ Coverage   88.77%   88.79%   +0.01%     
==========================================
  Files         180      180              
  Lines      136622   137002     +380     
  Branches   136622   137002     +380     
==========================================
+ Hits       121293   121649     +356     
- Misses      12517    12533      +16     
- Partials     2812     2820       +8     
Flag Coverage Δ
fuzzing 20.95% <0.00%> (-0.04%) ⬇️
tests 88.63% <91.33%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 2nd Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 3rd Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 4th Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 5th Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 6th Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@wpaulino wpaulino force-pushed the test-splice-while-disconnected branch from 4bd54f0 to 0095e2a Compare October 9, 2025 17:03
@TheBlueMatt
Copy link
Collaborator

Needs rebase now.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

Just some nits.

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

@wpaulino wpaulino force-pushed the test-splice-while-disconnected branch from 0095e2a to 1cbf91c Compare October 14, 2025 22:33
Splices negotiated with 0 confirmations require that we immediately lock
it after exchanging `tx_signatures`.
This is crucial for peers that serve liquidity for low-availability
(i.e., mobile) nodes. We should allow users to queue a splice request
while the peer is offline, such that it is negotiated once reconnected.
Note that there currently isn't a way to time out/cancel these requests,
this is planned for the near future.
Since we don't yet support contributing to an incoming splice, we need
to make sure we attempt our splice negotiation eventually if the
counterparty was also attempting a splice at the same time but they won
the quiescence tie-breaker. Since only one pending splice (without RBF)
is allowed at a time, we do this after the existing splice becomes
locked.
We'll use this in the next commit to test that we'll send a stfu message
for a splice we intend to initiate upon reconnecting.
@wpaulino wpaulino force-pushed the test-splice-while-disconnected branch from 1cbf91c to 5452f15 Compare October 14, 2025 22:37
@TheBlueMatt
Copy link
Collaborator

Gonna go ahead and land this and backport it so we can get an RC out. @jkczyz can take a look at it after the RC is out.

@TheBlueMatt TheBlueMatt merged commit 05f2848 into lightningdevkit:main Oct 16, 2025
24 of 25 checks passed
@wpaulino wpaulino deleted the test-splice-while-disconnected branch October 17, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dual-funded channels and Splicing Project Tracking

4 participants