Skip to content

Cross channel Splice testing #8363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ddustin
Copy link
Collaborator

@ddustin ddustin commented Jun 18, 2025

Implemented a test for a splice-in into two channels at the same time using one transaction.

The test revealed three issues:

  1. We need to sign the shared output earlier in the splicing process 52bd2db
  2. We need to ignore SIGHASH setting while computing interactive-tx diffs a9d1dbf
  3. Some signatures were dropped when passing between the two splices a9d1dbf

This PR fixes those issues, adds a pytest for them, and makes basic two channel splices work, lets goooo 🔥

@ddustin ddustin force-pushed the ddustin/cross_splice_testing branch 6 times, most recently from 4c4360f to 165e36b Compare June 19, 2025 22:34
@ddustin ddustin added this to the v25.09 milestone Jul 20, 2025
ddustin added 10 commits July 20, 2025 15:44
Make the failure reason more clear by adding more information to the signature failure message.
We used to use a check on the active psbt to see if our splice signature was in it — but now we need to generate the signature early.

So we have to add a field tracking if we’ve sent it and add it to the database, wire protocols, and inflight objects.
Use the new i_sent_sigs field to track if we’ve sent our peer our user sigs.
Previous behavior was to fail on abort when we have signatures in the inflight — change this behavior to fail on abort if we have sent our peer our signatures.
When doing a multi channel splice, we need to break the deadlock by signing the shared output early (even though it is not sent to the peer until later).
Add more information to funding issue failure messages when splicing
Adding verbose logging option to introspect into what interactive tx is doing with inputs.
When doing a cross channel splice, inputs move from having no SIGHASH to having SIGHASH_ALL assigned.

This causes psbt_get_changeset to flag the input as having changed, as the sighash value is compared.

This causes the second channel splice to `tx_remove_input` the input as it doesn’t match anymore, breaking the splice.

We fix this by removing the sighash value from input comparisions.
Since the signature data may vary, we must copy the new psbt into splicing->current_psbt.

This never occured during normal operation, but when doing a cross splice there may be vital signature(s) in the psbt that came from another splice that get dropped without this step.
A python test that splices into two channels at the same time with on transaction.

Changelog-Added: Adding support for cross-channel splicing.
@ddustin ddustin force-pushed the ddustin/cross_splice_testing branch 6 times, most recently from bb28681 to deddba8 Compare July 22, 2025 11:46
This should help debug failed ping responses showing up in CI.
@ddustin ddustin force-pushed the ddustin/cross_splice_testing branch 4 times, most recently from 1daf975 to e13b398 Compare July 22, 2025 19:36
@ddustin ddustin force-pushed the ddustin/cross_splice_testing branch from e13b398 to 2c29e41 Compare July 22, 2025 23:49
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.

1 participant