The root directory contains these files:
- blockChainSimulator.cpp : It contains the blockchain simulator code.
- makeGraph.sh : It creates python scripts which can be used for visualization purposes,It generates Blockchain at first 10 nodes.
- run.sh : It is used to compile and run the file blockChainSimulator.cpp
- README.md : This very file.
- cleanFolder.sh : Cleans current folder of SVG, Python and Text Files. Required when you stop run.sh in the middle due to long execution time.
Instructions to run the simulator: ./run.sh <outputDirectory> <SimulationTime> <NumberOfNodes> <percentageSlowNodes> <nodeConnectionProbability>
Parameters:
- outputDirectory:Name of Directory where you want to dump the input
- SimulationTime:Time in Seconds for which you want to simulate
- NumberOfNodes: Number of Nodes in Network
- percentageSlowNodes: This should be b/w 0 and 100 and signifies percentage of Slow Nodes in Network
- nodeConnectionProbability: Probability of making any edge in the Network. Its value should be between 0 and 1
OutputFiles:
- SVG Files: Pictures of Node Structure and Blockchain structure on first 10 nodes.
- blockChainTreeOf.py: Shows Blockchain and Other details of blocks inside each node.
- blockInfoFile.txt: Shows Info of generated blocks during full simulation.
- initialMoney.txt: Shows Coins with each Node initially.
- FinalMoney.txt: Shows Coins with each Node after end of Simulation.
- UnspentTransactionsOf.py: Shows Transactions at each node which are not in longest chain at end of simulation.