@@ -244,8 +244,17 @@ The `features` field MUST be padded to bytes with 0s.
244
244
* [ ` gflen*byte ` :` globalfeatures ` ]
245
245
* [ ` u16 ` :` flen ` ]
246
246
* [ ` flen*byte ` :` features ` ]
247
+ * [ ` init_tlvs ` :` tlvs ` ]
248
+
249
+ 1 . tlvs: ` init_tlvs `
250
+ 2 . types:
251
+ 1 . type: 1 (` networks ` )
252
+ 2 . data:
253
+ * [ ` ...*chain_hash ` :` chains ` ]
247
254
248
255
256
+ The optional ` networks ` indicates the chains the node is interested in.
257
+
249
258
#### Requirements
250
259
251
260
The sending node:
@@ -254,6 +263,7 @@ The sending node:
254
263
- MUST set any undefined feature bits to 0.
255
264
- SHOULD NOT set features greater than 13 in ` globalfeatures ` .
256
265
- SHOULD use the minimum length required to represent the ` features ` field.
266
+ - SHOULD set ` networks ` to all chains it will gossip or open channels for.
257
267
258
268
The receiving node:
259
269
- MUST wait to receive ` init ` before sending any other messages.
@@ -265,6 +275,8 @@ The receiving node:
265
275
- MUST fail the connection.
266
276
- if the feature vector does not set all known, transitive dependencies:
267
277
- MUST fail the connection.
278
+ - upon receiving ` networks ` containing no common chains
279
+ - MAY fail the connection.
268
280
269
281
#### Rationale
270
282
@@ -276,6 +288,11 @@ This semantic allows both future incompatible changes and future backward compat
276
288
Nodes wait for receipt of the other's features to simplify error
277
289
diagnosis when features are incompatible.
278
290
291
+ Since all networks share the same port, but most implementations only
292
+ support a single network, the ` networks ` fields avoids nodes
293
+ erroneously believing they will receive updates about their preferred
294
+ network, or that they can open channels.
295
+
279
296
### The ` error ` Message
280
297
281
298
For simplicity of diagnosis, it's often useful to tell a peer that something is incorrect.
0 commit comments