Levin is a Lightning Network simulator for evaluating network construction, payment routing, and node behavior in the Lightning Network.
- Simulate Lightning Network topology and behavior
- Evaluate different routing strategies
- Test node actions and their impact
- Support for concurrent transactions
- Configurable network parameters
- Data persistence and analysis
- Python 3.x
- Pipenv (for dependency management)
# Clone the repository
git clone https://github.com/yourusername/levin.git
cd levin
# Install dependencies
pipenv install
# Activate virtual environment
pipenv shell
# Run simulation with templates
python3 src/main.py [TEMPLATE_NAME_1] [TEMPLATE_NAME_2] [TEMPLATE_NAME_3] ...
[Coming Soon]
Levin can be automatically deployed to Microsoft Azure using Terraform. The deployment process:
- Creates necessary Azure resources
- Uploads and executes the simulation
- Downloads results
- Automatically cleans up resources
To deploy:
- Configure template files in
terraform/run.sh
usingCONFIG_FILES_TO_RUN
(space-separated list) - Run the deployment:
bash clean.sh
cd terraform
bash run.sh
- ✅ Channel re-opening
- ✅ Re-opening count tracking
- ✅ Multiple run averaging
- ✅ Simplified debugging numbers
- ✅ Initial channel opening tracking
- ✅ Network data file input
- ✅ Concurrent agent execution
- ✅ Hop-based transaction delays
- ✅ Query limits per route
- ✅ Random delay variation
- ✅ Parallel path queries
- ✅ Partial path node querying
- ⬜ Multipath payment support
MIT License Copyright (c) 2024 Levin