Skip to content

Commit 6dda956

Browse files
committed
BOLT 7: Added flag for optional initial routing sync dump
Opening a lot of connections results in getting this information a whole lot of times, so let's add an opt-in flag for the initial dump.
1 parent fba2297 commit 6dda956

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

07-routing-gossip.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ channels associated with it. Otherwise the receiving node SHOULD
294294
queue the message for rebroadcasting, but MAY choose not to for
295295
messages longer than the minimum expected length.
296296

297+
## Initial Sync
298+
299+
Upon establishing a connection, the two endpoints negotiate whether to perform an initial sync by setting the `initial_routing_sync` flags in the `init` message.
300+
The endpoint SHOULD set the `initial_routing_sync` flag if it requires a full copy of the other endpoint's routing state.
301+
Upon receiving an `init` message with the `initial_routing_sync` flag set the node sends `channel_announcement`s, `channel_update`s and `node_announcement`s for all known channels and nodes as if they were just received.
302+
303+
If the `initial_routing_sync` flag is not set, or initial sync was completed, then the node resumes normal operation, see the _Rebroadcasting_ section for details.
304+
297305
## Rebroadcasting
298306

299307
Nodes receiving a new `channel_announcement` or a `channel_update` or

09-features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Flags begin at bit 0 (ie. 0x1), and odd-numbered flags (eg. 0x2) are optional.
1515
| Bits | Name |Description | Link |
1616
|------|------------------|------------------------------------------------|---------------------------------------------------------------------|
1717
| 0/1 | `channel_public` | The sending node wishes to announce the channel | [BOLT #7](07-routing-gossip.md#the-announcement_signatures-message) |
18+
| 2/3 | `initial_routing_sync` | The sending node needs a complete routing information dump | [BOLT #7](07-routing-gossip.md#initial-sync) |
1819

1920
## Assigned `globalfeatures` flags

0 commit comments

Comments
 (0)