This repository contains a Python-based simulation of the ProShard protocol, as described in the research paper “ProShard: Proactive Sharding for Scalable Blockchains via Semantic and Predictive On-Chain Analysis”.
The simulation framework evaluates ProShard’s performance against several other sharding protocols (Static, CLPA, and an advanced reactive model) across four distinct scenarios, validating its effectiveness in mitigating congestion and improving scalability.
.csv
files for easy analysis and plotting./
├── config.py # All tunable parameters for the simulation
├── protocols.py # Implementation of the sharding protocols
├── simulator.py # The main simulation engine
├── main.py # The entry point to run all scenarios
├── README.md # This file
└── simulation_results/ # Directory created after running the simulation
├── scenario_1_steady_state.csv
├── scenario_2_workload_spike.csv
├── scenario_3_scalability.csv
└── scenario_4_reconfiguration_cost.csv
git clone https://github.com/ahmadpanah/proshard.git cd proshard-simulator
The simulation requires the pandas and networkx libraries. Install them using pip:
pip install pandas networkx
Execute the main.py script from your terminal. It will automatically run all four scenarios. The simulation will take a few minutes to complete, depending on your system’s performance. python main.py
When you run the script, you will see:
simulation_results
will be created in the project rootThis directory will contain four .csv
files with the summary data, which can be opened in any spreadsheet software for further analysis or plotting:
scenario_4_reconfiguration_cost.csv
This implementation is based on the research paper: ProShard: Proactive Sharding for Scalable Blockchains via Semantic and Predictive On-Chain Analysis by Seyed Hossein Ahmadpanah and Meghdad Mirabi.