Files
fips/docs/design/fips-node-architecture.svg
T
Johnathan Corgan 0a72317b59 Design documentation illustration pass and FLP→FMP rename
Rename FIPS Link Protocol (FLP) to FIPS Mesh Protocol (FMP)

  The "Link Protocol" name understated the layer's scope — spanning tree
  construction, bloom filter routing, greedy forwarding, and mesh-wide
  coordination go well beyond link-level concerns. Rename fips-link-layer.md
  to fips-mesh-layer.md, update FLP→FMP throughout docs and source code
  (FLP_VERSION→FMP_VERSION, wire.rs, rx_loop.rs, spanning_tree.rs).

New SVG illustrations

  - Protocol stack: color-coded layer diagram replacing ASCII art
  - OSI mapping: side-by-side comparison with traditional networking layers
  - Bloom filter propagation: 6-node tree with sender-colored filter boxes
    showing split-horizon computation per link
  - Routing decision flowchart: 5-step priority chain with candidate ranking
    by tree distance and link performance
  - Coordinate discovery: sequence diagram showing LookupRequest propagation,
    response caching, and SessionSetup cache warming

Redesigned existing SVGs

  - Architecture overview: uniform node layout, U-shaped encrypted link
    connectors, separate end-to-end session line
  - Node architecture: split Router Core into FSP and FMP layers, reorganize
    transports into Overlay/Shared Medium/Point-to-Point categories
  - Identity derivation: wider boxes, visible encode arrow, dashed npub line

fips-intro.md revisions

  - Add inline references to prior work: Yggdrasil/Ironwood for coordinate
    routing, Noise Protocol Framework for IK handshakes, WireGuard for
    index-based session dispatch, Wikipedia for bloom filters, split-horizon,
    and greedy embedding
  - Add explanatory paragraphs after bloom filter diagram describing
    split-horizon filter computation and candidate selection behavior
  - Simplify transport abstraction language, remove I2P/LoRa references
  - Fix LookupRequest wording ("propagates" not "floods"), note intermediate
    node coordinate caching on lookup responses
  - Rewrite architecture overview prose to match redesigned diagrams
2026-02-21 22:05:44 +00:00

161 lines
8.0 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 560" font-family="monospace" font-size="12">
<style>
rect.outer { fill: #151525; stroke: #505070; stroke-width: 2; rx: 6; }
rect.layer { rx: 4; }
rect.api { fill: #1a3a2a; stroke: #40a060; stroke-width: 1.5; }
rect.tun { fill: #1a2a3a; stroke: #4080c0; stroke-width: 1.5; }
rect.fsp { fill: #2a2040; stroke: #8060c0; stroke-width: 1.5; }
rect.fmp { fill: #2e3a5e; stroke: #5080c0; stroke-width: 1.5; }
rect.xport { fill: #2a1a1a; stroke: #c06040; stroke-width: 1.5; }
rect.cat { fill: none; stroke: #404060; stroke-width: 1; stroke-dasharray: 4,3; rx: 3; }
text { fill: #e0e0e0; }
text.label { font-size: 13px; font-weight: bold; }
text.sub { font-size: 10px; fill: #909090; }
text.cat { font-size: 9px; fill: #707090; font-style: italic; }
text.title { font-size: 16px; font-weight: bold; }
text.subtitle{ font-size: 12px; fill: #909090; }
line.conn { stroke: #606080; stroke-width: 1.5; }
line.peer { stroke: #505060; stroke-width: 1; stroke-dasharray: 3,3; }
</style>
<!-- Background -->
<rect width="800" height="560" fill="#0d1117" rx="8"/>
<!-- Title -->
<text x="400" y="28" text-anchor="middle" class="title">FIPS Node Architecture</text>
<text x="400" y="46" text-anchor="middle" class="subtitle">Application interfaces, protocol layers, and transport abstraction</text>
<!-- Outer node box -->
<rect x="40" y="60" width="720" height="350" class="outer"/>
<text x="56" y="80" class="sub">FIPS Node</text>
<!-- === Application layer === -->
<!-- FIPS-native API (left) -->
<rect x="180" y="90" width="200" height="50" class="layer api"/>
<text x="280" y="108" text-anchor="middle" class="label">FIPS-Native API</text>
<text x="280" y="121" text-anchor="middle" class="sub">Datagram service</text>
<text x="280" y="133" text-anchor="middle" class="sub">Addressed by npub</text>
<!-- IPv6 TUN adapter (right) -->
<rect x="400" y="90" width="200" height="50" class="layer tun"/>
<text x="500" y="108" text-anchor="middle" class="label">IPv6 TUN Adapter</text>
<text x="500" y="121" text-anchor="middle" class="sub">fips0 + DNS (.fips)</text>
<text x="500" y="133" text-anchor="middle" class="sub">npub → fd::/8 IPv6</text>
<!-- External app labels -->
<text x="280" y="74" text-anchor="middle" class="sub">FIPS-aware apps</text>
<text x="500" y="74" text-anchor="middle" class="sub">Legacy IP apps (ping, curl, ...)</text>
<!-- Arrows from apps down to API/TUN -->
<line x1="280" y1="78" x2="280" y2="90" class="conn"/>
<line x1="500" y1="78" x2="500" y2="90" class="conn"/>
<!-- === FSP Layer === -->
<rect x="80" y="170" width="620" height="50" class="layer fsp"/>
<text x="390" y="191" text-anchor="middle" class="label">FIPS Session Protocol (FSP)</text>
<text x="390" y="205" text-anchor="middle" class="sub">End-to-end encryption · Session lifecycle · Path discovery · In-band metrics</text>
<!-- Connections: API/TUN → FSP -->
<line x1="280" y1="140" x2="280" y2="170" class="conn"/>
<line x1="500" y1="140" x2="500" y2="170" class="conn"/>
<!-- === FMP Layer === -->
<rect x="80" y="240" width="620" height="50" class="layer fmp"/>
<text x="390" y="261" text-anchor="middle" class="label">FIPS Mesh Protocol (FMP)</text>
<text x="390" y="275" text-anchor="middle" class="sub">Link encryption · Spanning tree · Bloom filters · Routing · Peer management</text>
<!-- Connection: FSP → FMP -->
<line x1="390" y1="220" x2="390" y2="240" class="conn"/>
<!-- === FMP → Transport connections === -->
<!-- Single vertical trunk from FMP bottom center -->
<line x1="390" y1="290" x2="390" y2="312" class="conn"/>
<!-- Horizontal bar at branch point -->
<line x1="155" y1="312" x2="625" y2="312" class="conn"/>
<!-- Vertical drops to each category group outline -->
<line x1="155" y1="312" x2="155" y2="336" class="conn"/>
<line x1="390" y1="312" x2="390" y2="336" class="conn"/>
<line x1="625" y1="312" x2="625" y2="336" class="conn"/>
<!-- === Transport layer === -->
<!-- Overlay transports -->
<rect x="80" y="336" width="150" height="60" class="cat"/>
<text x="155" y="349" text-anchor="middle" class="cat">Overlay</text>
<rect x="92" y="356" width="60" height="30" class="layer xport"/>
<text x="122" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">UDP</text>
<text x="122" y="381" text-anchor="middle" class="sub">IP</text>
<rect x="158" y="356" width="60" height="30" class="layer xport"/>
<text x="188" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">Tor</text>
<text x="188" y="381" text-anchor="middle" class="sub">.onion</text>
<!-- Shared medium transports -->
<rect x="240" y="336" width="300" height="60" class="cat"/>
<text x="390" y="349" text-anchor="middle" class="cat">Shared Medium</text>
<rect x="254" y="356" width="60" height="30" class="layer xport"/>
<text x="284" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">Ether</text>
<text x="284" y="381" text-anchor="middle" class="sub">802.3</text>
<rect x="320" y="356" width="60" height="30" class="layer xport"/>
<text x="350" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">WiFi</text>
<text x="350" y="381" text-anchor="middle" class="sub">802.11</text>
<rect x="386" y="356" width="60" height="30" class="layer xport"/>
<text x="416" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">BT</text>
<text x="416" y="381" text-anchor="middle" class="sub">RFCOMM</text>
<rect x="452" y="356" width="60" height="30" class="layer xport"/>
<text x="482" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">Radio</text>
<text x="482" y="381" text-anchor="middle" class="sub">Sat, ...</text>
<!-- Point-to-point transports -->
<rect x="550" y="336" width="150" height="60" class="cat"/>
<text x="625" y="349" text-anchor="middle" class="cat">Point-to-Point</text>
<rect x="562" y="356" width="60" height="30" class="layer xport"/>
<text x="592" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">Serial</text>
<text x="592" y="381" text-anchor="middle" class="sub">UART</text>
<rect x="628" y="356" width="60" height="30" class="layer xport"/>
<text x="658" y="371" text-anchor="middle" font-size="10" font-weight="bold" fill="#e0e0e0">...</text>
<text x="658" y="381" text-anchor="middle" class="sub"></text>
<!-- === Peer networks below node box === -->
<text x="155" y="436" text-anchor="middle" class="sub">Internet / Overlay Peers</text>
<line x1="155" y1="410" x2="155" y2="426" class="peer"/>
<text x="390" y="436" text-anchor="middle" class="sub">Local / Radio Peers</text>
<line x1="390" y1="410" x2="390" y2="426" class="peer"/>
<text x="625" y="436" text-anchor="middle" class="sub">Wired Peers</text>
<line x1="625" y1="410" x2="625" y2="426" class="peer"/>
<!-- === Legend === -->
<rect x="40" y="458" width="720" height="88" fill="#151520" stroke="#404060" stroke-width="1" rx="4"/>
<rect x="60" y="476" width="24" height="14" class="layer api"/>
<text x="92" y="488" class="sub">Application interface</text>
<rect x="60" y="496" width="24" height="14" class="layer tun"/>
<text x="92" y="508" class="sub">IPv6 compatibility layer</text>
<rect x="300" y="476" width="24" height="14" class="layer fsp"/>
<text x="332" y="488" class="sub">FSP — end-to-end session encryption</text>
<rect x="300" y="496" width="24" height="14" class="layer fmp"/>
<text x="332" y="508" class="sub">FMP — mesh routing and link encryption</text>
<rect x="590" y="476" width="24" height="14" class="layer xport"/>
<text x="622" y="488" class="sub">Transport plugin</text>
<rect x="590" y="496" width="24" height="14" fill="none" stroke="#404060" stroke-width="1" stroke-dasharray="4,3" rx="2"/>
<text x="622" y="508" class="sub">Transport category</text>
<text x="300" y="536" class="sub">All transports use the same FMP protocol</text>
</svg>