ChainFL is a modular simulation framework for Federated Learning with blockchain-based trust and model integrity mechanisms. Designed for experimentation, research, and education in secure and decentralized AI.
- Federated Learning with pluggable aggregation (FedAvg, etc.)
- Blockchain-simulated model registry with PBFT-style consensus
- Agent-based training, hashing, signing, and verification
- Support for Sybil attack simulation and trust audits
- YAML-based configuration and modular architecture
[Simulation] β [Agent Nodes] β [Consensus Engine] β [Blockchain Ledger]
β β β
[Scheduler] β [Coordinator: Aggregator + Publisher]
chainfl/
βββ agent/ β Model training, hashing, signing
βββ blockchain/ β Ledger, consensus, validators
βββ coordinator/ β Aggregation, verification, publishing
βββ simulator/ β Rounds, metrics, scheduler
βββ utils/ β YAML loader, crypto helpers
βββ examples/ β Run scenarios: minimal, sybil attack
βββ tests/ β Pytest unit tests
βββ config/ β default.yaml configuration
git clone https://github.com/yourname/chainfl.git
cd chainfl
pip install -r requirements.txt
python examples/minimal_chainfl_run.py
MIT License β see LICENSE
Created by Tymoteusz Miller