Skip to content

Commit 9137aed

Browse files
committed
BOLT lightning#2: fill in descriptions and requirements for remaining fields.
1 parent 5e40cf2 commit 9137aed

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

02-peer-protocol.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ signature, it will broadcast the funding transaction.
199199
* [2:output_index]
200200
* [64:signature]
201201

202-
FIXME: describe
203-
204202
#### Requirements
205203

206-
The recipient MUST fail the channel if the signature is invalid.
204+
The sender MUST set `temporary-channel-id` the same as the `temporary-channel-id` in the `open_channel` message. The sender MUST set `txid` to the transaction ID to a non-malleably transaction, which it MUST NOT broadcast, and MUST set `output_index` to output number of that transaction which corresponds the funding transaction output as defined in [BOLT #3](03-transactions.md#funding-transaction-output), and MUST set `signature` to the valid signature using its `funding-pubkey` for the initial commitment transaction as defined in [BOLT #3](03-transactions.md#commitment-transaction).
205+
206+
The recipient MUST fail the channel if `signature` is incorrect.
207207

208208
### The `funding_signed` message
209209

@@ -218,7 +218,9 @@ redeem their funds if they need to.
218218

219219
#### Requirements
220220

221-
FIXME: Describe
221+
The sender MUST set `temporary-channel-id` the same as the `temporary-channel-id` in the `open_channel` message, and MUST set `signature` to the valid signature using its `funding-pubkey` for the initial commitment transaction as defined in [BOLT #3](03-transactions.md#commitment-transaction).
222+
223+
The recipient MUST fail the channel if `signature` is incorrect.
222224

223225
### The `funding_locked` message
224226

@@ -241,7 +243,18 @@ from this point onwards.
241243

242244
#### Requirements
243245

244-
FIXME: Describe
246+
The sender MUST wait until the funding transaction has reached
247+
`minimum-depth` before sending this message. The sender MUST encode
248+
the block position of the funding transaction into `channel-id`. If
249+
the sender has already received `funding_locked` from the other node,
250+
it MUST fail the channel if its own `channel-id` does not match that
251+
received. The sender MUST set `next-per-commitment-point` to the
252+
per-commitment point to be used for the following commitment
253+
transaction, derived as specified in
254+
[BOLT #3](03-transactions.md#per-commitment-secret-requirements).
255+
256+
If the recipient has already sent `funding_locked` it MUST fail the
257+
channel if `channel-id` does not match the `channel-id` it sent.
245258

246259
#### Future
247260

0 commit comments

Comments
 (0)