No results
4
Home
Claude edited this page 2026-02-19 23:29:30 +00:00
Table of Contents
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
- UEPS has ZERO tests — 262 lines of crypto wire protocol completely untested
- Transport (934 lines) — WebSocket+SMSG encryption, handshake, keepalive, rate limiting — all untested
- 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
- Architecture — Component layers and data flow
- Test-Gaps — Detailed coverage analysis with test suggestions
- UEPS-Protocol — Wire protocol specification
- Node-Identity — Identity, roles, authentication
- Protocol-Messages — Message types and payload handling
- Peer-Discovery — Peer management and scoring
- Fleet-Context — How this fits in the Core Go ecosystem