diff --git a/doc/lightning-close.7 b/doc/lightning-close.7 index 1148fc571..eba084438 100644 --- a/doc/lightning-close.7 +++ b/doc/lightning-close.7 @@ -35,9 +35,7 @@ friends to upgrade! The \fIfee_negotiation_step\fR parameter controls how closing fee negotiation is performed assuming the peer proposes a fee that is -different than our estimate\. (Note that using this option -prevents \fBexperimental-quick-close\fR, as the quick-close protocol -does not allow negotiation)\. +different than our estimate\. (Note that modern peers use the quick-close protocol which does not allow negotiation: see \fIfeerange\fR instead)\. On every negotiation step we must give up @@ -80,8 +78,9 @@ unless this flag is passed in\. Defaults to false\. \fIfeerange\fR is an optional array [ \fImin\fR, \fImax\fR ], indicating the -minimum and maximum feerates to offer\. \fIslow\fR and \fIunilateral_close\fR -are the defaults\. +minimum and maximum feerates to offer: the peer will obey these if it +supports the quick-close protocol\. \fIslow\fR and \fIunilateral_close\fR are +the defaults\. Rates are one of the strings \fIurgent\fR (aim for next block), \fInormal\fR @@ -155,4 +154,4 @@ ZmnSCPxj \fI is mainly responsible\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:94359c9d63107e5558c7f9cec137899a057f2d172df08f4a78de8fe09defb440 +\" SHA256STAMP:1182e596ddf208f37d269e37b06e30199b8d6b6bc1373d92096557c20ad437ac diff --git a/doc/lightning-close.7.md b/doc/lightning-close.7.md index 1a25b071f..89a368151 100644 --- a/doc/lightning-close.7.md +++ b/doc/lightning-close.7.md @@ -33,9 +33,7 @@ friends to upgrade! The *fee_negotiation_step* parameter controls how closing fee negotiation is performed assuming the peer proposes a fee that is -different than our estimate. (Note that using this option -prevents **experimental-quick-close**, as the quick-close protocol -does not allow negotiation). +different than our estimate. (Note that modern peers use the quick-close protocol which does not allow negotiation: see *feerange* instead). On every negotiation step we must give up some amount from our proposal towards the peer's proposal. This parameter @@ -65,10 +63,10 @@ can rescue openings which have been manually miscreated. (option_will_fund), we prevent initiation of a mutual close unless this flag is passed in. Defaults to false. - *feerange* is an optional array [ *min*, *max* ], indicating the -minimum and maximum feerates to offer. *slow* and *unilateral_close* -are the defaults. +minimum and maximum feerates to offer: the peer will obey these if it +supports the quick-close protocol. *slow* and *unilateral_close* are +the defaults. Rates are one of the strings *urgent* (aim for next block), *normal* (next 4 blocks or so) or *slow* (next 100 blocks or so) to use diff --git a/doc/lightning-listconfigs.7 b/doc/lightning-listconfigs.7 index 33467aaba..1ef66bf32 100644 --- a/doc/lightning-listconfigs.7 +++ b/doc/lightning-listconfigs.7 @@ -90,8 +90,6 @@ On success, an object is returned, containing: .IP \[bu] \fBexperimental-offers\fR (boolean, optional): \fBexperimental-offers\fR field from config or cmdline, or default .IP \[bu] -\fBexperimental-quick-close\fR (boolean, optional): \fBexperimental-quick-close\fR field from config or cmdline, or default -.IP \[bu] \fBexperimental-shutdown-wrong-funding\fR (boolean, optional): \fBexperimental-shutdown-wrong-funding\fR field from config or cmdline, or default .IP \[bu] \fBrgb\fR (hex, optional): \fBrgb\fR field from config or cmdline, or default (always 6 characters) @@ -272,4 +270,4 @@ Vincenzo Palazzo \fI wrote the initial versi Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:fd8f2ae862627712b6baf51741670a6d60db8342f839580871617deed0c75317 +\" SHA256STAMP:b6e48314de5642ec61a3e2c989ac0197630c2a3c0e8e6d86020b597679049400 diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md index 088e1e426..7c71339d5 100644 --- a/doc/lightning-listconfigs.7.md +++ b/doc/lightning-listconfigs.7.md @@ -55,7 +55,6 @@ On success, an object is returned, containing: - **experimental-dual-fund** (boolean, optional): `experimental-dual-fund` field from config or cmdline, or default - **experimental-onion-messages** (boolean, optional): `experimental-onion-messages` field from config or cmdline, or default - **experimental-offers** (boolean, optional): `experimental-offers` field from config or cmdline, or default -- **experimental-quick-close** (boolean, optional): `experimental-quick-close` field from config or cmdline, or default - **experimental-shutdown-wrong-funding** (boolean, optional): `experimental-shutdown-wrong-funding` field from config or cmdline, or default - **rgb** (hex, optional): `rgb` field from config or cmdline, or default (always 6 characters) - **alias** (string, optional): `alias` field from config or cmdline, or default @@ -206,4 +205,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:8b198154e70e1c0acb6c9ccdbe9e41e35ddab55738be9ea9076c5384da965cb8) +[comment]: # ( SHA256STAMP:7bb40fc8fac201b32d9701b02596d0fa59eb14a3baf606439cbf96dc11548ed4) diff --git a/doc/lightningd-config.5 b/doc/lightningd-config.5 index ab532cf79..82ba48ce2 100644 --- a/doc/lightningd-config.5 +++ b/doc/lightningd-config.5 @@ -625,16 +625,6 @@ about whether to add funds or not to a proposed channel is handled automatically by a plugin that implements the appropriate logic for your needs\. The default behavior is to not contribute funds\. - - \fBexperimental-quick-close\fR - - -Specifying this means we send our range of acceptable fees to the peer -on mutual close\. If they support it too, we'll simply use that for -closing (unless \fIfee_negotiation_step\fR is set, see \fBlightning-close\fR(7))\. -We always use this on channels which negotiation \fBoption_anchor_outputs\fR, -as the spec requires that\. - .SH BUGS You should report bugs on our github issues page, and maybe submit a fix @@ -660,4 +650,4 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Note: the modules in the ccan/ directory have their own licenses, but the rest of the code is covered by the BSD-style MIT license\. -\" SHA256STAMP:0d2474276b325cb002191211fb1d0da2409ebc859ff3ccc6dd3e688b10d4550c +\" SHA256STAMP:1c392f3fee66dc6c1fc2c34200204a9be1d79e53fd5fb1720ad169fc671f71c0 diff --git a/doc/lightningd-config.5.md b/doc/lightningd-config.5.md index 48f33fad0..488db84c9 100644 --- a/doc/lightningd-config.5.md +++ b/doc/lightningd-config.5.md @@ -517,14 +517,6 @@ about whether to add funds or not to a proposed channel is handled automatically by a plugin that implements the appropriate logic for your needs. The default behavior is to not contribute funds. - **experimental-quick-close** - -Specifying this means we send our range of acceptable fees to the peer -on mutual close. If they support it too, we'll simply use that for -closing (unless *fee_negotiation_step* is set, see lightning-close(7)). -We always use this on channels which negotiation `option_anchor_outputs`, -as the spec requires that. - BUGS ---- diff --git a/doc/schemas/listconfigs.schema.json b/doc/schemas/listconfigs.schema.json index 6a77f8e05..877cea210 100644 --- a/doc/schemas/listconfigs.schema.json +++ b/doc/schemas/listconfigs.schema.json @@ -117,10 +117,6 @@ "type": "boolean", "description": "`experimental-offers` field from config or cmdline, or default" }, - "experimental-quick-close": { - "type": "boolean", - "description": "`experimental-quick-close` field from config or cmdline, or default" - }, "experimental-shutdown-wrong-funding": { "type": "boolean", "description": "`experimental-shutdown-wrong-funding` field from config or cmdline, or default" diff --git a/lightningd/closing_control.c b/lightningd/closing_control.c index ceb04dbb3..ccf189a99 100644 --- a/lightningd/closing_control.c +++ b/lightningd/closing_control.c @@ -312,9 +312,8 @@ void peer_start_closingd(struct channel *channel, channel->shutdown_scriptpubkey[REMOTE], channel->closing_fee_negotiation_step, channel->closing_fee_negotiation_step_unit, - (ld->use_quickclose /* Don't quickclose if they specified how to negotiate! */ - && channel->closing_fee_negotiation_step == 50 + (channel->closing_fee_negotiation_step == 50 && channel->closing_fee_negotiation_step_unit == CLOSING_FEE_NEGOTIATION_STEP_UNIT_PERCENTAGE) /* Always use quickclose with anchors */ || channel->option_anchor_outputs, diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 303a1aa10..83d6ed44b 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -295,11 +295,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx) * case this is a pointer to an enum feerate-indexed array of values */ ld->force_feerates = NULL; - /*~ We don't enable new network features until they've been approved - * and tested in the spec (i.e. some other implementation has also - * implemented and tested!). Until then we use a flag: */ - ld->use_quickclose = false; - return ld; } diff --git a/lightningd/lightningd.h b/lightningd/lightningd.h index b9516bbd9..329279576 100644 --- a/lightningd/lightningd.h +++ b/lightningd/lightningd.h @@ -283,9 +283,6 @@ struct lightningd { /* Should we re-exec ourselves instead of just exiting? */ bool try_reexec; - /* --experimental-quick-close */ - bool use_quickclose; - /* Array of (even) TLV types that we should allow. This is required * since we otherwise would outright reject them. */ u64 *accept_extra_tlv_types; diff --git a/lightningd/options.c b/lightningd/options.c index f56662dfc..aff8b090b 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -1062,10 +1062,6 @@ static void register_opts(struct lightningd *ld) "--subdaemon=hsmd:remote_signer " "would use a hypothetical remote signing subdaemon."); - opt_register_noarg("--experimental-quick-close", - opt_set_bool, &ld->use_quickclose, - "EXPERIMENTAL: offer range to mutual close"); - opt_register_logging(ld); opt_register_version(); diff --git a/tests/test_closing.py b/tests/test_closing.py index a3b8e0ff7..9dc68f61d 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -461,21 +461,6 @@ def test_closing_negotiation_step_30pct(node_factory, bitcoind, chainparams): closing_negotiation_step(node_factory, bitcoind, chainparams, opts) -@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation") -def test_closing_negotiation_step_50pct(node_factory, bitcoind, chainparams): - """Test that the closing fee negotiation step works, 50%, the default""" - opts = {} - opts['fee_negotiation_step'] = '50%' - - opts['close_initiated_by'] = 'opener' - opts['expected_close_fee'] = 20334 if not chainparams['elements'] else 25789 - closing_negotiation_step(node_factory, bitcoind, chainparams, opts) - - opts['close_initiated_by'] = 'peer' - opts['expected_close_fee'] = 20334 if not chainparams['elements'] else 25789 - closing_negotiation_step(node_factory, bitcoind, chainparams, opts) - - @unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation") def test_closing_negotiation_step_100pct(node_factory, bitcoind, chainparams): """Test that the closing fee negotiation step works, 100%""" @@ -3331,7 +3316,7 @@ def test_anysegwit_close_needs_feature(node_factory, bitcoind): def test_close_feerate_range(node_factory, bitcoind, chainparams): """Test the quick-close fee range negotiation""" - l1, l2 = node_factory.line_graph(2, opts={'experimental-quick-close': None}) + l1, l2 = node_factory.line_graph(2) # Lowball the range here. l1.rpc.close(l2.info['id'], feerange=['253perkw', 'normal'])