Reuters made an excellent post to explain how Blockchains work:
A blockchain is a database that is shared across a network of computers. Once a record has been added to the chain it is very difficult to change. To ensure all the copies of the database are the same, the network makes constant checks. Blockchains have been used to underpin cyber-currencies like bitcoin, but many other possible uses are emerging.
Records are bundled together into blocks and added to the chain one after another. The basic parts:
The record — The block — The Chain
Can be any information, a deal for example — A bundle of records — All the blocks linked together
Here’s how a deal gets included in a blockchain:
A trade is recorded. For example, let’s say Mr Pink is selling two of his coins to Mr Green for $100.
The record lists the details, including a digital signature from each party.
The record is checked by the network. The computers in the network, called ‘nodes’, check the details of the trade to make sure it is valid.
The records that the network accepted are added to a block. Each block contains a unique code called a hash. It also contains the hash of the previous block in the chain.
The block is added to the blockchain. The hash codes connect the blocks together in a specific order.
Difficult to change
Hash codes keep records safe.
A hash code is created by a math function that takes digital information and generates a string of letters and numbers from it. Let’s take a closer look at two important characteristics of hash codes:
First, no matter what the size of the original file, a hash function will always generate a code of the same length. For example, the first tweet from Jack Dorsey was much shorter than “War and Peace” by Leo Tolstoy, but they would yield hashes of the same length.
Second, any change to the original input will generate a new hash.
So if someone decided to delete just one comma from Tolstoy’s 587,287-word masterpiece, it would show up, because the hash would change.
The changed hash breaks the chain.
The next block in the chain still has the old hash, so to restore the chain a hacker would have to recalculate that. And the next, and so on. Recalculating all those hashes would take an enormous amount of computing power.
The computers in the network
Unlike traditional ledgers, a blockchain database is decentralized and has no “master.”
Centralized network — Decentralized network
Authority is held by a central node. — All the nodes can access the information and compete to be the next to add to the database.
Permission to join
Without centralized control of a network, trust is a problem. One answer is to only let people you know, such as company employees, join in. But blockchains such as the bitcoin network are open to anyone. Members are anonymous. There is no way to know if they are trustworthy.
To resolve this and build trust, these blockchains set tests for the computers that seek to join and add records to the chain. The tests are called consensus models.
Reaching a consensus
The tests require network members to ‘prove’ themselves. Some examples:
There is a lot of hype about blockchain, but some promising uses are under development.