Skip to content

Conversation

@wpaulino
Copy link
Contributor

@wpaulino wpaulino commented Nov 3, 2025

Upon processing the counterparty's initial commitment_signed for a splice, we queue a monitor update with the new commitment transactions spending the new funding transaction. Once handled, funding transaction signatures can be exchanged and we must start monitoring the chain for a possible commitment transaction broadcast spending the new funding transaction. Aborting the splice negotiation then would therefore be unsafe, hence why we currently force close in such cases. However, there is no reason to force close prior to receiving their initial commitment_signed, as this would imply the funding transaction signatures have yet to be exchanged, thus making a commitment broadcast spending said transaction impossible allowing us to abort the splice negotiation safely.

Upon processing the counterparty's initial `commitment_signed` for a
splice, we queue a monitor update with the new commitment transactions
spending the new funding transaction. Once handled, funding transaction
signatures can be exchanged and we must start monitoring the chain for a
possible commitment transaction broadcast spending the new funding
transaction. Aborting the splice negotiation then would therefore be
unsafe, hence why we currently force close in such cases. However, there
is no reason to force close prior to receiving their initial
`commitment_signed`, as this would imply the funding transaction
signatures have yet to be exchanged, thus making a commitment broadcast
spending said transaction impossible allowing us to abort the splice
negotiation safely.
@wpaulino wpaulino requested a review from jkczyz November 3, 2025 21:44
@wpaulino wpaulino self-assigned this Nov 3, 2025
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Nov 3, 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.

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 79.66102% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.30%. Comparing base (3f96d12) to head (d282a47).

Files with missing lines Patch % Lines
lightning/src/ln/interactivetxs.rs 0.00% 30 Missing ⚠️
lightning/src/ln/functional_test_utils.rs 66.66% 3 Missing and 1 partial ⚠️
lightning/src/ln/splicing_tests.rs 97.05% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4204      +/-   ##
==========================================
+ Coverage   89.28%   89.30%   +0.02%     
==========================================
  Files         180      180              
  Lines      137913   138055     +142     
  Branches   137913   138055     +142     
==========================================
+ Hits       123134   123293     +159     
+ Misses      12163    12150      -13     
+ Partials     2616     2612       -4     
Flag Coverage Δ
fuzzing 32.58% <5.10%> (+0.96%) ⬆️
tests 88.71% <79.66%> (+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.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Only kinda skimmed the test changes, but code diff lgtm. One thing we should probably make sure to do is add splicing logic to chanmon_consistency and have a hard-coded seed for doing a splice in full_stack. That should give us somewhat-okay coverage of the debug assertions and test accidental force-closes (not that either would have caught this, just a general note).

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

funding_negotiation,
FundingNegotiation::AwaitingSignatures { .. }
);
if counterparty_aborted {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we condition on counterparty_aborted? Would it be a problem if always do the new check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we don't, then we would always reset the splice state when we haven't received their initial commitment_signed.

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.

4 participants