ProShard

ProShard: A Proactive Sharding Protocol Simulator

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.

Features

Repository Structure

/
├── 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

Prerequisites

How to Run

1. Clone the Repository

git clone https://github.com/ahmadpanah/proshard.git cd proshard-simulator

2. Install Dependencies

The simulation requires the pandas and networkx libraries. Install them using pip:

pip install pandas networkx

3. Run the Simulation

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

Expected Output

When you run the script, you will see:

This directory will contain four .csv files with the summary data, which can be opened in any spreadsheet software for further analysis or plotting:

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.