Code Monkey home page Code Monkey logo

fabric-project's Introduction

Federated Learning on Hyperledger Fabric

FL + CPABE + Paillier encryption on Hyperledger Fabric

Directory Structure

.  
├── FabricChain  
│   ├── HEFL_Test (chaincode)  
│   ├── SDK_HEFL_Test (NodeJs SDK for Fabric)  
│   ├── hyperledger.yaml (create environment in Anaconda)  
│   └── one-click.sh (create test-network and deploy chaincode on Fabric)    
├── fabric_proj  
│   ├── local (for local training) 
│   └── charm.yaml (create environment in Anaconda)    
├── LICENSE  
└── README.md  

Create Environment

  • install Anaconda first

for local training (charm-crypto)

  • modify "prefix" in charm.yaml first
  • charm-crypto 這個套件直接安裝有可能會有問題,可以先試用下面的方法複製環境,不行的話可參考下方提供的方法自行安裝
cd fabric_proj/
conda env create -f charm.yaml 

for Hyperledger

  • modify "prefix" in hyperledger.yaml first
cd FabricChain/
conda env create -f hyperledger.yaml 

Help

建環境時若有問題,可以參考以下資料(我之前做的一點紀錄)

Usage

Local (Python)

cd fabric_proj/local

# training
python main.py --dataset MNIST --inclients 5 --budget 4e-3 --mode 1

# testing (ours)
python main.py --test

Fabric

  • 根據 Help 中第二點安裝完 Hyperledger Fabric Sample (fabric-samples) 後,將FabricChain資料夾下的 HEFL_Test、SDK_HEFL_Test、one-click.sh,放在 fabric-samples/test-network/ 路徑下
  • basic operation on Fabric: https://pse.is/4ledyv

fabric-project's People

Contributors

bill130287 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.