Skip to content

Commit 5e1b5b1

Browse files
committed
close: spec is final, it's not experimental.
That was quick! Signed-off-by: Rusty Russell <[email protected]>
1 parent 021f4a1 commit 5e1b5b1

12 files changed

+14
-60
lines changed

doc/lightning-close.7

+5-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-close.7.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ friends to upgrade!
3333

3434
The *fee_negotiation_step* parameter controls how closing fee
3535
negotiation is performed assuming the peer proposes a fee that is
36-
different than our estimate. (Note that using this option
37-
prevents **experimental-quick-close**, as the quick-close protocol
38-
does not allow negotiation).
36+
different than our estimate. (Note that modern peers use the quick-close protocol which does not allow negotiation: see *feerange* instead).
3937

4038
On every negotiation step we must give up
4139
some amount from our proposal towards the peer's proposal. This parameter
@@ -65,10 +63,10 @@ can rescue openings which have been manually miscreated.
6563
(option_will_fund), we prevent initiation of a mutual close
6664
unless this flag is passed in. Defaults to false.
6765

68-
6966
*feerange* is an optional array [ *min*, *max* ], indicating the
70-
minimum and maximum feerates to offer. *slow* and *unilateral_close*
71-
are the defaults.
67+
minimum and maximum feerates to offer: the peer will obey these if it
68+
supports the quick-close protocol. *slow* and *unilateral_close* are
69+
the defaults.
7270

7371
Rates are one of the strings *urgent* (aim for next block), *normal*
7472
(next 4 blocks or so) or *slow* (next 100 blocks or so) to use

doc/lightning-listconfigs.7

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-listconfigs.7.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ On success, an object is returned, containing:
5555
- **experimental-dual-fund** (boolean, optional): `experimental-dual-fund` field from config or cmdline, or default
5656
- **experimental-onion-messages** (boolean, optional): `experimental-onion-messages` field from config or cmdline, or default
5757
- **experimental-offers** (boolean, optional): `experimental-offers` field from config or cmdline, or default
58-
- **experimental-quick-close** (boolean, optional): `experimental-quick-close` field from config or cmdline, or default
5958
- **experimental-shutdown-wrong-funding** (boolean, optional): `experimental-shutdown-wrong-funding` field from config or cmdline, or default
6059
- **rgb** (hex, optional): `rgb` field from config or cmdline, or default (always 6 characters)
6160
- **alias** (string, optional): `alias` field from config or cmdline, or default
@@ -205,4 +204,4 @@ RESOURCES
205204
---------
206205

207206
Main web site: <https://github.com/ElementsProject/lightning>
208-
[comment]: # ( SHA256STAMP:7b449305a5b0826a80672002d99e02d9c852c2757acc9d3ea2dea91d9cafafc1)
207+
[comment]: # ( SHA256STAMP:ad98179a7b6254a936d4fde179918b6a975e186adcbc396917a0c2ed2888519e)

doc/lightningd-config.5

+1-11
Original file line numberDiff line numberDiff line change
@@ -625,16 +625,6 @@ about whether to add funds or not to a proposed channel is handled
625625
automatically by a plugin that implements the appropriate logic for
626626
your needs\. The default behavior is to not contribute funds\.
627627

628-
629-
\fBexperimental-quick-close\fR
630-
631-
632-
Specifying this means we send our range of acceptable fees to the peer
633-
on mutual close\. If they support it too, we'll simply use that for
634-
closing (unless \fIfee_negotiation_step\fR is set, see \fBlightning-close\fR(7))\.
635-
We always use this on channels which negotiation \fBoption_anchor_outputs\fR,
636-
as the spec requires that\.
637-
638628
.SH BUGS
639629

640630
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
660650
Note: the modules in the ccan/ directory have their own licenses, but
661651
the rest of the code is covered by the BSD-style MIT license\.
662652

663-
\" SHA256STAMP:0d2474276b325cb002191211fb1d0da2409ebc859ff3ccc6dd3e688b10d4550c
653+
\" SHA256STAMP:1c392f3fee66dc6c1fc2c34200204a9be1d79e53fd5fb1720ad169fc671f71c0

doc/lightningd-config.5.md

-8
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,6 @@ about whether to add funds or not to a proposed channel is handled
517517
automatically by a plugin that implements the appropriate logic for
518518
your needs. The default behavior is to not contribute funds.
519519

520-
**experimental-quick-close**
521-
522-
Specifying this means we send our range of acceptable fees to the peer
523-
on mutual close. If they support it too, we'll simply use that for
524-
closing (unless *fee_negotiation_step* is set, see lightning-close(7)).
525-
We always use this on channels which negotiation `option_anchor_outputs`,
526-
as the spec requires that.
527-
528520
BUGS
529521
----
530522

doc/schemas/listconfigs.schema.json

-4
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@
117117
"type": "boolean",
118118
"description": "`experimental-offers` field from config or cmdline, or default"
119119
},
120-
"experimental-quick-close": {
121-
"type": "boolean",
122-
"description": "`experimental-quick-close` field from config or cmdline, or default"
123-
},
124120
"experimental-shutdown-wrong-funding": {
125121
"type": "boolean",
126122
"description": "`experimental-shutdown-wrong-funding` field from config or cmdline, or default"

lightningd/closing_control.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,8 @@ void peer_start_closingd(struct channel *channel,
312312
channel->shutdown_scriptpubkey[REMOTE],
313313
channel->closing_fee_negotiation_step,
314314
channel->closing_fee_negotiation_step_unit,
315-
(ld->use_quickclose
316315
/* Don't quickclose if they specified how to negotiate! */
317-
&& channel->closing_fee_negotiation_step == 50
316+
(channel->closing_fee_negotiation_step == 50
318317
&& channel->closing_fee_negotiation_step_unit == CLOSING_FEE_NEGOTIATION_STEP_UNIT_PERCENTAGE)
319318
/* Always use quickclose with anchors */
320319
|| channel->option_anchor_outputs,

lightningd/lightningd.c

-5
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
295295
* case this is a pointer to an enum feerate-indexed array of values */
296296
ld->force_feerates = NULL;
297297

298-
/*~ We don't enable new network features until they've been approved
299-
* and tested in the spec (i.e. some other implementation has also
300-
* implemented and tested!). Until then we use a flag: */
301-
ld->use_quickclose = false;
302-
303298
return ld;
304299
}
305300

lightningd/lightningd.h

-3
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ struct lightningd {
283283
/* Should we re-exec ourselves instead of just exiting? */
284284
bool try_reexec;
285285

286-
/* --experimental-quick-close */
287-
bool use_quickclose;
288-
289286
/* Array of (even) TLV types that we should allow. This is required
290287
* since we otherwise would outright reject them. */
291288
u64 *accept_extra_tlv_types;

lightningd/options.c

-4
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,6 @@ static void register_opts(struct lightningd *ld)
10621062
"--subdaemon=hsmd:remote_signer "
10631063
"would use a hypothetical remote signing subdaemon.");
10641064

1065-
opt_register_noarg("--experimental-quick-close",
1066-
opt_set_bool, &ld->use_quickclose,
1067-
"EXPERIMENTAL: offer range to mutual close");
1068-
10691065
opt_register_logging(ld);
10701066
opt_register_version();
10711067

tests/test_closing.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ def get_mempool_when_size_1():
446446
assert opts['expected_close_fee'] == fee_mempool
447447

448448

449-
@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation")
450449
def test_closing_negotiation_step_30pct(node_factory, bitcoind, chainparams):
451450
"""Test that the closing fee negotiation step works, 30%"""
452451
opts = {}
@@ -461,7 +460,6 @@ def test_closing_negotiation_step_30pct(node_factory, bitcoind, chainparams):
461460
closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
462461

463462

464-
@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation")
465463
def test_closing_negotiation_step_50pct(node_factory, bitcoind, chainparams):
466464
"""Test that the closing fee negotiation step works, 50%, the default"""
467465
opts = {}
@@ -476,7 +474,6 @@ def test_closing_negotiation_step_50pct(node_factory, bitcoind, chainparams):
476474
closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
477475

478476

479-
@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation")
480477
def test_closing_negotiation_step_100pct(node_factory, bitcoind, chainparams):
481478
"""Test that the closing fee negotiation step works, 100%"""
482479
opts = {}
@@ -496,7 +493,6 @@ def test_closing_negotiation_step_100pct(node_factory, bitcoind, chainparams):
496493
closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
497494

498495

499-
@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation")
500496
def test_closing_negotiation_step_1sat(node_factory, bitcoind, chainparams):
501497
"""Test that the closing fee negotiation step works, 1sat"""
502498
opts = {}
@@ -511,7 +507,6 @@ def test_closing_negotiation_step_1sat(node_factory, bitcoind, chainparams):
511507
closing_negotiation_step(node_factory, bitcoind, chainparams, opts)
512508

513509

514-
@unittest.skipIf(EXPERIMENTAL_FEATURES, "anchors uses quick-close, not negotiation")
515510
def test_closing_negotiation_step_700sat(node_factory, bitcoind, chainparams):
516511
"""Test that the closing fee negotiation step works, 700sat"""
517512
opts = {}
@@ -3331,7 +3326,7 @@ def test_anysegwit_close_needs_feature(node_factory, bitcoind):
33313326

33323327
def test_close_feerate_range(node_factory, bitcoind, chainparams):
33333328
"""Test the quick-close fee range negotiation"""
3334-
l1, l2 = node_factory.line_graph(2, opts={'experimental-quick-close': None})
3329+
l1, l2 = node_factory.line_graph(2)
33353330

33363331
# Lowball the range here.
33373332
l1.rpc.close(l2.info['id'], feerange=['253perkw', 'normal'])

0 commit comments

Comments
 (0)