mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 01:50:03 +01:00
moved msg type description from BOLT#2 to BOLT#1
This commit is contained in:
parent
58d1733d6d
commit
156d336ec3
@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
This protocol assumes an underlying authenticated and ordered transport mechanism that takes care of framing individual messages.
|
||||
[BOLT 08](08-transport.md) specifies the canonical transport layer used in Lightning, though it can be replaced by any transport that fulfills the above guarantees.
|
||||
[BOLT #8](08-transport.md) specifies the canonical transport layer used in Lightning, though it can be replaced by any transport that fulfills the above guarantees.
|
||||
|
||||
The default TCP port is 9735. This corresponds to hexadecimal `0x2607`, the unicode code point for LIGHTNING.<sup>[2](#reference-2)</sup>
|
||||
|
||||
@ -32,6 +32,13 @@ A node MUST NOT send an evenly-typed message not listed here without prior negot
|
||||
A node MUST ignore a received message of unknown type, if that type is odd.
|
||||
A node MUST fail the channels if it receives a message of unknown type, if that type is even.
|
||||
|
||||
The messages are grouped logically into 4 groups by their most significant set bit:
|
||||
|
||||
- Setup & signalling (types `0`-`31`): comprises setup of the cryptographic transport, communication of supported features and error reporting. These are described below.
|
||||
- Channel (types `32`-`127`): comprises messages used to setup, update and tear down micropayment channels. These are described in [BOLT #2](02-peer-protocol.md).
|
||||
- HTLC (types `128`-`255`: comprises messages related to adding, revoking and settling HTLCs on a micropayment channel. These are described in [BOLT #2](02-peer-protocol.md).
|
||||
- Routing (types `256`-`511`): node and channel announcements, as well as any active route exploration. These are described in [BOLT #7](07-routing-gossip.md).
|
||||
|
||||
The size of the message is required to fit into a 2 byte unsigned int by the transport layer, therefore the maximum possible size is 65535 bytes.
|
||||
A node MUST ignore any additional data within a message, beyond the length it expects for that type.
|
||||
A node MUST fail the channels if it receives a known message with insufficient length for the contents.
|
||||
|
@ -3,13 +3,6 @@
|
||||
The peer channel protocol has three phases: establishment, normal
|
||||
operation, and closing.
|
||||
|
||||
The messages described in this document are grouped logically into 4 groups by their most significant set bit:
|
||||
|
||||
- Setup & signalling (types `0`-`31`): comprises setup of the cryptographic transport, communication of supported features and error reporting. These are described in BOLT #1.
|
||||
- Channel (types `32`-`127`): comprises messages used to setup, update and tear down micropayment channels
|
||||
- HTLC (types `128`-`255`: comprises messages related to adding, revoking and settling HTLCs on a micropayment channel
|
||||
- Routing (types `256`-`511`): node and channel announcements, as well as any active route exploration.
|
||||
|
||||
# Table of Contents
|
||||
* [Channel](#channel)
|
||||
* [Channel Establishment](#channel-establishment)
|
||||
|
Loading…
Reference in New Issue
Block a user