4 Home
Claude edited this page 2026-02-19 23:29:30 +00:00

go-p2p

P2P networking layer for the Lethean network. Encrypted WebSocket mesh with UEPS wire protocol.

Module: forge.lthn.ai/core/go-p2p Go: 1.25.5 Licence: EUPL-1.2

Package Structure

Package Purpose Coverage
node/ P2P mesh: identity, transport, peers, protocol, worker, controller 42%
ueps/ UEPS wire protocol: TLV encoding, HMAC signing, stream parsing 0%
logging/ Structured levelled logger 86%

Phase Status

Phase Status Notes
Extraction Done Extracted from Mining repo (commit 8f94639)
Test Coverage Active High priority: ueps (0%), transport (0 tests), controller (0 tests)
Dispatcher Not started Stub exists, needs UEPS routing implementation
Integration Not started Node-to-node handshake over localhost

Critical Gaps

  1. UEPS has ZERO tests — 262 lines of crypto wire protocol completely untested
  2. Transport (934 lines) — WebSocket+SMSG encryption, handshake, keepalive, rate limiting — all untested
  3. Controller (327 lines) — Request-response correlation, auto-connect, concurrent stats — all untested

Dependencies

Module Purpose
github.com/Snider/Borg STMF crypto, SMSG encryption, TIM bundles
github.com/Snider/Poindexter KD-tree peer scoring
github.com/google/uuid Message/peer ID generation
github.com/gorilla/websocket WebSocket transport
github.com/adrg/xdg XDG base directory paths

Pages