Latest posts by Thijs Maas (see all)
- SEC Doubles Down On Hinman Test: A Legal Analysis - March 13, 2019
- The SEC is wrong! Ethereum is a Security. - September 19, 2018
- United States Is Cracking Down On ICO Fraud — Operation Cryptosweep Has Begun - May 24, 2018
The term ‘blockchain technology’ is increasingly used to refer to the synthesis of three distinct technologies: peer-to-peer technology, the blockchain and consensus mechanisms. In this post, the author seeks to explain these components and how they make secure distributed ledgers possible.
Ask 10 people what blockchain technology is and you get 10 different answers – even in the crypto-scene itself. The subject might seem confusing to many, which is why I will try to summarize what distributed ledgers are exactly, and how they function.
“A blockchain is a ledger used to maintain a growing list of records chronologically.”
In other words, blockchain is merely a way to structure data. The term ‘blockchain technology’ however is increasingly used as an umbrella term to describe the result of a synthesis of three distinct technologies which form the basis of the distributed ledgers we know today. These are:
- Blockchain technology
- Consensus mechanisms
I will explain each below.
What is a blockchain?
In essence, a blockchain is merely a way to capture data. To start off, one should envision a virtual block that gets filled with data; for example transactions. When filled, the block gets a timestamp and is linked to the last block in the chain. This process repeats itself over and over again and so a chain of blocks or ‘ledger’ is formed. Every block is cryptographically protected once it is added and will be a part of the blockchain forever.
The role of P2P-networks.
In order for the blockchain to be of public use, it has to be completely immutable and publicly available. After all, I have to be able to know what the state of the blockchain is to know whether a transaction or block in it is legitimate. This is where peer-to-peer networks come into play.*
The current state of the blockchain is synchronized on a large network of computers, often referred to as nodes. In other words, a complete, updated copy of the blockchain is always to be found on every one of these nodes. This peer-to-peer network makes it nearly impossible to change a block in the chain as there is no central point of failure. A hacker would not only have to attack the specific block of the transaction targeted, but also every block ever created before it – and he would have to do so on every node in the network simultaneously.
The role of consensus mechanisms
Although there is no central point of failure, a situation could occur where some copies of the blockchain differ from others, whether intentionally or not. As such, a mechanism is needed to decide on what the ‘true state’ of the network is. The true state of the network is a data record of who owns what – which enables determination of the validity of transactions in blocks.
Deciding on the true state of the network happens through a consensus protocol, which defines the rules that ensure that a new block is both completely valid and the one and only version of the truth. In a sense, such a protocol is just clever game theory.
The most-known consensus algorithm is Bitcoin’s Proof of Work (PoW), in which nodes in the network try to add new blocks to chain in a process called ‘mining’. If a node mines a block and adds it to the chain, it receives a reward in the currency of the blockchain.
A node can mine a block by solving a cryptographic puzzle. This puzzle can only be solved by brute forcing solutions to a problem and miners spend considerable money on the electricity needed to run the GPU’s to do this. Therefore, if a block A is mined by someone, all miners will immediately check if it is valid according to protocol rules and switch to trying to mine block B to attach to it. If more than 50% start working on the next block it can be assumed that this is the true state of the blockchain.
Say that coincidence leads to two blocks, B and C, being added to the chain at the same time. The chain would ‘fork’ into two separate chains: AB and AC. Automatically, all other nodes would jump onto mining block D to add to it and the network haspower might split over both chains. The chain that now adds block D to the chain the fastest is probably the chain with with the most hash-power and miners will see that chain as the true state and start mining block E on that chain. The other chain will stop existing automatically as it is not the valid chain.
The longest chain, which is the one with the most ‘hash-power’ (gpu) will as a result of economic incentives always be the true state of the network, as mining on the wrong chain will not give any money.
The more computational power the total network of miners has, the more secure it is from a 51% attack. The work done by the nodes is therefore vital for the security of the network.
The above should be seen as a very brief introduction to how distributed ledgers work. You might now understand why blockchain technology is quite a misnomer for the distributed ledgers we see today. However, next time someone mentions blockchains at a party, please don’t do what I just did and go: “hey man blockchain is only a way to structure data, it is actually …”. Instead, it might be time to accept that the term has evolved to become an overarching concept to indicate the synthesis of the technologies that make distributed ledgers possible.
* It should be mentioned that modern cryptography is also indispensable in the use of distributed ledgers. However, to (try to) keep this explanation brief I will not go into the subject in detail.