Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Feb 9, 2024

Implement option_simple_close as defined in lightning/bolts#1205
This is a pre-requisite for taproot channels that is already supported by eclair.

@t-bast t-bast force-pushed the option-simple-close branch from 79f3e0e to 48b7348 Compare March 27, 2024 15:32
@t-bast t-bast force-pushed the option-simple-close branch 2 times, most recently from 7b7e5ae to 433fc10 Compare January 21, 2025 11:38
@t-bast t-bast force-pushed the option-simple-close branch 2 times, most recently from c0d3dc1 to c650799 Compare January 21, 2025 17:10
@t-bast t-bast force-pushed the option-simple-close branch 3 times, most recently from 737819a to f379f68 Compare February 14, 2025 10:16
@t-bast t-bast marked this pull request as ready for review February 25, 2025 15:21
The spec allows the closer to use an OP_RETURN output if their amount is
too low when using `option_simple_close`.
We update the `Negotiating` state to exchange the `closing_complete` and
`closing_sig` messages, and allow RBF-ing previous transactions and
updating our closing script.

We stay in that state until one of the transactions confirms, or a force
close is detected. This is important to ensure we're able to correctly
reconnect and negotiate RBF candidates.
@t-bast t-bast force-pushed the option-simple-close branch from f379f68 to db7b908 Compare February 26, 2025 16:00
@t-bast t-bast requested review from pm47 and sstone March 6, 2025 18:26
Copy link
Member

@pm47 pm47 left a comment

Choose a reason for hiding this comment

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

LGTM.

Tested against eclair in nominal and RBF cases.

Copy link
Member

@sstone sstone left a comment

Choose a reason for hiding this comment

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

LGTM, just one question

t-bast added 3 commits March 19, 2025 10:16
We add a completable `replyTo` to the mutual close command, which
returns the closing `txId` and its fees once signed by our peer.

This requires waiting for HTLCs to be settled before we can move
to the closing state and exchange signatures.
Instead of partially storing parts of the command in the various
channel states, we directly store the whole command. This makes
it easier to detect whether we initiated closing or if the remote
node did.
@t-bast t-bast merged commit 7fae0fa into master Mar 20, 2025
2 checks passed
@t-bast t-bast deleted the option-simple-close branch March 20, 2025 17:29
pm47 added a commit to ACINQ/phoenixd that referenced this pull request Apr 16, 2025
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