How fmorsbach/decfl works
Project type and purpose
• DecFL is a decentralized federated‐learning orchestration framework. It is built in Go with two main binaries (a deploy CLI and a worker service), uses Python/TensorFlow for the actual ML tasks, relies on an Ethereum smart contract for coordination, and can store model artifacts in either Redis (local/dev) or IPFS (distributed).
File structure
• Top-level directories:
• app/ → two Go programs:
– app/deploy (deploy.go) – CLI to deploy a model smart contract & push config/scripts to storage
– app/worker (worker.go + Dockerfile) – worker agent that executes training rounds
• model/ → core library with three drivers:
– chain/ (Ethereum interfaces & contract bindings)
– storage/ (Redis and IPFS drivers)
– training/ (TensorFlow driver invoking Python scripts)
• res/ → example model definitions (MNIST, CIFAR10) with configs, weights, and Python scripts
• scenarios/ → per-scenario config for local (ganache+redis) or remote (Infura+IPFS) setups
• multi-node-deployment/ + playbooks/ → Ansible playbooks and YAMLs for multi-host deployment & monitoring
• root scripts (.sh) → build, env setup, deploy_training.sh, start_training.sh, etc.
README for architecture insights
• Two scenarios:
1) Local: Docker Compose spins up ganache-cli, Redis, 3 worker containers
2) Multi-node: Ansible provisions hosts, each with Docker, IPFS node, shared Ethereum node (Infura)
• Workflow: setup env → deploy model (deploy_training.sh) → invoke workers (start_training.sh) → track progress via logs or Prometheus/Grafana