mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
2d53707611
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 <rusty@rustcorp.com.au> Changelog-Fixed: Fix incompatibility with LND which prevented us opening private channels Fixes: #6208 |
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
dualopend_wire.csv | ||
dualopend.c | ||
Makefile | ||
openingd_wire.csv | ||
openingd.c |