Skip to content

Commit 27cc354

Browse files
Shannon Appelclinerustyrussell
Shannon Appelcline
authored andcommitted
My final edits on these BOLT-7 changes
1 parent 8fd6e4f commit 27cc354

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

07-routing-gossip.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,22 @@ one valid `channel_announcement` for any channel, but at least two
1515
`channel_update` messages are expected.
1616

1717
To support node discovery, peers exchange `node_announcement`
18-
messages, which supply additional information about nodes There can be
18+
messages, which supply additional information about nodes. There can be
1919
multiple `node_announcement` messages, to update node information.
2020

21+
# Table of Contents
22+
23+
* [The `announcement_signatures` Message](#the-announcement_signatures-message)
24+
* [The `channel_announcement` Message](#the-channel_announcement-message)
25+
* [The `node_announcement` Message](#the-node_announcement-message)
26+
* [The `channel_update` Message](#the-channel_update-message)
27+
* [Initial Sync](#initial-sync)
28+
* [Rebroadcasting](#rebroadcasting)
29+
* [HTLC Fees](#htlc-fees)
30+
* [Pruning the Network View](#pruning-the-network-view)
31+
* [Recommendations for Routing](#recommendations-for-routing)
32+
* [References](#references)
33+
2134
## The `announcement_signatures` Message
2235

2336
This is a direct message between two endpoints of a channel and serves as an opt-in mechanism to allow the announcement of the channel to the rest of the network.
@@ -34,17 +47,17 @@ The willingness of the initiating node to announce the channel is signaled durin
3447

3548
### Requirements
3649

37-
The `announcement_signatures` message is created by constructing a `channel_announcement` message corresponding to the newly established channel and signing it with the secrets matching an endpoint's `node_id` and `bitcoin_key`. The message is then sent using an `announcement_signatures`.
50+
The `announcement_signatures` message is created by constructing a `channel_announcement` message, corresponding to the newly established channel, and signing it with the secrets matching an endpoint's `node_id` and `bitcoin_key`. The message is then sent using an `announcement_signatures`.
3851

3952
The `short_channel_id` is the unique description of the funding transaction.
4053
It is constructed with the most significant 3 bytes indicating the block
4154
height, the next 3 bytes indicating the transaction index within the
4255
block, and the least significant two bytes indicating the output
4356
index that pays to the channel.
4457

45-
If the `open_channel` message had the `announce_channel` bit set, then both nodes must send the `announcement_signatures` message, otherwise they MUST NOT.
58+
If the `open_channel` message had the `announce_channel` bit set, then both nodes MUST send the `announcement_signatures` message, otherwise they MUST NOT.
4659

47-
If sent, `announcement_signatures` messages MUST NOT be sent until `funding_locked` has been sent and the funding transaction has at least 6 confirmations.
60+
If sent, `announcement_signatures` messages MUST NOT be sent until `funding_locked` has been sent and the funding transaction has at least six confirmations.
4861

4962
The recipient MAY fail the channel if the `node_signature` or `bitcoin_signature` is incorrect.
5063
The recipient SHOULD queue the `channel_announcement` message for its peers if it has sent and received a valid `announcement_signatures` message.
@@ -61,10 +74,10 @@ its fee levels and expiry using `channel_update`.
6174
Proving the existence of a channel between `node_1` and
6275
`node_2` requires:
6376

64-
1. Proving that the funding transaction pays to `bitcoin_key_1` and
65-
`bitcoin_key_2`.
66-
2. Proving that `node_1` owns `bitcoin_key_1`
67-
3. Proving that `node_2` owns `bitcoin_key_2`
77+
1. proving that the funding transaction pays to `bitcoin_key_1` and
78+
`bitcoin_key_2`
79+
2. proving that `node_1` owns `bitcoin_key_1`
80+
3. proving that `node_2` owns `bitcoin_key_2`
6881

6982
The first proof is accomplished by assuming that all nodes know the unspent
7083
transaction outputs, and thus can find the output given by
@@ -77,7 +90,7 @@ and `bitcoin_signature_2`, generated by each `bitcoin_key` and signing
7790
the corresponding `node_id`).
7891

7992
It is also necessary to prove that `node_1` and `node_2` both agree on this
80-
announcement message; that is accomplished by having a signature from each
93+
announcement message; this is accomplished by having a signature from each
8194
`node_id` signing the message (`node_signature_1` and
8295
`node_signature_2`).
8396

@@ -177,7 +190,7 @@ optional) ones will have odd feature bits, incompatible ones will have
177190
even feature bits (["It's OK to be odd!"](00-introduction.md#glossary-and-terminology-guide)).
178191
Incompatible features will result in the announcement not being forwarded by nodes that don't understand them.
179192

180-
## The `node_announcement` message
193+
## The `node_announcement` Message
181194

182195
This allows a node to indicate extra data associated with it, in
183196
addition to its public key. To avoid trivial denial of service attacks,
@@ -286,12 +299,12 @@ to be ordered in ascending order, unknown ones can be safely ignored.
286299
Future fields beyond `addresses` can still be added, optionally with
287300
padding within `addresses` if they require certain alignment.
288301

289-
## The `channel_update` message
302+
## The `channel_update` Message
290303

291304
After a channel has been initially announced, each side independently
292305
announces the fees and minimum expiry delta it requires to relay HTLCs
293-
through this channel. They use the 8-byte
294-
channel shortid that matches the `channel_announcement` and one bit
306+
through this channel. Each uses the 8-byte
307+
channel shortid that matches the `channel_announcement` and 1 bit
295308
in the `flags` field
296309
to indicate which end this is. A node can do this multiple times, if
297310
it wants to change fees.

0 commit comments

Comments
 (0)