This repository is for our submission.
- HyperLedger Fabric v2.2.x LTS
- Download this repository, and merge BEAS/fabric-samples with the HyperLedger fabric-samples directory.
$ cd fabric-samples/blockchain-network
$ ./network.sh fedchain
2. Each client has a lightweight server based on node.js listening and processing requests off the chain.
- Create a working dictionary in fabric-samples
$ cd fabric-samples/offchain-server
- Install server dependancies:
$ npm install
- Run web server for each client:
$ node client.js
- Install Caliper dependancies:
$ npm install --only=prod @hyperledger/caliper-cli
$ npx caliper bind --caliper-bind-sut fabric:2.1
- Start 10 clients
$ ./start_clients.sh 10
- End
$ ./end.sh
4. To facilitate the performance comparison of various federated learning methods, we implemented an off-chain version to simplify operation.
- Modify the hyperparameters in ./config/conf.json
- Run the script such as:
$ python main.py -c ./config/conf.json