Lightning Network Channel and Capacity Selection
Please make sure you have installed python3.8 or higher versions of python.
git clone https://github.com/AAhmadS/Lightning-Network-Centralization
cd Lightning-Network-Centralization
All dependencies will be handled using the command :
pip install -r requirements.txt
python3 -m scripts.ln_channel_opening --algo PPO --model Transformer --tb_name PPO_tensorboard
python3 -m scripts.baselines --strategy random
python3 -m scripts.evaluation --model --model Transformer
ln_channel_opening:
| Parameter | Default | choices |
|---|---|---|
| --algo | PPO | PPO, A2C |
| --total_timesteps | 200000 | Arbitrary Integer |
| --max_episode_length | 10 | Arbitrary Integer less than total_timesteps |
| --counts | [10, 10, 10] | List of Integers |
| --amounts | [10000, 50000, 100000] | List of Integers |
| --epsilons | [.6, .6, .6] | List of floats between 0 and 1 |
| --capacity_upper_scale_bound | 25 | Arbitrary Integer |
| --max_capacity | 1e7 | Arbitrary Integer |
- You can modify the transaction sampling parameters by changing counts, amounts and epsilons
countscontains count of each transaction type.amountscontains amount of each transaction type in satoshi.epsilonsis the ratio of merchants in final sampling.
- Please note that length of counts, amounts and epsilons lists should be the same. baselines:
| Parameter | Default | choices |
|---|---|---|
| --strategy | top_k_betweenness | random, top_k_betweenness, top_k_degree, bottom_k_betweenness, bottom_k_degree |
You can check the results on tensorboard.
tensorboard --logdir plotting/tb_results/
If you are facing problems with tensorboard, run the command below in terminal :
python3 -m tensorboard.main --logdir plotting/tb_results/
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International license.
