From 3f3d56a660af08d219224125864bab621a4f4f59 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ Date: Tue, 18 Feb 2020 01:32:50 +0800 Subject: [PATCH] add "Ligtning Messages" section --- communications_protocol.asciidoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/communications_protocol.asciidoc b/communications_protocol.asciidoc index e70d448..2cf066d 100644 --- a/communications_protocol.asciidoc +++ b/communications_protocol.asciidoc @@ -13,6 +13,21 @@ If you want to learn more we suggest you check out http://www.noiseprotocol.org/ === Ligtning Messages +Each Ligtning Message contains 2 bytes indicating the *type* of message, and a variable-length *payload*. +A *payload* needs to be interpreted according the *type*. + +A Ligtning Message falls into one of the following groups: + +[cols="3,3,10",options="header"] +|======= +| Group | Type | Description +| Setup & Control | 0~31 | Messages related to connection setup, control, supported features, and error reporting +| Channel | 32~127 | Messages related to setup and close channels +| Commitment | 128~255 | Messages related to updating the current commitment transaction +| Routing | 256~511 | Messages related to node and channel announcements, or active route explorations +| Custom | 32768~65535 | Experimental or custom messages +|======= + === Opening a Payment channel === forwarding, making and receiving a payment