forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openingd: work harder to intuit OPT_SCID_ALIAS.
option_scid_alias inside a channel_type allows for more private channels: in particular, it tells the peer that it MUST NOT allow routing via the real short channel id, and MUST use the alias. It only makes sense (and is only permitted!) on unannounced channels. Unfortunately, we didn't set this bit in the channel_type in v12.0 when it was introduced, instead relying on the presence of the feature bit with the peer. This was fixed in 23.05, but: 1. Prior to 23.05 we didn't allow it to be set at all, and 2. LND has a limited set of features they allow, and this isn't allowed without option_anchors_zero_fee_htlc_tx. We could simply drop this channel_type until we merge anchors, *but* that has nasty privacy implications (you can probe the real channel id). So, if we don't negotiate anchors (we don't!), we don't set this channel_type bit even if we want it, and *intuit* it, based on: 1. Is this a non-anchor channel_type? 2. Did we both send channel_type? 3. Is this an unannounced channel? 4. Did both peers announce support for scid aliases? In addition, while looking at the previous backwards-compat code, I realized that v23.05 violated the spec and send accept_channel with OPT_SCID_ALIAS if it intuited it, even if it wasn't offered. Stop doing this, but allow our peers to. Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: Fix incompatibility with LND which prevented us opening private channels Fixes: ElementsProject#6208
- Loading branch information
1 parent
50a7681
commit adeb7d8
Showing
3 changed files
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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