Skip to content
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

Feature/ln dlc/handle ldk auto closing #138

Merged

Conversation

Tibo-lg
Copy link
Contributor

@Tibo-lg Tibo-lg commented Aug 15, 2023

This PR enables the SubChannelManager to react to force closing events from LDK. To achieve this, a couple of things were needed:

  • Stop relying on LDK to sign transactions that are not LN specific (mainly makes things cleaner)
  • Get ability to directly update the funding tx of the LDK channel monitor (through the LDK chain monitor)

Not all states are properly covered for now as it's not clear how to get LDK to trigger force closes in some of the states.

@Tibo-lg Tibo-lg force-pushed the feature/ln-dlc/handle-ldk-auto-closing branch 6 times, most recently from 2492275 to 0ed53a9 Compare August 16, 2023 00:17
@Tibo-lg Tibo-lg force-pushed the feature/ln-dlc/handle-ldk-auto-closing branch from 0ed53a9 to f8716ae Compare August 16, 2023 00:18
@Tibo-lg Tibo-lg marked this pull request as ready for review August 16, 2023 00:22
@Tibo-lg Tibo-lg requested a review from luckysori August 16, 2023 00:22
Copy link
Collaborator

@luckysori luckysori left a comment

Choose a reason for hiding this comment

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

Nice work!

dlc-manager/src/sub_channel_manager.rs Outdated Show resolved Hide resolved
dlc-manager/src/sub_channel_manager.rs Outdated Show resolved Hide resolved
dlc-manager/src/sub_channel_manager.rs Outdated Show resolved Hide resolved
dlc-manager/src/sub_channel_manager.rs Outdated Show resolved Hide resolved
dlc-manager/src/sub_channel_manager.rs Show resolved Hide resolved
dlc-manager/src/sub_channel_manager.rs Outdated Show resolved Hide resolved
@@ -24,7 +24,8 @@ impl_dlc_writeable!(SubChannel, {
(is_offer, writeable),
(own_fund_pk, writeable),
(counter_fund_pk, writeable),
(counter_party_secrets, writeable)
(counter_party_secrets, writeable),
(channel_keys_id, writeable)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note to self: this breaks all pre-existing channels.

dlc-manager/tests/ln_dlc_channel_execution_tests.rs Outdated Show resolved Hide resolved
@Tibo-lg Tibo-lg force-pushed the feature/ln-dlc/handle-ldk-auto-closing branch from 77c80d3 to 22af6ba Compare August 24, 2023 07:35
@Tibo-lg Tibo-lg force-pushed the feature/ln-dlc/handle-ldk-auto-closing branch from 22af6ba to 6ec92ae Compare August 24, 2023 11:06
@Tibo-lg Tibo-lg merged commit 2e9c5c6 into feature/ln-dlc-channels Aug 31, 2023
188 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants