Skip to content
czxdevPublic

About

ChainXim-based simulation of BagChain

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

84 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BagChain

Source code for the simulations in the paper "BagChain: A Dual-functional Blockchain Leveraging Bagging-based Distributed Learning". This project is built upon a previous version of ChainXim.

Prerequisites

Environment

  1. Install Python 3.9 or higher.

  2. Install Graphviz and add the directory containing the dot executable to the PATH environment variable.

  3. Install dependencies: pip install scikit-learn torch matplotlib networkx scipy graphviz pandas numpy urllib3

Datasets

Download the datasets from google drive and place them in the tasks/datasets/ directory.

Simulation

Run any of the ython scripts starting with 'experiment' to start a simulation. These scripts can generate the simulation results shown in the figures in the simulation section.

Figure Script
Fig. 7 experiment_global_base_iid.py
Fig. 8 experiment_global_base_niid.py
Fig. 9 experiment_imbalance.py
Fig. 10 experiment_sync_random.py
Fig. 11 experiment_network_delay.py (in branch main)
Fig. 12 experiment_network_delay.py (in branch cross-fork-sharing)

About

ChainXim-based simulation of BagChain

Resources

Stars

2 stars

Watchers

1 watching

Forks

Contributors

Languages