A module to understand the working of blockchains for humans.
The example code is in Python (version 2.7 or higher will work).
- import hashlib
- import datetime
A blockchain is a continuously growing list of records, called blocks, which are linked and secured using cryptography. Each block typically contains a hash pointer as a link to a previous block, a timestamp and transaction data. By design, blockchains are inherently resistant to modification of the data. A blockchain can serve as "an open, distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way."
The first distributed blockchain was conceptualised by an anonymous person or group known as Satoshi Nakamoto, in 2008 and implemented the following year as a core component of the digital currency β bitcoin β where it serves as the public ledger for all transactions.
For more information, see
To run the code, type python block_chain.py
python block_chain.py