Author: Rusty Russell 2018-11-16 00:25:34
Published on: 2018-11-16T00:25:34+00:00
In a discussion between Conner Fromknecht and ZmnSCPxj, several key points have been raised regarding the use of the `type,len,value` sequence in BOLT messaging. It has been accepted that each `type` in this sequence must be unique, and repeated fields should be serialized under a single root key. However, it is unclear whether the `type`s must be in ascending order, as this has not been explicitly accepted or rejected. There is some debate over whether the `type` should be one byte or two; while ZmnSCPxj leans towards one byte, there is agreement that if a message has 256 optional fields, it may be time to consider a new message type altogether. Similarly, there is discussion over whether the `len` should be one byte or two, with the suggestion of using varint as a compromise.The question of whether odd `type`s are acceptable has also arisen, with the answer depending on the specific context of the message. For gossip messages, optional fields need to remain optional for backwards compatibility, but link-level messages can be gated by feature bit negotiation, with deviations resulting in disconnection. Finally, there is a proposal to create a separate BOLT for `type,len,value`, which other messages and so on could refer to. Although the specifics of what sub-TLV structures would look like have not been fleshed out, the general TLV definition belongs in BOLT #1, as it is short.
Updated on: 2023-05-25T17:07:31.760204+00:00