Conversation
c844b52 to
4a306f1
Compare
64fc2b7 to
8134ed7
Compare
t-bast
reviewed
Sep 23, 2025
Member
t-bast
left a comment
There was a problem hiding this comment.
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!
modules/core/src/commonMain/kotlin/fr/acinq/lightning/channel/ChannelException.kt
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/crypto/NonceGenerator.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/wire/ChannelTlv.kt
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/wire/ChannelTlv.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/io/Peer.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/io/Peer.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/channel/Commitments.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
modules/core/src/commonMain/kotlin/fr/acinq/lightning/channel/InteractiveTx.kt
Outdated
Show resolved
Hide resolved
1a582e3 to
ae677ee
Compare
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.
ae677ee to
8de4883
Compare
* 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
approved these changes
Oct 7, 2025
Member
t-bast
left a comment
There was a problem hiding this comment.
LGTM, I'll add more tests in a follow-up PR!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the companion PR to ACINQ/eclair#3103.
It includes support for splicing, including upgrading to taproot channels: