Simplified Merkle trees-based blockchain to make transactions with Satoshis.
Requirement to aprove Algorithms 2 class at FIUBA.
To run it on Windows make sure to install MSYS2 with Mingw32,Mingw64 and Clang, then add the path to the mingw64/bin folder into the user environment variables (system config).
Once here, we'll run make within build folder with 'mingw32-make', and the resulting program .exe will run with the next arguments:
- -d, --difficulty, indicates the expected difficulty of block mining. In other words, the hash h = SHA256(SHA256(header)) must be such that the number of zeros in its most significant bits is equal to or greater than 'd'. This option is mandatory
- -i, --input, which controls the input stream of transactions. The program should receive the transactions from the file with the name passed as the argument. If the argument is "-", the program will read them from the standard input
- -o, --output, allows output to be redirected to the file passed as argument or to the standard output -std::cout- if the argument is "-".
With help of my teachers we could improve the code, as they provided testing cases and code to detect typical errors.
