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 @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.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 92.34043% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.75%. Comparing base (3ce8204) to head (0095e2a).

Files with missing lines Patch % Lines
lightning/src/ln/splicing_tests.rs 93.33% 10 Missing and 11 partials ⚠️
lightning/src/ln/channelmanager.rs 82.35% 5 Missing and 4 partials ⚠️
lightning/src/ln/channel.rs 91.78% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4122      +/-   ##
==========================================
+ Coverage   88.72%   88.75%   +0.03%     
==========================================
  Files         180      180              
  Lines      135528   135891     +363     
  Branches   135528   135891     +363     
==========================================
+ Hits       120241   120615     +374     
+ Misses      12517    12505      -12     
- Partials     2770     2771       +1     
Flag Coverage Δ
fuzzing 21.69% <0.00%> (-0.04%) ⬇️
tests 88.60% <92.34%> (+0.03%) ⬆️

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.

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 4bd54f0 to 0095e2a Compare October 9, 2025 17:03
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.

Dual-funded channels and Splicing Project Tracking
2 participants