From ba2c912a3949016c317190f37bceca5f31f7c844 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 25 Jan 2024 10:58:52 +1030 Subject: [PATCH] config: remove disable-ip-discovery Changelog-Removed: Config: `disable-ip-discovery` (deprecated in v23.02): use `announce-addr-discovered` Signed-off-by: Rusty Russell --- doc/getting-started/getting-started/configuration.md | 12 ++++++++---- doc/lightning-listconfigs.7.md | 3 +-- doc/schemas/listconfigs.schema.json | 5 ----- lightningd/options.c | 8 -------- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/doc/getting-started/getting-started/configuration.md b/doc/getting-started/getting-started/configuration.md index 3a6beb818..fc1a9317d 100644 --- a/doc/getting-started/getting-started/configuration.md +++ b/doc/getting-started/getting-started/configuration.md @@ -286,10 +286,6 @@ The [`lightning-listconfigs`](ref:lightning-listconfigs) command will output a v Default: unset (no limit). Sets the maximum allowed HTLC value for newly created channels. If you want to change the `htlc_maximum_msat` for existing channels, use the RPC call [`lightning-setchannel`](ref:lightning-setchannel). -- **disable-ip-discovery** - - Turn off public IP discovery to send `node_announcement` updates that contain the discovered IP with TCP port 9735 as announced address. If unset and you open TCP port 9735 on your router towards your node, your node will remain connectable on changing IP addresses. Note: Will always be disabled if you use 'always-use-proxy'. - ### Lightning channel and HTLC options - **watchtime-blocks**=_BLOCKS_ @@ -428,6 +424,14 @@ If a 'DNS' hostname was given that resolves to a local interface, the daemon wil Set to _true_ (default is \_false), this so that names given as arguments to **addr** and \_announce-addr\*\* are published in node announcement messages as names, rather than IP addresses. Please note that most mainnet nodes do not yet use, read or propagate this information correctly. +- **announce-addr-discovered**=_true/false/auto_ + + Controls public IP discovery: peers can tell us what they see our IP address as, so we can send `node_announcement` updates that contain the discovered IP as announced address. `auto` (the default) means only to use this if we have no other announced addresses. Note: Will always be disabled if you set **always-use-proxy**. + +- **announce-addr-discovered-port**=_PORT_ + + The port to advertize for for the IP address **announce-addr-discovered** (default 9735). You should open this TCP port on your router towards your node. + - **offline** Do not bind to any ports, and do not try to reconnect to any peers. This can be useful for maintenance and forensics, so is usually specified on the command line. Overrides all _addr_ and _bind-addr_ options. diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md index 610c074f2..1e728567b 100644 --- a/doc/lightning-listconfigs.7.md +++ b/doc/lightning-listconfigs.7.md @@ -342,7 +342,6 @@ On success, an object is returned, containing: - **autolisten** (boolean, optional): `autolisten` field from config or cmdline, or default **deprecated, removal in v24.05** - **proxy** (string, optional): `proxy` field from config or cmdline, or default **deprecated, removal in v24.05** - **disable-dns** (boolean, optional): `true` if `disable-dns` was set in config or cmdline **deprecated, removal in v24.05** -- **disable-ip-discovery** (boolean, optional): `true` if `disable-ip-discovery` was set in config or cmdline **deprecated, removal in v23.11** - **announce-addr-discovered** (string, optional): `true`/`false`/`auto` depending on how `announce-addr-discovered` was set in config or cmdline **deprecated, removal in v24.05** *(added v23.02)* - **announce-addr-discovered-port** (integer, optional): Sets the announced TCP port for dynamically discovered IPs. **deprecated, removal in v24.05** *(added v23.02)* - **encrypted-hsm** (boolean, optional): `true` if `encrypted-hsm` was set in config or cmdline **deprecated, removal in v24.05** @@ -480,4 +479,4 @@ RESOURCES Main web site: -[comment]: # ( SHA256STAMP:245e056bdda7c8015917c89e243a0fd3bdd1512ca760da5d7f0a284cb3214ef7) +[comment]: # ( SHA256STAMP:cbd485cba5ad5295f6d47bb612b2ce51ad94f07f3bbf2e1db4cd9f5d45ecb6e3) diff --git a/doc/schemas/listconfigs.schema.json b/doc/schemas/listconfigs.schema.json index bc307d191..8441769b6 100644 --- a/doc/schemas/listconfigs.schema.json +++ b/doc/schemas/listconfigs.schema.json @@ -1685,11 +1685,6 @@ "type": "boolean", "description": "`true` if `disable-dns` was set in config or cmdline" }, - "disable-ip-discovery": { - "deprecated": "v23.02", - "type": "boolean", - "description": "`true` if `disable-ip-discovery` was set in config or cmdline" - }, "announce-addr-discovered": { "deprecated": "v23.08", "type": "string", diff --git a/lightningd/options.c b/lightningd/options.c index 9610903d9..d97da0341 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -1254,13 +1254,6 @@ static char *opt_set_db_upgrade(const char *arg, struct lightningd *ld) return opt_set_bool_arg(arg, ld->db_upgrade_ok); } -static char *opt_disable_ip_discovery(struct lightningd *ld) -{ - log_broken(ld->log, "--disable-ip-discovery has been deprecated, use --announce-addr-discovered=false"); - ld->config.ip_discovery = OPT_AUTOBOOL_FALSE; - return NULL; -} - static char *opt_set_announce_dns(const char *optarg, struct lightningd *ld) { if (!ld->deprecated_apis) @@ -1529,7 +1522,6 @@ static void register_opts(struct lightningd *ld) ld, "Set an IP address (v4 or v6) or .onion v3 to announce, but not listen on"); - opt_register_noarg("--disable-ip-discovery", opt_disable_ip_discovery, ld, opt_hidden); opt_register_arg("--announce-addr-discovered", opt_set_autobool_arg, opt_show_autobool, &ld->config.ip_discovery, "Explicitly turns IP discovery 'on' or 'off'.");