A simple single page python code that simulates the creation and validation of blocks in a fake blockchain
- Genesis block creation
- SHA-256 hashing
- mining with adjustable difficulty
- Block linking using previous block hashes
- Chain validation that checks integrity and proof of work
- each block contains: data, a timestamp, hash, previous hash, and nonce
- difficulty determains the number of "0" required at the start of a hash to validate a block
- nonce loops through different values until valid hash is found
- validation checks hash against previous hash, and calculated hash, and whether it starts with ("0" * difficullty)
- output showcases the processess in the blockchain (mining, validation, chain display...)
- Python 3.x
- A device with an OS (hopefully not windows XP) :p