A Project to simulate various strategies in Proof-of-Work Mining to explore the effects of strategic deviations.
make
./simulator <number_of_nodes> <distance_matrix_csv> <number_of_rounds> <randomness_file_csv> <strategy_no_fast_nodes> <strategy_no_slow_nodes>
where
- Distance Matrix : A nxn matrix that contains the distance of each node to
every other node, that is
D[i][j]
is the number of rounds taken for a message from node i to reach node j. - Randomness File : A file that contains the lottery values for each node in each round, if this value is below a certain threshold the node gets to mine a block.
- Strategy No : This strategy number corresponds exactly to the strategies S1-4 used in the paper, the first number corresponds to the strategy for the first node and the second number corresponds to the strategy for the second node
In order to run an instance of the simulation used in generating the payoff matrix in Table 1 of the paper:
./simulator 100 data/Distance_Network_3_Asymmetric.csv 40 data/Randomness_1.csv 4 4
Replace Randomness_1.csv with Randomness_<1-100>.csv to try different random simulations.
Note: Randomness files are used to compare results between different strategies and network conditions, which would be difficult if different random numbers were used in every instance.
In addition, various different Distance Matrices are also provided:
Distance_Network_3_Asymmetric.csv
: Contains 50% slow nodes and 50% fast nodesDistance_Fair.csv
: All nodes are fast nodesDistance_Farm.csv
: A hypothetical scenario where 10% of the nodes are a part of a mining farm with negligible network delay among themselves