You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And `next_per_commitment_point` to explictly `second_per_commitment_point`;
this is particularly important since `channel_ready` can be retransmitted
after the channel has been in use, for example.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@@ -70,8 +70,8 @@ must broadcast the funding transaction to the Bitcoin network. After
70
70
the `funding_signed` message is sent/received, both sides should wait
71
71
for the funding transaction to enter the blockchain and reach the
72
72
specified depth (number of confirmations). After both sides have sent
73
-
the `funding_locked` message, the channel is established and can begin
74
-
normal operation. The `funding_locked` message includes information
73
+
the `channel_ready` message, the channel is established and can begin
74
+
normal operation. The `channel_ready` message includes information
75
75
that will be used to construct channel authentication proofs.
76
76
77
77
@@ -82,8 +82,8 @@ that will be used to construct channel authentication proofs.
82
82
| A |--(3)-- funding_created --->| B |
83
83
| |<-(4)-- funding_signed -----| |
84
84
| | | |
85
-
| |--(5)--- funding_locked ---->| |
86
-
| |<-(6)--- funding_locked -----| |
85
+
| |--(5)--- channel_ready ---->| |
86
+
| |<-(6)--- channel_ready -----| |
87
87
+-------+ +-------+
88
88
89
89
- where node A is 'funder' and node B is 'fundee'
@@ -471,21 +471,20 @@ use `option_static_remotekey`, `option_anchor_outputs` or
471
471
`option_static_remotekey`, and the superior one is favored if more than one
472
472
is negotiated.
473
473
474
-
### The `funding_locked` Message
474
+
### The `channel_ready` Message
475
475
476
-
This message indicates that the funding transaction has reached the `minimum_depth` asked for in `accept_channel`. Once both nodes have sent this, the channel enters normal operating mode.
476
+
This message (which used to be called `funding_locked`) indicates that the funding transaction has sufficient confirms for channel use. Once both nodes have sent this, the channel enters normal operating mode.
477
477
478
-
Note that `minimum_depth` can be 0 if the accepter trusts the opener,
479
-
in which case this message is a misnomer. The opener is free to send this
480
-
message at any time (since it presumably trusts itself).
478
+
Note that the opener is free to send this message at any time (since it presumably trusts itself), but the
479
+
accepter would usually wait until the funding has reached the `minimum_depth` asked for in `accept_channel`.
481
480
482
-
1. type: 36 (`funding_locked`)
481
+
1. type: 36 (`channel_ready`)
483
482
2. data:
484
483
*[`channel_id`:`channel_id`]
485
-
*[`point`:`next_per_commitment_point`]
486
-
*[`funding_locked_tlvs`:`tlvs`]
484
+
*[`point`:`second_per_commitment_point`]
485
+
*[`channel_ready_tlvs`:`tlvs`]
487
486
488
-
1.`tlv_stream`: `funding_locked_tlvs`
487
+
1.`tlv_stream`: `channel_ready_tlvs`
489
488
2. types:
490
489
1. type: 1 (`short_channel_id`)
491
490
2. data:
@@ -494,12 +493,12 @@ message at any time (since it presumably trusts itself).
494
493
#### Requirements
495
494
496
495
The sender:
497
-
- MUST NOT send `funding_locked` unless outpoint of given by `funding_txid` and
496
+
- MUST NOT send `channel_ready` unless outpoint of given by `funding_txid` and
498
497
`funding_output_index` in the `funding_created` message pays exactly `funding_satoshis` to the scriptpubkey specified in [BOLT #3](03-transactions.md#funding-transaction-output).
499
498
- if it is not the node opening the channel:
500
499
- SHOULD wait until the funding transaction has reached `minimum_depth` before
501
500
sending this message.
502
-
- MUST set `next_per_commitment_point` to the per-commitment point to be used
501
+
- MUST set `second_per_commitment_point` to the per-commitment point to be used
503
502
for commitment transaction #1, derived as specified in
- MUST always recognize the `alias` as a `short_channel_id` for incoming HTLCs to this channel.
517
516
- if `channel_type` has `option_scid_alias` set:
518
517
- MUST NOT allow incoming HTLCs to this channel using the real `short_channel_id`
519
-
- MAY send multiple `funding_locked` messages to the same peer with different `alias` values.
518
+
- MAY send multiple `channel_ready` messages to the same peer with different `alias` values.
520
519
- otherwise:
521
520
- MUST wait until the funding transaction has reached `minimum_depth` before sending this message.
522
521
@@ -532,7 +531,7 @@ The receiver:
532
531
- if `channel_type` has `option_scid_alias` set:
533
532
- MUST NOT use the real `short_channel_id` in BOLT 11 `r` fields.
534
533
535
-
From the point of waiting for `funding_locked` onward, either node MAY
534
+
From the point of waiting for `channel_ready` onward, either node MAY
536
535
send an `error` and fail the channel if it does not receive a required response from the
537
536
other node after a reasonable timeout.
538
537
@@ -598,7 +597,7 @@ along with the `scriptpubkey` it wants to be paid to.
598
597
A sending node:
599
598
- if it hasn't sent a `funding_created` (if it is a funder) or a `funding_signed` (if it is a fundee):
600
599
- MUST NOT send a `shutdown`
601
-
- MAY send a `shutdown` before a `funding_locked`, i.e. before the funding transaction has reached `minimum_depth`.
600
+
- MAY send a `shutdown` before a `channel_ready`, i.e. before the funding transaction has reached `minimum_depth`.
602
601
- if there are updates pending on the receiving node's commitment transaction:
603
602
- MUST NOT send a `shutdown`.
604
603
- MUST NOT send an `update_add_htlc` after a `shutdown`.
@@ -620,7 +619,7 @@ A receiving node:
620
619
- SHOULD send an `error` and fail the channel.
621
620
- if the `scriptpubkey` is not in one of the above forms:
622
621
- SHOULD send a `warning`.
623
-
- if it hasn't sent a `funding_locked` yet:
622
+
- if it hasn't sent a `channel_ready` yet:
624
623
- MAY reply to a `shutdown` message with a `shutdown`
625
624
- once there are no outstanding updates on the peer, UNLESS it has already sent a `shutdown`:
626
625
- MUST reply to a `shutdown` message with a `shutdown`
@@ -770,7 +769,7 @@ the closing transaction will likely never reach miners.
770
769
771
770
## Normal Operation
772
771
773
-
Once both nodes have exchanged `funding_locked` (and optionally [`announcement_signatures`](07-routing-gossip.md#the-announcement_signatures-message)), the channel can be used to make payments via Hashed Time Locked Contracts.
772
+
Once both nodes have exchanged `channel_ready` (and optionally [`announcement_signatures`](07-routing-gossip.md#the-announcement_signatures-message)), the channel can be used to make payments via Hashed Time Locked Contracts.
774
773
775
774
Changes are sent in batches: one or more `update_` messages are sent before a
776
775
`commitment_signed` message, as in the following diagram:
@@ -1424,12 +1423,12 @@ The sending node:
1424
1423
A node:
1425
1424
- if `next_commitment_number` is 1 in both the `channel_reestablish` it
1426
1425
sent and received:
1427
-
- MUST retransmit `funding_locked`.
1426
+
- MUST retransmit `channel_ready`.
1428
1427
- otherwise:
1429
-
- MUST NOT retransmit `funding_locked`, but MAY send `funding_locked` with
1428
+
- MUST NOT retransmit `channel_ready`, but MAY send `channel_ready` with
1430
1429
a different `short_channel_id``alias` field.
1431
1430
- upon reconnection:
1432
-
- MUST ignore any redundant `funding_locked` it receives.
1431
+
- MUST ignore any redundant `channel_ready` it receives.
1433
1432
- if `next_commitment_number` is equal to the commitment number of
1434
1433
the last `commitment_signed` message the receiving node has sent:
1435
1434
- MUST reuse the same commitment number for its next `commitment_signed`.
@@ -1497,7 +1496,7 @@ atomic: if it doesn't complete, it starts again. The only exception
1497
1496
is if the `funding_signed` message is sent but not received. In
1498
1497
this case, the funder will forget the channel, and presumably open
1499
1498
a new one upon reconnection; meanwhile, the other node will eventually forget
1500
-
the original channel, due to never receiving `funding_locked` or seeing
1499
+
the original channel, due to never receiving `channel_ready` or seeing
1501
1500
the funding transaction on-chain.
1502
1501
1503
1502
There's no acknowledgment for `error`, so if a reconnect occurs it's
@@ -1533,7 +1532,7 @@ commitment number 0 is created during opening.
1533
1532
`commitment_signed` for commitment number 1 is send and then
1534
1533
the revocation for commitment number 0 is received.
1535
1534
1536
-
`funding_locked` is implicitly acknowledged by the start of normal
1535
+
`channel_ready` is implicitly acknowledged by the start of normal
1537
1536
operation, which is known to have begun after a `commitment_signed` has been
1538
1537
received — hence, the test for a `next_commitment_number` greater
Copy file name to clipboardExpand all lines: 09-features.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,9 @@ The Context column decodes as follows:
42
42
| 22/23 |`option_anchors_zero_fee_htlc_tx`| Anchor commitment type with zero fee HTLC transactions | IN |`option_static_remotekey`|[BOLT #3][bolt03-htlc-tx], [lightning-dev][ml-sighash-single-harmful]|
43
43
| 26/27 |`option_shutdown_anysegwit`| Future segwit versions allowed in `shutdown`| IN ||[BOLT #2][bolt02-shutdown]|
44
44
| 44/45 |`option_channel_type`| Node supports the `channel_type` field in open/accept | IN ||[BOLT #2](02-peer-protocol.md#the-open_channel-message)|
45
-
| 46/47 |`option_scid_alias`| Supply channel aliases for routing | IN ||[BOLT #2][bolt02-funding-locked]|
45
+
| 46/47 |`option_scid_alias`| Supply channel aliases for routing | IN ||[BOLT #2][bolt02-channel-ready]|
46
46
| 48/49 | `option_payment_metadata` | Payment metadata in tlv record | 9 | | [BOLT #11](11-payment-encoding.md#tagged-fields)
0 commit comments