What is Blockchain?
Blockchain is a distributed database whose main purpose is to record information so that users can write and read the information. This database is structured decentralised so that a digital ledger can be shared across a network of computers worldwide without a central authority.
A distributed database isn't a new concept, but in a blockchain, there is no database admin, which makes it special. It's a decentralised network opened to anyone that can set up a server. You can join the blockchain and become a node of the network. The concept of blockchain became popular after the success of the Bitcoin invention by Satoshi Nakamoto.
Bitcoin uses blockchain technology as a public digital ledger to record Bitcoins transactions when they are moved from one address to another as a digital payment. Transaction records are public on the blockchain, so addresses can't spend beyond their available bitcoin. Addresses are digital wallets on the blockchain.
The blockchain employs consensus mechanisms that ensure no single party tampers with the records on the blockchain.
What is Consensus Mechanism?
A consensus mechanism is a process by which agreement is reached on a distributed database like the blockchain.
The goal of a consensus mechanism is to ensure that everybody agrees on the current state of the database so that the operation can go on without a centralised authority and participants don't need to trust each other. The participants in a blockchain network are called nodes. Consensus mechanisms also help maintain security on the network.
There are several blockchain consensus mechanisms, but I've compiled a list that will help you understand how consensus mechanisms work.
Popular Consensus Mechanisms
Proof of Work is the most well-known consensus mechanism and was popularised by Bitcoin's founder, Satoshi Nakamoto, after bitcoin became the first successful proof-of-work implementation and has since been used as a basis for many other blockchain and cryptocurrency projects.
In the PoW consensus mechanism, miners compete to solve complex mathematical puzzles by trying to find a number called the nonce. The competition between miners makes mining computation-intensive, as the first miner to solve the puzzle gets the block reward. The process of solving this cryptographic puzzle is resource-intensive. It requires a lot of computational power, so it takes a significant amount to create a new block on the blockchain, which helps maintain the security and integrity of the system.
Miners are rewarded by earning a certain amount of cryptocurrency. The reward is an incentive for miners to continue participating in the blockchain so that more blocks can be added to keep the network running smoothly. Aside from the Bitcoin network, another example of a Proof of Work blockchain is Qitmeer.
The Proof of stake mechanism is based on the participants' coin stakes. There's no block reward in PoS. What we have is a stakes reward. The stakes rewards are transaction fees, and users that stake their coins are validators on the network.
The network uses a randomised process to determine which validator can produce the next block. The user who owns the biggest stake or owns coins for the longest period has a better chance of creating a new block on the network.
DPoS (Delegated Proof-of-Stake)
DPoS is a variation of PoS. DPoS users can use their balance to elect a list of nodes allowed to add new blocks of transactions to the blockchain. They can also vote on changing the network parameter. The weight of a user's vote is based on their stake.
For instance, if user 'A' stakes 80 coins for a delegate and user 'B' stakes 40 coins, A's vote will have more weight than B's. Delegated Proof of Stake users is rewarded with a transaction fee, just like in Proof of Stake. Examples of DPoS blockchains are Terra, Tezos and EOS.
Proof-of-History is a sequence of computations that verifies the passage of time between two events cryptographically. PoH allows network users to create a historical record that shows the occurrence of an event or transaction that took place at a certain time on the network. This consensus mechanism is used to lighten the load on a blockchain network by offering a method of encoding time into the blockchain.
Solana is the blockchain project that popularised this method of reaching consensus.
PBFT (Practical Byzantine Fault Tolerance)
Miguel Castro and Barbara Liskov, in 1999, introduced practical Byzantine Fault Tolerance (PBFT). PBFT is one of the potential solutions to the Byzantine Generals' Problem.
PBFT's goal is to decide whether to accept a piece of information submitted to the blockchain. Each party general maintains an internal state. When a party receives a message, they use it with their internal state to run a computation. This computation will lead to this party's decision about the message. Then, the party will share the decision with all other parties in the network. The final decision is determined based on the total decisions from all parties. A high hash rate is not required in this process because PBFT relies on the number of nodes to confirm trust.
DAG (Directed Acyclic Graph)
If we consider Bitcoin Blockchain 1.0 and Ethereum Blockchain 2.0, Directed Acyclic Graph (DAG) may be regarded as Blockchain 3.0. In Graph theory, DAG is a finite directed graph with no directed cycles. It is a well-known data structure in computer science and is often used to solve problems such as finding the best route and data process.
Miners can't create more than one block at a time on bitcoin or any other blockchain network. This means new transactions can only be validated once the previous transaction is completed. With DAG, several transactions can be processed simultaneously on the network.
This might be the future of instant transactions with a minimum transaction fee. Some DAG-based projects are IOTA, Nano, Obyte and Qitmeer. (Qitmeer Network takes DAG further by combining it with PoW)
I'll appreciate your follow and your clap if you have learned from this piece. Thank you