Skip to content

Conversation

@sstone
Copy link
Member

@sstone sstone commented Sep 4, 2025

This is the companion PR to ACINQ/eclair#3103.
It includes support for splicing, including upgrading to taproot channels:

  • All new channels will use the "simple taproot channels" format.
  • All existing channels will be upgraded to taproot during the first splicing operation

@sstone sstone force-pushed the simple-taproot-channels branch 4 times, most recently from c844b52 to 4a306f1 Compare September 16, 2025 15:34
@sstone sstone force-pushed the simple-taproot-channels branch 3 times, most recently from 64fc2b7 to 8134ed7 Compare September 18, 2025 17:46
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

That doesn't look too bad, it's simpler than in eclair. I've focused on the topics you were requesting feedback on for this first pass, but otherwise the rest looks pretty good. Once those comments are addressed I think we can import the remaining unit tests from eclair, add e2e tests with eclair, and we should be ready to move forward with it!

@sstone sstone force-pushed the simple-taproot-channels branch 2 times, most recently from 1a582e3 to ae677ee Compare September 29, 2025 12:58
sstone added 2 commits October 1, 2025 18:07
This matches changes done on Eclair, and adds support for taproot channels (including splices) with the same TLV extensions.
Support for signing commit tx with alternative feerates is not implemented.
* Always use Taproot channel type

It was missing in several cases, and the `OpenChannel` command allowed
using other channel types.

* nit: refactor scripts and transactions

* Refactor commitments

We refactor `Commitments.kt` to better match `eclair` and clean up
pattern matching (use exhaustive, future-proof pattern matching).

We also remove alternative feerate sigs, which aren't necessary
anymore since we can now use package relay. The ACINQ node will
stop sending `update_fee` and will keep the commitment feerate
at `1 sat/byte`.

* Refactor `interactive-tx` management

Error handling was missing from a few places (incorrectly assuming that
nonces were already provided and signature couldn't fail). We also use
exhaustive pattern matching everywhere, and clean-up the nonces and
funding tx index parameters.

We also revert some formatting nits, which make the file inconsistent.

* Fix closing RBF nonce management

The nonce management was incomplete for mutual close RBF (see changes
to `Negotiating.kt`). We must add unit tests to catch those bugs.

Mutual close was also not working properly because `revoke_and_ack`
nonces weren't taken into account in the `ShuttingDown` state.

We also refactor the nonce fields in the various channel states, in
which some nonces where unnecessary (e.g. already contained in the
`shutdown` message).

We make the ordering of fields consistent: `remoteNextCommitNonces`
always comes right after `commitments`, since it should always be
filled (for taproot channels) and is necessary to update the
`commitments`.

* Switch tests to taproot channel type

We switch almost all existing tests to use the taproot channel type.
We fix a few bugs found by the existing test suite:

- preimage extraction from HTLC transactions was missing
- channel_ready didn't contain local commit nonces
- channel_reestablish nonces had an off-by-one in the commit index
@t-bast t-bast marked this pull request as ready for review October 6, 2025 16:24
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

LGTM, I'll add more tests in a follow-up PR!

@sstone sstone merged commit bb72a06 into master Oct 7, 2025
3 of 4 checks passed
@sstone sstone deleted the simple-taproot-channels branch October 7, 2025 09:16
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.

2 participants