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:
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.
SAMPLE (32-BYTE) HASH LENGTH OF @JACK’S TWEET:
SAMPLE (32-BYTE) HASH LENGTH OF ‘WAR & PEACE’:
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.”
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:
PROOF OF WORK
To add a block to the chain, nodes must demonstrate that they have done ‘work’ by solving an increasingly difficult computational puzzle. This process, called mining, uses a lot of computing power. In return for their work, members can receive rewards – tokens for instance, or bitcoins.
PROOF OF STAKE
Participants buy tokens which allow them to join the network. The more tokens they have, the more they can mine.
AN ADVERTISEMENT FROM OUR SPONSOR:
Crypto: Beyond currency
Blockchain’s utility extends beyond crypto currency. But which use cases are likely to be adopted?
There is a lot of hype about blockchain, but some promising uses are under development.
Blockchains are the basis of bitcoin and other cryptocurrencies.
Financial institutions have been investing in blockchains to simplify their record-keeping for payments.
Recording trades on a blockchain offers a way to check the history of a product. For example, jewelry companies hope it can assure customers that diamonds are not from places where they could finance war.
With blockchain, medical history could be securely stored and controlled by patients.
Blockchain records could create tamper-proof election returns.
Storing land records on a blockchain could cut down on costly title research and insurance. In politically unstable places, it could help prove ownership.