Skip to content

Conversation

@ddustin
Copy link
Collaborator

@ddustin ddustin commented Aug 13, 2025

Enable cross channel splices in splice script

@ddustin ddustin force-pushed the ddustin/cross_splice_script branch 4 times, most recently from 3f5ce3e to a8b6647 Compare August 16, 2025 14:13
@ddustin ddustin force-pushed the ddustin/cross_splice_script branch from bcf603c to 858ca51 Compare November 11, 2025 00:02
@madelinevibes madelinevibes added this to the v26.03 milestone Dec 8, 2025
@ddustin ddustin force-pushed the ddustin/cross_splice_script branch 2 times, most recently from ac2e3b1 to b072bbb Compare January 20, 2026 17:57
Turns on mutli channel splices in splice script and adds a test for it.

Changelog-Changed: Splice script now supports splicing over multiple channels
@ddustin ddustin force-pushed the ddustin/cross_splice_script branch 3 times, most recently from 3c71acb to 4b44e19 Compare January 20, 2026 19:02
`bitcoin_tx_input_weight` already adds the prefix byte for counting the witness items
In splicing logs we’re often outputting msat values next to sat values, making understanding the logs difficult.

Adding a way to output msats as sats with a decimal makes these logs much easier to read.
Since channeld handles splicing, it makes sense that it knows the opening feerate now. This is needed for rounding out splice script errors and logging.
On the rare chance a channel id starts with 02 or 03 we need to check of it’s referring to a channel before parsing it node id, instead of after.
Here we update `psbt_input_get_weight` to allow the caller to specify what kind of input size estimation they would like. Before it was just “zero witness bytes” which we now move to the default behavior and add an assumption option for P2WSH -> 2of2 multisig which is what we typically see in splicing.

At the same time we move channeld over to using the opening feerate estimation instead of the less useful “max feerate.” We make splice script use this same feerate.

After auditing the feerates for these two places against each other and the actually created transaction, we implement some fixes making them all match.

While we’re here, we add relevant debug log messages.

Changelog-Changed: Audited and updated splice’s feerate calculations to be precise to the byte — a critical change to accomodate splice script.
When using wetlog we might not also have debug log enabled.
In some splice script failure modes, some memory is leaked.

These don’t occur in normal operation — just when an error occurs.

This cleans up those memory leaks.
Enable feerate checks for the test now that they’re working well
Work is still in progress!
@ddustin ddustin force-pushed the ddustin/cross_splice_script branch 7 times, most recently from fca6294 to a1c8215 Compare January 22, 2026 03:18
@ddustin ddustin force-pushed the ddustin/cross_splice_script branch from a1c8215 to 89e3067 Compare January 22, 2026 03:55
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.

2 participants