A Blockchain application with federated learning model using neural networks.
Please read the step-by-step implementation tutorial to get your answers :)
Please read the step-by-step tutorial to get your answers :)
Clone the project,
$ git clone https://github.com/Mandeep3838/Blockchain-machinelearning.git
Install the dependencies,
$ cd Blockchain-machinelearning
$ pip install -r requirements.txt
Start a blockchain-federated learning model,
$ chmod 777 miner_script.sh clients_script.sh kill_sessions.sh
$ ./miner_script.sh
On a different Terminal
$ ./clients_script.sh
- Two instances of blockchain node are now up and running on port 8000,8001.
- Client nodes are running on ports {5000,5001,...,5010}
- Testing node is running on port 9000
- You can check results on the firefox browser
- Error files for each client and test node are saved in the working directory as blocks are added.
- For checking chain, refresh http://127.0.0.1:8000/chain
- Demo Video
- Miner Node
- Client Node
- Default app takes two client nodes as malicious, you can increase the maliciousness by changing z variable in the clients_script.sh
- Increasing Network (Requires Higher Computational power)
- You can increase the miner and client nodes by increasing the limit of for loops in miner_script.sh, clients_script.sh
- In Miner Script
- Replace 8001 by 80xx
- In Client Script
- More curl lines to set up a network.
- Add new peer in the peers array.
- Replace 5010 by 50yy, 8001 by 80xx
- Modify start and end variable, as the share of data available to each client from 1100 rows.
- In kill_session Script
- Replace 5010 by 50yy, 8001 by 80xx
- Run the bash script
Present in the docs directory