System architecture and component diagram for the CompressNode platform.
System Overview
CompressNode consists of four layers: smart contracts (Base chain), a Next.js web application (dashboard + API), the node daemon (Python), and the operator's GPU hardware. Each layer communicates through well-defined interfaces.
On-Chain Layer (Base)
Three Solidity contracts deployed on Base mainnet handle all trustless operations: node registration (NodeRegistry), job escrow and payments (JobRegistry), and verification challenges (VerificationEngine). These contracts are the source of truth for node state, payments, and reputation.
Web Application (Next.js)
The Next.js 15 app serves the landing page, documentation, explorer, and operator dashboard. It reads on-chain data via viem and Privy for wallet authentication. Six API routes handle job submission, node heartbeats, and explorer data feeds.
Node Daemon (Python)
The compressnode CLI package runs on the operator's GPU machine. It includes:
- FastAPI server - receives inference requests on port 8080
- Inference engine - loads GGUF models via llama-cpp-python with GPU offloading
- Challenge watcher - polls VerificationEngine for challenges and auto-responds
- Heartbeat loop - keeps the backend aware the node is online
- Chain client - signs and sends transactions via web3.py
Data Flow
Job flow: User → API → JobRegistry (ETH escrow) → Node assigned → Daemon runs inference → Node calls completeJob() → ETH released. Verification flow: Backend → VerificationEngine (issueChallenge) → Daemon detects event → Runs inference → Daemon submits responseHash on-chain → Contract verifies.