From 12c96f26d3f7277d6221442cd32ed982aaa6d415 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 20 Apr 2022 07:24:04 +0930 Subject: [PATCH] connectd: disable advertizement of WEBSOCKET addresses. This seems to prevent broad propagation, due to LND not allowing it. See https://github.com/lightningnetwork/lnd/issues/6432 We still announce it if you disable deprecated-apis, so tests still work, and hopefully we can enable it in future. Fixes: #5196 Signed-off-by: Rusty Russell Changelog-EXPERIMENTAL: Protocol: disabled websocket announcement due to LND propagation issues --- CHANGELOG.md | 4 +++- connectd/connectd.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e52fbbab8a4..fc300ef59744 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This release named by Simon Vrouwe; this marks the name change to core-lightning - Protocol: we now support opening multiple channels with the same peer. ([#5078]) - Protocol: we send/receive IP addresses in `init`, and send updated node_announcement when two peers report the same remote_addr (`disable-ip-discovery` suppresses this announcement). ([#5052]) + - Protocol: we more aggressively send our own gossip, to improve propagation chances. ([#5200]) - Plugins: `cln-grpc` first class GRPC interface for remotely controlling nodes over mTLS authentication; set `grpc-port` to activate ([#5013]) - Database: With the `sqlite3://` scheme for `--wallet` option, you can now specify a second file path for real-time database backup by separating it from the main file path with a `:` character. ([#4890]) - Protocol: `pay` (and decode, etc) supports bolt11 payment_metadata a-la https://github.com/lightning/bolts/pull/912 ([#5086]) @@ -96,7 +97,7 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes. - Fixed `experimental-websocket-port` to work with default addresses. ([#4945]) - Protocol: removed support for v0.10.1 onion messages. ([#4921]) - Protocol: Ability to announce DNS addresses ([#4829]) - + - Protocol: disabled websocket announcement due to LND propagation issues ([#5200]) [#4829]: https://github.com/ElementsProject/lightning/pull/4829 @@ -141,6 +142,7 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes. [#5130]: https://github.com/ElementsProject/lightning/pull/5130 [#5136]: https://github.com/ElementsProject/lightning/pull/5136 [#5146]: https://github.com/ElementsProject/lightning/pull/5146 +[#5200]: https://github.com/ElementsProject/lightning/pull/5200 [0.11.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.0 ## [0.10.2] - 2021-11-03: Bitcoin Dust Consensus Rule diff --git a/connectd/connectd.c b/connectd/connectd.c index daa159f660ba..3a313216e802 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -1397,10 +1397,15 @@ setup_listeners(const tal_t *ctx, * different type. */ if (tal_count(*announceable) != 0) { - wireaddr_from_websocket(&addr.u.wireaddr, - daemon->websocket_port); - add_announceable(announceable, - &addr.u.wireaddr); + /* See https://github.com/lightningnetwork/lnd/issues/6432: + * if we add websocket to the node_announcement, it doesn't propagate. + * So we do not do this for now in general! */ + if (!deprecated_apis) { + wireaddr_from_websocket(&addr.u.wireaddr, + daemon->websocket_port); + add_announceable(announceable, + &addr.u.wireaddr); + } } else { status_unusual("Bound to websocket %s," " but we cannot announce"