Edited 13_wire_protocol.asciidoc with Atlas code editor

pull/928/head
kristen@oreilly.com 2 years ago
parent b5501c3203
commit 552291dc63

@ -11,7 +11,7 @@ that have been built into the protocol.
=== Messaging Layer in the Lightning Protocol Suite
((("Lightning Network Protocol","messaging layer")))((("wire protocol","messaging layer in the Lightning Protocol Suite")))The messaging layer, which is detailed in this chapter, consists of "Framing and message format," "Type-Length-Value (TLV)" encoding, and "Feature bits." These components are highlighted by an outline in the protocol suite, shown in <<LN_protocol_wire_message_highlight>>.
((("Lightning Network Protocol","messaging layer")))((("wire protocol","messaging layer in the Lightning Protocol Suite")))The messaging layer, which is detailed in this chapter, consists of "Framing and message format," "Type-Length-Value" encoding, and "Feature bits." These components are highlighted by an outline in the protocol suite, shown in <<LN_protocol_wire_message_highlight>>.
[[LN_protocol_wire_message_highlight]]
.Messaging layer in the Lightning protocol suite
@ -102,7 +102,7 @@ including the prefix type of the message along with the contents of its message
body.(((range="endofrange", startref="ix_13_wire_protocol-asciidoc2")))(((range="endofrange", startref="ix_13_wire_protocol-asciidoc1")))
[[tlv_message_extensions]]
=== Type-Length-Value (TLV) Message Extensions
=== Type-Length-Value Message Extensions
((("Type-Length-Value (TLV) message extensions","message extensions in wire protocol")))((("wire protocol","TLV message extensions")))Earlier in this chapter we mentioned that messages can be up to 65 KB in size,
and if while parsing a message, extra bytes are left over, then those bytes
@ -151,7 +151,7 @@ transactions they don't understand, then they simply ignore them as their funds
aren't using those new features.
[[tlv]]
=== Type-Length-Value (TLV) Format
=== Type-Length-Value Format
((("Type-Length-Value (TLV) format", id="ix_13_wire_protocol-asciidoc3", range="startofrange")))((("Type-Length-Value (TLV) format","wire protocol and", id="ix_13_wire_protocol-asciidoc4", range="startofrange")))((("wire protocol","TLV format", id="ix_13_wire_protocol-asciidoc5", range="startofrange")))To be able to upgrade messages in a manner that is both forward and backward
compatible, in addition to feature bits (more on that later), the Lightning Network utilizes a custom message serialization format plainly called Type-Length-Value, or TLV for short. The format was inspired by the widely used Protobuf
@ -167,7 +167,7 @@ implementation of the TLV message format weighs in at only 2.3k lines of code
With the necessary background presented, we're now ready to describe the TLV
format in detail. A TLV message extension is said to be a stream of
individual TLV records. A single TLV record has three components: the type of
individual pass:[<span class="keep-together">TLV records</span>]. A single TLV record has three components: the type of
the record, the length of the record, and finally the opaque value of the
record:

Loading…
Cancel
Save