The Nakamoto Consensus Algorithm
A brief history of digital cash and the first consensus algorithm.
In 1992, Eric Hughes, Tim May and John Gilmore founded a group called the “Cypherpunks”. It was a group founded to discuss issues in cryptography and programming. Topics which people all over the world found especially interesting and subsequently led to the group setting up a mailing list after just a few meetings.
This mailing list, aided greatly by PGP encryption, was a facilitator of free flowing innovative technical and political discussion. With this, an open forum where privacy and liberty were regarded as fundamental was created.
The fundamental principles of this movement helped to build the ideas that support nearly all cryptocurrencies today. This is clear in the cypherpunk manifesto:
“Privacy in an open society requires anonymous transaction systems. Until now, cash has been the primary such system. An anonymous transaction system is not a secret transaction system. An anonymous system empowers individuals to reveal their identity when desired and only when desired; this is the essence of privacy.”
Cypherpunks saw the potential that cryptography and the internet had as instruments for the creation of digital economies, resilient to political attacks. With this in mind, several attempts were made between 1990 and 2009 to find the perfect mathematical formula to support a working digital currency. Among those tries, some stand out, and have helped shape what we know know today as Bitcoin.
- David Chaum’s DigiCash
A project propelled by Chaum’s invention of blind signatures — a cryptographic tool to send and sign an alphanumeric value, which can then be verified without being revealed.
- Wei Dai’s B-Money
B-money used a distributed ledger and incentive mechanisms. The first was the obligation of every participant in the network to maintain a separate database documenting how much money belongs to users. The latter involved the incentive to operate honestly.
- Nick Szabo’s Bit Gold
Bit Gold used cryptographic hashes. Each block was linked with PoW, which is a cryptographic puzzle, done to verify that a computer spent resources to compute a certain value. This value is computationally expensive to find and impossible to pre-compute, also this cryptographic puzzles helped in creating immutable ledgers.
It is important to highlight that the technologies used in these projects where invented by other people, namely Ralph Merkle, Neal Koblitz, Leslie Lamport and Hal Finney, and the genius of those previously mentioned relies on the implementation of these inventions in their projects.
Although all the previously mentioned projects failed for one reason or another, they served as an inspiration for what we now know as the Nakamoto Consensus, the backbone of Bitcoin.
Putting it all together — The Nakamoto Consensus Algorithm
The Nakamoto Consensus Algorithm is the engine that makes Bitcoin a viable substitute of fiat currencies. Essentially, it is a PoW consensus algorithm in conjunction with a specific set of rules that govern the mechanics of the network, and this is how it works:
Often regarded as the most important component of Nakamoto Consensus, PoW provides immutability, randomizes the election of a leader or validator, and aids the Block Selection Rules with protocol government.
PoW involves solving a mathematical puzzle to figure out a specific value, known as hash. To find the hash, the network of validators have to combine the result of the previous PoW round, data from transactions being validated and a value called a nonce.
Since data from each previous PoW round is used to create new hashes, a chronological link between the blocks of data is formed — a chain between blocks, and a blockchain is born.
The transactions that form part of the blocks in the blockchain are considered valid. Since the links between the blocks are computationally expensive to calculate, changing a series of links to alter the transactions of previous blocks would take a long time.
Block Selection Rules
Block Selection is the process of selecting a validator to insert the next block in the chain. The first rule to select a block is comparable to a race. The winner is the validator that comes up with the PoW solution first. Whoever wins this race has the right to add the block to the chain and in doing so increase the validity of previous blocks in the chain.
Yet, this result will only be held if the second rule is met, the rule of the Longest Chain Wins. This rule explains that the longest chain is considered the valid chain because it came from the pool with the most computation and validation work done on it.
The validation rules will ensure that proposed blocks have had the required computational work performed in order to be accepted by other network validators. If the PoW is not valid, the other validators in the network will ignore the invalid block and will not include it in their own chains. This will prevent them from putting their own computational power into the validation of an invalid chain, and they will begin working on the validation of the alternative, ‘honest’ chain.
As long as the longest chain and the majority of the network’s hashing power is controlled by honest nodes, the honest chain will grow the fastest, outpacing competing “dishonest” chains.
Making it all work
The two previously described components, in addition to cryptographical signatures, validation rules, and incentive mechanisms, complete The Nakamoto Consensus Algorithm.
The incentives give an extra layer of security to the network, since it ensures that validators compete for the incentives, in the form of block fees and rewards, for securing the network. They also make sure that the validators have a good reason not to attack the network under any circumstances, since they are holding a deflationary asset won through incentives which can only lose value if the network is attacked.
The validation rules explains that an honest node must only accept blocks that have a compatible hash, valid transactions and a correct block size. This rule has to be followed in order to maintain consistency and security across the network, and to ensure that the longest chain is always an honest chain.
Finally, cryptographic signatures give a way for the network participants to make sure the sender is indeed the owner of the currency that is being transacted.
The Nakamoto Consensus Algorithm is a complex mechanism made up of many different bits and pieces designed on the premise that external and internal agents have an incentive to destroy or attempt to destroy the network to increase their profits.
For the past 10 years, The Nakamoto Consensus has been able to reach harmony where all network participants are incentivised to collectively participate in the network’s well being.
With the birth of Bitcoin came, for the first time in history, a permission-less, peer-to-peer network for monetary transactions, from which an entire movement has evolved and will continue to revolutionise our world— all thanks to Satoshi Nakamoto.
Enjoyed this post? You’ll find plenty more like it on: