From 9404c034774ac5874f1987cdf2e2de43dfbb8594 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:56:45 +0700 Subject: [PATCH] fix doc --- docs/SOURCE_ROUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/SOURCE_ROUTING.md b/docs/SOURCE_ROUTING.md index 1fdd2c6f..6832a16e 100644 --- a/docs/SOURCE_ROUTING.md +++ b/docs/SOURCE_ROUTING.md @@ -81,14 +81,18 @@ Topology: `Alice (Sender) -> Bob -> Charlie -> Dave (Recipient)` To calculate routes, nodes need a view of the network topology. This is achieved via a **Neighbor List** extension to the `IdentityAnnouncement` packet. -* **Mechanism:** `IdentityAnnouncement` packets contain a TLV (Type-Length-Value) payload. +The `ANNOUNCE` packet payload now consists of a sequence of TLVs. The standard identity information is followed by an optional Gossip TLV. + +* **Mechanism:** Appended to the `IdentityAnnouncement` payload. * **New TLV Type:** `0x04` (Direct Neighbors). * **Content:** A list of Peer IDs that the announcing node is directly connected to. **TLV Structure (Type 0x04):** ```text -[Type: 0x04] [Length: 1B] [Count: 1B] [NeighborID1 (8B)] [NeighborID2 (8B)] ... +[Type: 0x04] [Length: 1B] [NeighborID1 (8B)] [NeighborID2 (8B)] ... ``` +The `Length` field indicates the total size of the neighbor IDs in bytes (N * 8). There is no explicit count field. + Nodes receiving this TLV update their local mesh graph, linking the sender to the listed neighbors. ### Edge Verification (Two-Way Handshake)