Skip to content

TyMill/ChainFL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChainFL

PyPI version DOI Python License Docs Code Style Tests Downloads

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.

πŸš€ Features

  • 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

πŸ“Š Architecture Diagram

[Simulation] β†’ [Agent Nodes] β†’ [Consensus Engine] β†’ [Blockchain Ledger]
         ↓                        ↑                        ↓
   [Scheduler]        ←    [Coordinator: Aggregator + Publisher]

πŸ“ Project Structure

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

πŸ“¦ Installation

git clone https://github.com/yourname/chainfl.git
cd chainfl
pip install -r requirements.txt

πŸ§ͺ Run an Example

python examples/minimal_chainfl_run.py

πŸ“œ License

MIT License – see LICENSE


Created by Tymoteusz Miller

About

🧠 Blockchain-Enhanced Federated Learning Simulator for Secure AI Collaboration

Resources

License

Stars

Watchers

Forks

Languages