Skip to content

Support decoding HTLC onions once fully committed#2845

Merged
TheBlueMatt merged 15 commits intolightningdevkit:mainfrom
wpaulino:decode-htlc-onion-when-committed
Mar 28, 2024
Merged

Support decoding HTLC onions once fully committed#2845
TheBlueMatt merged 15 commits intolightningdevkit:mainfrom
wpaulino:decode-htlc-onion-when-committed

Conversation

@wpaulino
Copy link
Copy Markdown
Contributor

Currently, we decode HTLC onions immediately upon receiving an update_add_htlc. Doing so determines what we should do with the HTLC: forward it, or immediately fail it back if it cannot be accepted. This action is tracked until the HTLC is fully committed to by both sides, and a new commitment in the latter case is proposed to fully remove the HTLC. While this has worked so far, it has some minor privacy implications, as forwarding/failing back do not go through the usual PendingHTLCsForwardable flow. It also presents issues with the quiescence handshake, as failures through this path do not go through the holding cell abstraction, leading to a potential violation of the protocol by sending an update_fail_* after already having sent stfu.

This PR aims to support, but does not enable, decoding incoming HTLC onions once HTLCs are fully committed to by both sides instead. Unfortunately, switching over is not a forwards compatible change, so we'll need to do so over multiple releases.

Loading
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.

5 participants