How gonka-ai/gonka works
Project type and purpose
• Gonka is a decentralized, containerized AI infrastructure made of three primary node types:
• Chain node (inference-chain) – a Cosmos-SDK blockchain that handles consensus, state management, on-chain governance and task receipts.
• API node (decentralized-api) – a Go microservice that bridges user/developer requests, off-chain orchestration, validation scheduling, and submits transactions to the chain.
• ML node (mlnode) – a Python/Docker service running AI workloads (training, inference, Proof-of-Work 2.0), exposing gRPC/REST endpoints to the API node.
• Supporting artifacts: cosmovisor for chain upgrades, client-libs for scripting, Testermint for integration tests, Kubernetes manifests and Docker Compose for deployments.
File structure
• Top-level directories show clear service separation:
• /inference-chain – blockchain application written in Go (Cosmos SDK modules under x/…/, cmd/inferenced, app).
• /decentralized-api – coordination layer in Go, with packages for event listeners, broker, cosmosclient, gRPC/REST handlers, SQLite config store.
• /mlnode – Python packages for inference, training, GPU management, POW, service management, plus Dockerfiles and integration/unit tests.
• Deployment artifacts:
• /local-test-net, /test-net-cloud – Docker Compose and K8s configs.
• /proxy, /proxy-ssl, /tmkms – reverse proxy, SSL automation, key management.
• CI/CD:
• .github workflows for build, test, deploy.
• Integration tests:
• /testermint – Kotlin-based end-to-end tests emulating ml nodes with WireMock.
README insights
• Modular microservices communicating via REST/gRPC and event-driven patterns.
• Emphasis on containerization, independent scaling, and composable deployments.
• Core orchestration flows: developers use a CLI → API node → ML node execution → API schedules validation → submits proofs to chain.