If you have followed banking, investment or digital currency news for any length of time, you have probably come across the word "blockchain" — the technology that stores the record behind Bitcoin. It is worth taking the time to understand it properly. Whenever you set out to learn about blockchain, you tend to run into a definition along the lines of "a blockchain is distributed, decentralized and public", which is not especially helpful on first reading.
The good news is that blockchain is genuinely easy to understand, however confusing the standard definition sounds.
What is blockchain?
If the technology is so complicated, why does the business world treat blockchain as something anyone can grasp at a basic level? Because a blockchain is, quite literally, a chain that links blocks together. That is the direct translation, but it is not what the words mean here. When we talk about "blocks" and "chains" in this context, we are talking about digital information — the block is the data, and the chain is the database it is stored in.
The "blocks" of a blockchain are made up of digital information, and they hold three things:
- Blocks store the details of a transaction: the date, the time and the amount of a purchase you made on a site such as Amazon. (Note: the Amazon purchase here is only an illustration. Amazon does not run on a blockchain.)
- Blocks store information about who took part in the transaction. A block recording your Amazon purchase would record your participation along with Amazon.com, Inc., but instead of using your real name it records a "digital signature" — something closer to a username than to an identity document. Your purchase history is recorded without personally identifying you.
- Blocks store information that distinguishes them from every other block. Just as you and I have names that tell us apart, each block stores a unique code called a hash, which separates it from every other block. So when you pay for something on Amazon and that transaction goes through, the next transaction can follow it — and even if the details of your transaction look almost identical to the one before it, the hash guarantees that each block is still stored as its own distinct record.
The example above treats a block as though it stored a single Amazon purchase, which is not quite how it works in practice. Each block on a blockchain can hold up to roughly 1 MB of data, depending on the size of each transaction, which means a single block can hold thousands of transactions at once.
How blockchain works
When a block stores new data it is added to the blockchain, which is exactly what the name describes: a series of blocks linked together. For a block to be added to the chain, four things have to happen.
- A transaction has to take place. You buy something on Amazon with your account. After you click to confirm the order, the transaction exists and the next one can follow it.
- That transaction has to be verified. After the purchase is made, it has to be checked. With other public records — a securities exchange, Wikipedia, your local library — there is someone whose job it is to verify new entries. On a blockchain that job is left to a network of computers, usually thousands of them, spread around the world. (On the Bitcoin network the number of participating machines runs into the millions.) When you place the order, that network checks that the transaction happened the way you say it did, confirming the details: the time, the amount and who took part.
- The transaction has to be stored in a block. Once your transaction has been checked and confirmed, the details — the amount, your digital signature and Amazon's digital signature — are stored together in a block, alongside possibly hundreds or thousands of others.
- The block has to be given a hash. Once all of a block's transactions have been verified, the block must be given a unique identifying code called a hash. Only once it has been hashed can the block be added to the blockchain.
When a new block is added to the blockchain it becomes publicly available, and anyone can look at its contents — including you. If you look at a Bitcoin blockchain explorer, you will see that you have access to the transaction data, including when the block was added ("Time"), where it sits in the chain ("Height") and who added it ("Relayed By").
Is blockchain private?
Anyone can view the contents of a blockchain, but to do so you connect your computer to the blockchain network. Once connected, your computer receives a copy of the blockchain, which updates automatically each time a new block is added — much like a social feed updating when someone posts something new.
Every computer on the network keeps its own copy of the blockchain, which means there are thousands of copies — millions, in Bitcoin's case — of the same chain. Because every copy is identical and the data is spread across the whole network, it is extremely difficult to manipulate. There is no single, authoritative ledger sitting in one place for an attacker to alter. To change anything, they would have to alter every copy on the network at once.
If you look at a Bitcoin blockchain explorer, you will notice that you did not have to log in or identify yourself in order to see the transactions. Blockchain transaction data is not completely anonymous, but personal identifying information is kept out of it — what appears is a digital signature or a username, not a person.
Which raises the obvious question: if you do not know who added a block to the chain, why would you trust the chain, or the network of computers maintaining it?
Is blockchain secure?
Blockchains are made secure and trustworthy in several ways at once. First, new blocks are always added in a line and in chronological order — a new block goes on the "end" of the chain. If you look at a Bitcoin blockchain explorer, you will see each block's position in the chain, labelled "Height". In February 2019, for example, the height stood at around 562,000.
Once a block is added to the end of the chain, going back and altering its contents becomes extremely difficult. Each block contains its own hash as well as the hash of the block before it. Hashes are produced by a mathematical function that turns digital information into a string of numbers and letters, and if that information is edited in any way at all, the hash changes with it.
That property is what makes the chain secure. Suppose an attacker wanted to alter your Amazon transaction so that you had to pay twice. The moment they changed the amount, that block's hash would change — but the block after it in the chain would still carry the old hash. To cover their tracks, the attacker would then have to update that block too, which would change its hash, and so on down the chain.
Changing a single block therefore means changing every block that follows it, and recalculating every one of those hashes takes an implausible amount of computing power. Put simply: once blocks are added to a blockchain they are very hard to alter and effectively impossible to delete.
As for trust, blockchains test the computers that want to join the network and add blocks to the chain. These tests are called consensus models, and they require a participant to "prove" itself before it can take part. The best-known example, used by Bitcoin, is called proof of work.
Under proof of work, a computer has to prove it has done "work" by solving a complex mathematical problem. Solve one, and it earns the right to add a block to the blockchain. Adding blocks this way — mining, in cryptocurrency terms — is not easy. According to the blockchain information site BlockExplorer, as of February 2019 the odds of solving one of these problems on the Bitcoin network were about 1 in 5.8 trillion, and a computer needs to run powerful, energy-hungry programs to have any realistic chance at all.
Proof of work does not make an attack impossible, but it makes it a waste of effort. An attacker wanting to tamper with the chain would face the same 1 in 5.8 trillion odds as everyone else, and the cost of the computing power required would almost certainly exceed anything they stood to gain.






Share:
What is LoRaWAN, and how does it relate to IoT?
A warning every Trezor user should read