Repository navigation
v0.16.0
New Features
-
WebSocket Relay Federation - NAT-friendly peer communication via void-mud relay hub
- Peers auto-discover via WebSocket relay (no PUBLIC_URL required)
- Works behind NAT/firewalls - only outbound connections needed
- Relay hub at void-mud.onrender.com routes messages between peers
- Chunked transfer protocol for large payloads (memory exports 2-5MB)
- Real-time presence updates (peer joined/left notifications)
- Relay status endpoint (
GET /api/federation/relay/status) - Falls back to DHT mode via
FEDERATION_MODE=dhtenvironment variable
-
Federation Protocol Foundation - Enable void-server instances to discover and communicate
- Server identity with Ed25519 keypair for cryptographic authentication
- Federation manifest endpoint (
GET /api/federation/manifest) - Peer management endpoints (add, remove, list peers)
- Challenge-response verification for peer authentication
- TweetNaCl encryption for secure peer-to-peer messaging
- Capabilities detection (memory, chat, neo4j, ipfs, wallet)
- Health checking with ping endpoint
-
DHT-Based Peer Discovery - Decentralized peer discovery using Kademlia-style DHT
- 256-bit node IDs derived from server public keys
- XOR distance metric for routing table organization
- K-buckets (K=20) for peer organization
- Bootstrap node support for initial network entry
- Iterative node lookup with ALPHA=3 parallel queries
- Automatic peer announcement to network
- Periodic routing table refresh
- Node lookup by ID (
GET /api/federation/dht/lookup/:nodeId) - Connect to peers by Node ID (
POST /api/federation/peers/connect-by-id)
-
Neo4j Peer Management - Persistent peer storage with trust graph relationships
- Store discovered peers in Neo4j graph database
- Trust levels: unknown, seen, verified, trusted, blocked
- Health checking with automatic scoring (decay on failure, recovery on success)
- Trust score calculation based on network position (PageRank-style)
- Trust graph queries for visualization
- CRUD operations for peers in Neo4j
- Trust relationship management between peers
- Sync peers from in-memory to Neo4j persistence
-
Secure Communication - End-to-end encrypted peer-to-peer messaging
- TweetNaCl box encryption with ed2curve key conversion
- Message signing with Ed25519 for authenticity verification
- Challenge-response protocol for peer verification
- Mutual authentication between peers
- Secure message sending with automatic signature and encryption
- Crypto self-test endpoint for debugging
-
Federation UI Dashboard - Visual interface for federation management
- Server identity display with public key copy
- Copy connection info button for easy sharing
- DHT network status and node count
- Peer list with trust levels and health scores
- Trust graph visualization
- Add peers by endpoint URL or Node ID (DHT lookup)
- Remove/block/unblock peers
- Crypto self-test button
-
Memory Sync Service - Cross-instance memory sharing protocol
- Standardized memory schema for federation compatibility
- SHA-256 content hashing for deduplication
- Selective export by category, stage, tags, or importance
- Delta sync support (only new/modified memories since last sync)
- Import with collision detection and provenance tracking
- Signature verification for data integrity
- Self-import support for backup/restore
- Memory sync stats and sync state tracking
- Preview import before committing changes
-
$CLAWED Token Gate - Token-based access control for federation
- Balance verification via Solana RPC
- Tiered access levels (INITIATE → SEEKER → DISCIPLE → ACOLYTE → ASCENDED → ARCHITECT)
- Feature-based gating (read at 500K, write at 1M tokens)
- Balance caching for performance (1 minute TTL)
- Token gate configuration and check endpoints
- Token-gated memory export/import/sync endpoints
-
Memory Marketplace - Quality and reputation system for federated memories
- Memory quality scoring based on views, interactions, citations, and votes
- Age decay to favor recent content (0.99 daily decay)
- Contributor reputation tracking with 5 tiers (NEWCOMER → CONTRIBUTOR → TRUSTED → EXPERT → SAGE)
- Attribution chains for memory provenance tracking
- Upvote/downvote system for community governance
- Citation tracking between memories
- Top memories and top contributors leaderboards
- Neo4j storage for marketplace data (quality scores, votes, contributors)
-
Memory IPFS Distribution - Decentralized memory storage using IPFS
- Pin memories to IPFS for permanent, distributed storage
- CID-based memory addressing for immutability
- Memory collection pinning (multiple memories as a directory)
- Auto-pin high-quality memories based on quality score threshold
- Import memories from IPFS by CID
- Publish memories to Pinata for wider distribution
- IPFS stats and pinned memory listing
Files Added
server/services/federation-service.js- Federation identity and peer managementserver/services/relay-client-service.js- WebSocket relay client for NAT-friendly federationserver/services/dht-service.js- Kademlia-style DHT for peer discovery (legacy)server/services/peer-service.js- Neo4j peer management with trust graphsserver/services/memory-sync-service.js- Cross-instance memory sharingserver/services/token-gate-service.js- $CLAWED token-based access controlserver/services/memory-marketplace-service.js- Quality scoring and reputation trackingserver/services/memory-ipfs-service.js- IPFS-based memory distributionserver/routes/federation.js- Federation, DHT, relay, peer, token gate, and IPFS API endpointsclient/src/pages/FederationPage.jsx- Federation UI dashboard with relay statustests/e2e/features/federation/federation.feature- Federation teststests/e2e/steps/federation/federation.steps.js- Federation step definitionsdocs/FEDERATION.md- Federation guide and API reference
Improved
- Federation UI - Server ID, public key, and DHT node ID now display in full with copy buttons
- Copy Connection Info - One-click button to copy all connection details as JSON