Tower Atomic

Sovereign transport stack — bearDog + songBird + skunkBat provide capability-aware, topology-aware encrypted mesh networking alongside WireGuard. LAN-aware routing, BTSP 13/13, 6+ gates LIVE.

Tower Atomic is the sovereign transport stack: BearDog (cryptography) + Songbird (transport routing) + skunkBat (protocol negotiation). Together they provide encrypted peer-to-peer communication that replaces WireGuard.

┌─────────────────────────────────────────────────────────┐
│ Tower Atomic Stack                                       │
├─────────────────────────────────────────────────────────┤
│ skunkBat  — Protocol negotiation, bond formation         │
│ songBird  — Transport routing, NAT traversal, mesh       │
│ bearDog   — Crypto: Ed25519, X25519, ChaCha20-Poly1305   │
└─────────────────────────────────────────────────────────┘

This is the first atomic composition — three primals bonded via JSON-RPC over IPC sockets (UDS on Linux, named pipes on Windows, abstract sockets on Android), running as independent services, forming a single capability: sovereign encrypted mesh networking. BTSP 13/13 — all primals implement the handshake. Tower runs on 8+ gates, including westGate (Nest Atomic) and strandGate (Compute Trio).

Why replace WireGuard?

WireGuard is excellent at what it does: encrypted kernel tunnels between fixed endpoints. But it has structural limitations for distributed scientific computing:

LimitationWireGuardTower Atomic
Routing awarenessAll packets traverse the same tunnelJSON-RPC dispatch routes by capability
Topology awarenessFixed endpoints, no LAN discoverylan_addr discovery bypasses VPS for LAN peers
Traffic shapingOne tunnel, all trafficPer-capability routing to specialized stacks
Crypto granularityOne static key per tunnelPer-session BTSP keys + per-capability attestation
Compute awarenessJust a pipeMesh knows which gate has which hardware
Edge tuningSame overhead regardless of hardwareTunable: minimal relay/beacon profile for NUCs

Benchmark results

Tower Atomic has been benchmarked against WireGuard across LAN and WAN paths using songbird benchmark — a 3-phase measurement harness (setup, latency, throughput) with p50/p95/p99 statistics.

LAN (eastGate ↔ sporeGate, 1G MikroTik backbone)

MetricTower AtomicWireGuardVerdict
Latency (avg)0.57 ms0.46 msParity (sub-ms both)
Latency (p99)0.71 ms0.67 msParity
Jitter0.015 ms0.015 msParity
Setup time0.28 ms0.29 msParity

LAN latency varies by run — early measurements showed Tower 8% faster, later runs show WG slightly ahead. Both stacks deliver sub-millisecond LAN latency. The meaningful difference is not protocol speed but topology awareness.

WAN (multi-hop, 67ms+ RTT)

MetricTower AtomicWireGuardVerdict
Latency136.6 ms135.9 msParity
Throughput (sustained)6.9 Mbps3.5–6.7 MbpsTower 1.7× when WG degrades
Jitter0.48 ms0.48 msParity

On WAN multi-hop paths (sporeGate → golgiBody → flockGate), Tower maintains consistent throughput while WireGuard intermittently degrades to ~3.5 Mbps. Shadow benchmarks across 360+ runs show Tower at 1.7× sustained on degraded WAN paths.

LAN topology awareness

On the same LAN, WireGuard routes sporeGate↔eastGate traffic through golgiBody VPS (153ms round-trip) because WG has no concept of LAN topology. Tower discovers LAN peers via lan_addr and routes directly (0.57ms).

This is not a protocol speed advantage — it is a topology awareness feature that WireGuard was never designed to provide. Comparing latencies across different routing paths is not a fair benchmark of the two protocols.

Socket topology

The three primals communicate via UNIX domain sockets:

┌─ bearDog UDS server ─────────────────────────────────┐
│  beardog.sock                                         │
│  ├── security.sock    ├── btsp.sock                   │
│  ├── crypto.sock      ├── ed25519.sock                │
│  └── x25519.sock                                      │
│  Serves: ~230 methods (btsp.*, crypto.*, auth.*)      │
└───────────────────────────────────────────────────────┘
         ▲                    ▲
         │ UDS                │ UDS
┌─ songBird UDS server ──────┼──────────────────────────┐
│  songbird.sock              │                          │
│  Serves: capability.call, mesh.*, health.*,            │
│    federation.peers/status                             │
└─────────────────────────────┼──────────────────────────┘
         ▲                    │
         │ UDS                │
┌─ skunkBat UDS server ──────┘──────────────────────────┐
│  skunkbat.sock                                         │
│  Serves: security.*, defense.*, health.*               │
└────────────────────────────────────────────────────────┘

A cross-gate capability.call traverses 4 UDS hops (~0.6ms total on LAN hardware). With BTSP session establishment on a fresh connection, add 3 bearDog hops (~0.45ms one-time).

Six exploration domains

Tower Atomic opens exploration space that WireGuard fundamentally cannot address:

1. Capability-aware routing — PROVEN LIVE

songBird dispatches by capability name. nestgate.blob_put, beardog.sign, toadstool.dispatch each route to the correct provider. WireGuard sends all packets through the same undifferentiated tunnel.

2. Multi-stack routing — PROVEN LIVE

songBird dispatches 6 traffic classes to 5 different provider stacks through a single mesh: SECURITY → skunkBat, HEALTH → sweetGrass, PROVENANCE → sweetGrass, AI/INFER → squirrel, STORAGE → nestGate, VISUAL → petalTongue.

3. Large data transfer — PROVEN LIVE

Content-addressed blob routing via NestGate CAS. songBird can negotiate payload-optimal framing — jumbo frames on 10G backbone, chunked streaming on WAN. Blobs route to the nearest cached copy.

4. Secure compute mesh — PROVEN LIVE

BearDog provides per-session BTSP crypto with per-capability attestation. Different trust levels per workload. CredentialStore integration means keys live in HSM/TEE where available.

5. Distributed compute — PROVEN LIVE

songBird’s mesh topology knows which gate has which hardware (GPU VRAM, NPU, CPU cores). Combined with ToadStool workload dispatch, Tower becomes a compute-aware mesh — workloads route to the gate with the right substrate. 4-node targeted dispatch proven across the mesh.

6. Edge/SFF profile — PROVEN LIVE

On constrained hardware (NUCs, NucBox), Tower runs a minimal relay/beacon profile: 30MB RSS, 39MB total stack, mesh.announce with 300s TTL. WireGuard cannot specialize its overhead for small hardware.

Convergence timeline

PhaseMilestoneStatus
Phase 0All Tower components live independentlyCOMPLETE
Phase 1Parity benchmark: measure Tower vs WG on LAN+WANPASS
Phase 2Shadow deploy across all live topology + explorationCOMPLETE — 6/6 domains PROVEN LIVE
Phase 3Cutover: Tower replaces WG for inter-gate trafficPending Phase 2 validation

Autonomous enrollment (F10 — fossilized)

Gates self-enroll into the Tower mesh via genetic enrollment — a two-layer model mirroring biological DNA:

Layer 1 — Mitochondrial gate:
  FAMILY_SEED HMAC → gate identity

Layer 2 — Nuclear lineage distance:
  tree hops → trust tiers (identity/kin/sibling/extended/distant)
  seed rotation via HKDF hierarchy, generation-based with grace period

Enrollment pipeline:
  gate-enroll.sh (Linux) or gate-enroll.ps1 (Windows)
  → WG peer registered, Forgejo SSH key, family seed
  → clone 43+ repos from Forgejo over mesh
  → membrane gate.bootstrap → fetch genomeBins from depot
  → primalSpring scenarios pass → head published → online

Self-registration — gates declare name + composition. golgiBody is the sole depot. No USB, no SCP, no local depots. mesh.gate_enroll live on golgiBody.

Shadow deployment

Tower runs alongside WireGuard via membrane tower.shadow --enable. Both stacks carry traffic simultaneously — WireGuard for production, Tower for continuous benchmarking. Shadow metrics collect every 60 minutes across all gate pairs.

360+ benchmark files collected across 3 gates. Results consistently show Tower at parity or exceeding WireGuard on all measured dimensions.

Crypto composition — 6/6 COMPLETE

songBird has completed migration of all cold-path cryptography to BearDog UDS delegation. The local-crypto-fallback feature flag remains for environments without bearDog, but all production gates now delegate.

CRYPTO_COMPOSITION.md classifies 19 crypto seams:

CategorySeamsStatus
Hot-path5Chimera (in-process after library extraction)
Delegating66/6 COMPLETE — bearDog UDS
Test-only5Isolated to #[cfg(test)]
Already delegating3No change needed

All 6 delegation seams are wired and validated:

SeamCrateDelegation Path
JWT HMAC-SHA256orchestratorCryptoProvidercrypto.hmac.sha256
Checkpoint SHA-256orchestratorCryptoProvidercrypto.sha256
Discovery SHA-256discoveryCryptoProvidercrypto.sha256
Discovery BLAKE3discoveryCryptoProvidercrypto.hash.blake3
Federation SHA-256network-federationCryptoProvidercrypto.sha256
Federation HMACnetwork-federationCryptoProvidercrypto.hmac.sha256

songBird also shipped a full BTSP ClientHello handshake (268 lines) — the 4-step challenge-response protocol that all primals must implement before Nest Atomic. sporeGate now enforces BTSP strict mode (BEARDOG_AUTH_MODE=enforced); legacy plaintext JSON-RPC is rejected.

Chimera Phase 0 (collapsing Tower into a single process) is now unblocked by the validated composition model.

IPC hardening

songBird’s IPC layer has been hardened with 4 security controls:

ControlImplementation
Caller identity verificationSO_PEERCRED extraction (uid/pid) from UnixStream
Directory guardDetect/remove stale directory at socket path
Symlink rejectionRefuse bind over symlinks (path hijack prevention)
Socket permissionschmod 0600 after bind (owner-only access)

Credential extraction is wired into the connection handler — every IPC call carries CallerContext with the caller’s uid and pid.

Cross-platform proof (genomeBin)

Tower targets 5 platforms via genomeBin cross-platform distribution:

TargetArchitectureStatus
Linux x86_64Server/desktopLIVE — all gates
Linux aarch64ARM (Pi, NUC)LIVE — edge/SFF
Windows x86_64Desktop/builderHW READY — blueGate, swiftGate
Android aarch64MobileHW READY — grapheneGate
ARM IoTEmbeddedTarget defined

songBird’s universal-ipc module handles platform-specific IPC: UDS (Linux), named pipes (Windows), abstract sockets (Android), XPC (iOS), TCP (fallback). cellMembrane’s Platform::detect() provides TargetOs × CpuArch × LinkModel for each gate.

Compositions built on Tower

Tower Atomic is the transport foundation for higher compositions:

CompositionWhat It AddsStatus
Nest AtomicNestGate CAS + Provenance Trio ( rhizoCrypt, loamSpine, sweetGrass)LIVE on westGate — 8 services, 1,704 capabilities, ZFS 25.4TB
Compute TrioToadStool + barraCuda + coralReefLIVE on strandGate — RTX 3090, BTSP Phase 3
NUCLEUSAll primals composed by biomeOSArchitectural — 27 signal graphs designed

westGate’s Nest Atomic deployment is the first multi-composition: Tower provides the mesh, nestGate provides content-addressed storage on ZFS (25.4TB mirrors + 2TB SSD L2ARC, all 5 storage tiers), and the Provenance Trio provides cryptographic provenance with sweetGrass G3 wiring complete (braid.commit → loamSpine ledger proof). 6 PDB protein structures stored in CAS with dedup verified.

See NUCLEUS Architecture for the full composition ladder.

Glacial goals

#GoalWhat It Proves
G1Tower on WindowsOS abstraction (IPC, service management, paths)
G2Tower on AndroidMobile trust boundary
G5Chimera Phase 0libtower.so shared library extraction

Chimera optimization: Collapsing bearDog + songBird + skunkBat into a single process eliminates 3-6 UDS hops per operation. Estimated LAN latency improvement: 12× (from ~0.6ms to ~0.05ms). The beardog-core crate extraction is the first step.