simcoin: Blockchain simulation framework with Docker and Python

Quantum Blockchain

Simcoin – A Blockchain Simulation Framework 🏗️

Simcoin facilitates realistic simulations of blockchain networks (currently Bitcoin only). The network is virtualized by the simulation software on one single Unix host machine. To be able to spawn multiple peers the CPU-heavy proof-of-work is deactivated. Blocks and transactions are created by sending respective commands over RPC to the nodes according to a pre-configured simulation scenario.

simcoin

Getting started 🏁

Prerequisites: python3pip3dockermake and R. Check if you have them installed.

  • git clone https://github.com/simonmulser/simcoin.git
  • cd simcoin
  • make install (if fails check output, you may need to install other dependencies depending on your OS)
  • make build-image (consider to use multiple threads to build the image – check Dockerfile under code/docker)
  • make demo
  • check out results under data/last_run and the generated report data/last_run/postprocessing/report.pdf

Stack 📚

Performance 🚀

When running a simulation, monitor the host machine closely. Check utilization of RAM, CPU, Disk, and Network. Further, control the log created by the host system (dmesg) as well as the log produced by the simulation framework (data/debug.log) and nodes (data/last_run/node-X/debug.log). To improve the performance consider the following:

  • Increase the ARP-cache if you encounter a neighbor table (ARP-cache) overflow in the kernel messages (dmesg).
  • Run the whole simulation in RAM by using tmpfs.
  • Use a better host machine! 😉

Copyright (c) 2017 Simon Mulser
Source: https://github.com/simonmulser/