@@ -236,8 +236,17 @@ The `features` field MUST be padded to bytes with 0s.
236236 * [ ` gflen*byte ` :` globalfeatures ` ]
237237 * [ ` u16 ` :` flen ` ]
238238 * [ ` flen*byte ` :` features ` ]
239+ * [ ` init_tlvs ` :` tlvs ` ]
240+
241+ 1 . tlvs: ` init_tlvs `
242+ 2 . types:
243+ 1 . type: 1 (` networks ` )
244+ 2 . data:
245+ * [ ` ...*chain_hash ` :` chains ` ]
239246
240247
248+ The optional ` networks ` indicates the chains the node is interested in.
249+
241250#### Requirements
242251
243252The sending node:
@@ -246,6 +255,7 @@ The sending node:
246255 - MUST set any undefined feature bits to 0.
247256 - SHOULD NOT set features greater than 13 in ` globalfeatures ` .
248257 - SHOULD use the minimum length required to represent the ` features ` field.
258+ - SHOULD set ` networks ` to all chains it will gossip or open channels for.
249259
250260The receiving node:
251261 - MUST wait to receive ` init ` before sending any other messages.
@@ -255,6 +265,8 @@ The receiving node:
255265 - MUST ignore the bit.
256266 - upon receiving unknown _ even_ feature bits that are non-zero:
257267 - MUST fail the connection.
268+ - upon receiving ` networks ` containing no common chains
269+ - MAY fail the connection.
258270
259271#### Rationale
260272
@@ -266,6 +278,11 @@ This semantic allows both future incompatible changes and future backward compat
266278Nodes wait for receipt of the other's features to simplify error
267279diagnosis when features are incompatible.
268280
281+ Since all networks share the same port, but most implementations only
282+ support a single network, the ` networks ` fields avoids nodes
283+ erroneously believing they will receive updates about their preferred
284+ network, or that they can open channels.
285+
269286### The ` error ` Message
270287
271288For simplicity of diagnosis, it's often useful to tell a peer that something is incorrect.
0 commit comments