Ask 10 people, “What is blockchain technology?” And you will get 10 different answers – even if they are crypto-enthusiasts. The best approach to a true understanding of blockchain is learning its 3 basic technologies.
In this article we will review those three main components of blockchain technology:
- blockchain itself,
- peer-to-peer networks,
- consensus mechanism.
Bitcoin cannot exist if any of these components is missing. Let’s start with the blockchain.
1. Understanding blockchain.
Simply stated, blockchain is just a way of structuring data. That’s all! This is a register (or ledger): a file that tracks accounting records.
You can compare this file to a book that never ends.
Each page of the book contains information and a page number at the bottom. By the page number, you immediately know where this page is in the book. Obviously, page 49 is located between pages 48 and 50.
Like book pages, blocks of the blockchain are filled with information. Although the blocks do not have exact numbers, they have a timestamp that performs the same function. A new block is always added after the block with the latest timestamp. And this way a chain is formed.
The great news about blockchain is that it uses cryptography to track when any information on any page in the book has changed. This feature makes the blockchain a good data structure to track the integrity of a record of something valuable and important.
In Bitcoin blockchain, the blocks contain information about transactions. Each block indicates bitcoin transfers receiver and sender data.
Since the bitcoin blockchain was used to track the transactions of all bitcoins from the moment they were created, it is always possible to check and know exactly who owns bitcoins and how much he/she has got.
The transaction occurs only after it is included in the block and the block is added to the chain. Therefore, when the block is added to the chain, the state of the block is updated. And finally, the bitcoins are transferred.
This means that if I want to check whether someone actually made a transaction to me or not, I should check the status of the blockchain. To do this, the book should be publicly available. Here, peer-to-peer networks come in.
2. Understanding the role of peer-to-peer networks
To use blockchain as a ledger for recording transactions, you need to be able to check the block for whether the transaction was committed to your address or wallet.
If blockchain was stored only on one computer and suddenly it turned out that it was disabled, then it would be very inconvenient, to say the least. In fact, the current state of the blockchain is loaded, synchronized and provided by many computers all over the world.
These computers are called “nodes”, and they work together in a peer-to-peer network to ensure that the blockchain is safe and up-to-date. Each of these nodes stores a complete, updated version of the blockchain. Each time a new block is added, all the nodes update their blockchain. Using a peer-to-peer network has certain advantages:
- You can always check the status of the blockchain using blockchain explorer.
- You do not need to rely solely on the only one side to know the true state of the blockchain.
- You do not need to rely on the security of the only one server to know that the block is protected.
- An attacker would have to hack thousands of computers at the same time, not just one server.
- There is always the certainty that the blockchain will never disappear. In order it could happen it must be destroyed by all nodes.
All of these points are very important, but it does not mean that the blockchain is reliable enough to be used to store transactions.
For example, how do you know that all transactions in the block are correct? How do I know if there are no invalid transactions in the blocks? And if there are different versions of the blockchain, how do we know which ones are true?
All these issues are solved by a consensus mechanism, using of which became possible thanks to the peer-to-peer network.
3. Understanding the consensus mechanism
The P2P network mechanism was implemented in 1999 by Napster (a file-sharing peer-to-peer network). Blockchain also existed before Bitcoin.
The ingenious Satoshi Nakamoto, the mysterious and anonymous founder of Bitcoin, combined blockchain and a consensus mechanism based on cryptography. The consensus mechanism is where the real magic happens: it allows nodes in the peer-to-peer network to work together, without knowing and trusting each other.
“The goal of the consensus algorithm is to ensure a secure state update in accordance with certain specific rules of state change when the right to perform a state change is distributed among (…) users who are granted the right to collectively perform a change through an algorithm” – Vitalik Buterin
Now, if you still do not understand this, the consensus mechanism is just a set of rules that is coordinated by the nodes in the network, launching the network software. These rules ensure that the network operates as intended and remains synchronized.
The consensus protocol establishes the following rules:
- How should blocks be added to the chain.
- When the blocks are considered valid.
- How conflicts are resolved.
Adding blocks to the block
Different blockchains add blocks to their chains in different ways. The best-known consensus mechanism is the Proof of Work (PoW) by Bitcoin.
The first rule of PoW is that one block should be added to the blockchain, on average, every ten minutes.
This process is called “mining”. Nodes trying to add a block to the chain (called “miners”) use the computing power of their computers to try to solve a cryptographic “puzzle”. The rules state that only when this puzzle is solved, the block can be added to the blockchain.
Miner, who solves the puzzle, and “mines” (extracts) a new block to add it to the blockchain, is rewarded by the network. He is given a certain predetermined number of new coins, together with all transaction costs of all transactions contained in this new block.
Proof of Stake (PoS) is also widely used in distributed ledgers. In the “Proof of Stake” mechanism, you can “bet” on your coins to be able to add the next block to the block. Like the bettor says: “I bet my coins, that I will add this block correctly.” If he lies, he will lose his coins.
There is a wide discussion about which consensus mechanisms are best. However, no matter how the block is created, other nodes in the network still need to be able to determine whether the block is valid or not.
When the miner solves the puzzle and forms a new block, all nodes in the network will check if the block is valid, and add it to its copy of the block. First, nodes need to reach a consensus on reality. Only then the network is synchronized and the state of blockchain updates.
The nodes will add the newly created block to the chain only if it follows the rules outlined in the consensus mechanism protocol. The protocol software checks whether the block is valid or not. The invalid block will simply be rejected.
Obviously, the block will be valid if all the transactions contained in it are valid.
The rules also specify that the transaction is valid only if it is signed with the digital signature of the bitcoin owner. Only the person who controls the wallet or the address from which bitcoin is sent can sign the transaction. So only you can spend your bitcoin.
How conflicts are resolved
It can happen that two miners simultaneously add real blocks to the blockchain. Imagine that a part of the nodes took one valid block, and the other part took another valid block. Now we suddenly have two different states of blockchain at the same time!
We call this the unintended “fork”: the block is branched into two different chains. Who was my bitcoin? Which of the two branches of the blockchain is “true”?
As a rule, all consensus protocols solve this problem with a simple rule: the longest chains win.
When we have an unintended fork, some miners will start to harvest new blocks in one chain, while others will start mining in another chain. Inevitably, one of the chains will have more miners than the other, and accordingly, it will be faster to add new blocks to its chain. The rest of the miners will move to a longer chain, and the other forked chain will wither away, its growth will stop. In this case, the main chain will not be damaged.
Examples of using blockchain in different areas, in addition to finance
Identification of a person. Services of person identification and confirmation of access rights work based on the technology of the blockchain. They create a digital analog of ID card. These start-ups are already brought this idea to life: HYRP (biometric authentication), BlockVerify (Anti-Counterfeit Solution), OneName and others.
Copyrights. The Ascribe platform uses a complementary ledger in which artists, musicians, developers and inventors can store copyrights using encrypted identifiers.
Voting. So far, the open registry is used only for private voting. However, at the University of Virginia, they want to introduce a technology based on blockchain. This will reduce the likelihood of falsification to zero.
Governance and legislation. The potential of Blockchain in this domain is unlimited. It is possible to create a system with reporting by representatives of local and state authorities, storing data on the budget etc. Some projects like Borderless, already tried to combine legal and economic domains.
Charity. Blockchain with its ability to record and store data is very effective charity domain. For instance, in the GiveTrack platform there is an open information about the donations to the funds and their progress. This is an effective tool in the fight against “terrorists of charity.”
Real estate. The introduction of blockchain into the real estate sector is capable of significantly improving it: the process of buying and selling will accelerate, a tool for the reliable storage of data on property rights will appear and so on. Blockchain can be useful for reporting, authenticating something, storing data etc. Its potential is unlimited in the real estate domain.
This article revises the very basic points about the work of distributed ledgers.
Is it real to know about all the opportunities and possibilities of blockchain? No. 99.9% of people do not need this. It is more important to understand the basic principle of technology and the ways it may be applied.
However, the next time someone mentions blockchain at a party, just say: “Hey, you know, blockchain is just a way of structuring the data. I think you mean a distributed ledger used for record keeping, which is placed in a P2P network consisting of nodes and miners whose collaboration is governed by a consensus protocol that establishes network rules.”
At the same time, it is maybe time to agree that this term has turned into a comprehensive concept, pointing to the synthesis of technologies that make distributed ledgers possible.
And if you still didn’t catch the point of the blockchain, these resources are here for you.