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

Work around LND bug 6039 #2507

Merged
merged 2 commits into from Aug 22, 2023
Merged

Conversation

TheBlueMatt
Copy link
Collaborator

LND hasn't properly handled shutdown messages ever, and force-closes any time we send one while HTLCs are still present. The issue is tracked at
lightningnetwork/lnd#6039 and has had multiple patches to fix it but none so far have managed to land upstream. The issue appears to be very low priority for the LND team despite being marked "P1".

We're not going to bother handling this in a sensible way, instead simply repeated the Shutdown message on repeat until morale improves.

LND hasn't properly handled shutdown messages ever, and
force-closes any time we send one while HTLCs are still present.
The issue is tracked at
lightningnetwork/lnd#6039 and has had
multiple patches to fix it but none so far have managed to land
upstream. The issue appears to be very low priority for the LND
team despite being marked "P1".

We're not going to bother handling this in a sensible way, instead
simply repeated the Shutdown message on repeat until morale
improves.
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.66% 🎉

Comparison is base (d4ad826) 90.40% compared to head (b149279) 91.07%.
Report is 7 commits behind head on main.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2507      +/-   ##
==========================================
+ Coverage   90.40%   91.07%   +0.66%     
==========================================
  Files         106      106              
  Lines       56268    63310    +7042     
  Branches    56268    63310    +7042     
==========================================
+ Hits        50868    57657    +6789     
- Misses       5400     5653     +253     
Files Changed Coverage Δ
lightning/src/events/mod.rs 47.95% <100.00%> (+5.43%) ⬆️
lightning/src/ln/channel.rs 91.93% <100.00%> (+2.46%) ⬆️
lightning/src/ln/channelmanager.rs 89.64% <100.00%> (+4.11%) ⬆️
lightning/src/ln/msgs.rs 85.35% <100.00%> (ø)
lightning/src/ln/shutdown_tests.rs 98.52% <100.00%> (+0.06%) ⬆️

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

wpaulino
wpaulino previously approved these changes Aug 21, 2023
Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

I'm not too happy with just continuously re-sending shutdown, but doing anything smarter is likely not worth the complexity. Hopefully they can get this fixed when implementing the new co-op close.

@TheBlueMatt
Copy link
Collaborator Author

Yea, its an absolutely awful solution, but I really dont want to write more crap just for LND. We might consider also sending a warning message just to say "hey, you're broken, please upgrade", but also didn't bother. I could add that if we want.

@dunxen
Copy link
Contributor

dunxen commented Aug 21, 2023

We might consider also sending a warning message just to say "hey, you're broken, please upgrade", but also didn't bother. I could add that if we want.

Might be worth it out of generosity, but not a blocker imho.

dunxen
dunxen previously approved these changes Aug 21, 2023
@TheBlueMatt TheBlueMatt dismissed stale reviews from dunxen and wpaulino via b149279 August 21, 2023 23:05
@TheBlueMatt
Copy link
Collaborator Author

Alright, fair, I added a warning message push.

@tnull tnull merged commit 8f02430 into lightningdevkit:main Aug 22, 2023
14 checks passed
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.

None yet

5 participants