. What are the different types of Blockchains?
What
are Public, Private and Hybrid Blockchains?
Before we dive into different types of
Blockchain, we need to know the difference between permissioned and
permissionless Blockchain.
In a permissionless Blockchain,
the consensus allows all nodes to have equal rights such as data access,
creating transactions, validating transactions and producing new blocks.
In a permissioned blockchain, the
consensus does not allow all nodes to have equal rights to access data,
creating transactions, validating transactions and producing new blocks. For
example, a permissioned chain might select a few nodes to produce new blocks
only.
There are 3 types of blockchain
implementations, ie public, private (managed) or hybrid.
A public Blockchain is one that allows anyone to join.
They are usually permissionless. The assumption is that every node will be
rewarded monetarily by being honest and performing its duty impartially. In the
case of mining, the node that finds the next block will be rewarded with some
of the chain’s cryptocurrency. Because the monetary incentive is good, it is
assumed that most of the participants will not be malicious, thereby achieving
high decentralisation.
However, as it is a trustless system, there still
needs to be a defense mechanism (Byzantine Fault Tolerance) against malicious
actors. Depending on the consensus, the requirement might be that certain
percentage, for example more than 50% of the nodes must be honest in order for
the blockchain to be functional.
There are many successful public blockchains
such as Bitcoin, Ethereum, Litecoin, Bitcoin Cash, Monero…etc.
It is also important to note that a public
Blockchain can be permissioned. One example is EOS where there are only 21
block producers in the entire network.
A private Blockchain is a closed blockchain where privacy
is important. Every participating node is pre-selected and vetted. Since it is
a trusted network, the motivation behind the participating nodes might not
necessarily be monetary. In most cases, for example, like in a consortium, the
participating nodes are implemented compulsorily because of business
collaborative requirements. In this scenario, Byzantine Fault Tolerance might
not seem as critical when compared to a public Blockchain. This again is
subjected to debate (to be discussed later).
Successful managed Blockchains include
Hyperledger Fabric, Hyperledger Sawtooth, Quorum…etc.
It is possible to have permissionless
private chains but most of them are usually permissioned with very clear
segregation of duties. Take Hyperledger Fabric for example, there are clients,
endorsing peers, committing peers and orderers.
Hybrid Blockchain
At the moment, a very decentralised (usually
public) Blockchain has a very low transaction speed. The Ethereum mainnet for
example averages about 12 tx/s. On the other hand, a less decentralised
(usually private) Blockchain can support much faster transaction speed because
the consensus finality is much faster. For example, a 7 node Quorum network averages up to 100
tx/s.
The result is clear. The Blockchain
Trilemma says
that a Blockchain cannot scale at the expense of decentralisation or security.
Since decentralisation is key to providing a trustless system, how can we have
a truly decentralised Blockchain that is also fast and secure?
A promising solution at the moment is a
Hybrid between the private and public Blockchain. In a Hybrid Blockchain, every
transaction can happen quickly in its own private chain and commit only to the
public chain as and when necessary, for example when public verification is
required. This will provide the immutable trust from the public Blockchain as
well as the scaling from the private Blockchain. Layer 2 solutions and
Side-chains are variations of this concept.
Use Cases
At the moment, a public Blockchain is
absolutely necessary if we require full public participation to ensure
decentralisation in order to achieve a fully trustless system. Some use cases
include currency payments, certifying product authenticity, global identity
management…etc.
If only a few closed parties and privacy are
involved, we could achieve high throughput and locked down security using a
private Blockchain. Some good use cases of private Blockchains include
interbank settlement, supply chain traceability, medical and military
records…etc.
Is it Justifiable to Use the Blockchain
without Decentralisation?
One of the biggest argument against private
Blockchains is whether one could trust the chain at all since it has little or
no decentralisation. Some private Blockchains don’t even have BFT consensus. If
that’s the case, many people argued that we should instead use a centralised
database.
On the Concept of Decentralisation
Even the word “Decentralisation” is
subjected to many definitions. So far, we have been referring it on the node
(infrastructure) level. It makes sense to define decentralisation in a broader scope to include governance, developers,
client codebase, exchanges…etc. For example, cryptocurrency like TRON was meant to be decentralised on the
Ethereum network but yet its token contract was centralised. EOS is meant to be a decentralised public chain and yet the 21 block
producers have the power to freeze accounts and form a cartel ring to vote for each other.
What
is Consensus Algorithm In Blockchain & Different Types Of Consensus Models
In the past couple of years,
we heard a lot about how blockchains are going to transform the business world
and financial transactions. Few of the most crucial aspects of blockchain are
speed, applications, and security. In our previous blog posts, we have
highlighted blockchain technology’s potential for speed and applications. But
to function on a global scale, a public ledger needs efficient security. And
the security is because of the consensus algorithm. Those who are familiar with
the blockchain technology, understand that we keep the ledger transactions
synchronized across the network to ensure that ledgers only approved when the
participants confirm transactions. In this blog post, we are going to discuss
what is consensus algorithm and various types of consensus mechanisms.
Consensus Algorithm: A Brief
Background
A consensus algorithm is like
Bitcoin’s PoW (Proof-of-Work), which requires miners to solve complex
cryptographic mathematical puzzles for which they get rewarded with certain
amount of Bitcoins. It is important to understand that each block which is
added to the network must follow a set of consensus rules. E.g. Bitcoin’s
consensus rules are no double spending, correct format of blocks, a certain
amount of reward for miners etc. Blocks that fail to follow these consensus
rules will be rejected. A blend of PoW consensus algorithms and the consensus
rules offers a strong and reliable network which is secure and ensures that all
the nodes in the network agree on a regular global state of the blockchain.
A consensus protocol has 3
basic features based on which its efficiency can be determined.
Without a central intermediary, the network of participating users that develop this system need to agree on the validity of what’s being added to the ledger (using a set of predefined rules). A consensus needs to be reached for the majority of the nodes in the network. But just how effective it is to implement such a consensus remains a work in progress till today.
The sole goal of the
consensus protocol is to allow the node to communicate among themselves and
offer a common set of the validated transaction which can be added to the
ledger. This is designed to prevent unethical miners from adding false
transactions and blocks. The type of mechanism to be used depends on the type
of network. Let’s discuss few of the mechanisms.
Proof-of-Work (PoW)
As we have already discussed
in our previous blogs, PoW is currently the most common and one of the most
robust consensus mechanism for blockchain technology. The miner has to solve
mathematically complex puzzles on the new block before approving the block to
the ledger. After solving the puzzle, the solution is then forwarded to other
miners and verified by them before being accepted to their respective copies of
the ledger. The PoW method defines that the nodes must adopt the fork which
carries work, and it is very unlikely that the two competing forks will
generate the next block together.
Blockchain core network
protects against double-spending by the verification of each transaction with
the use of Proof-of-Work (PoW) mechanism. Transactions are finalized and
approved by the minors after verification. If anyone tries to duplicate a
transaction, it will show in the network that it is counterfeit and would not
be accepted. You can’t double spend, once a transaction is approved.
Proof-of-Stake (PoS)
PoS is a substitute approach
for PoW which requires fewer CPU computations for mining. Though this is also
an algorithm, and the purpose is same as PoW, the process is quite different
here. As in case of PoW, a miner is rewarded by resolving mathematical problems
and creating new blocks, in Proof-of- Stake, the creator of a new block is
chosen in a deterministic way, depending on its wealth, also defined as stake.
This means that in the PoS mechanism, there is no block reward. So, the miners
take the transaction fees. PoS mechanism has its own pros and cons, and the
actual implementations are quite complex.
Delegated Proof-of-Stake
(DPoS)
DPoS is very different from
PoS. Here, token holders don’t work on the validity of the blocks by
themselves, but they select delegates to do the validation for them. In a DPoS
system, there are usually in between 21–100 selected delegates. The selected
delegates are being changed periodically and assigned an order to deliver their
blocks. If you have less number of delegates, it allows them to organize
themselves efficiently and create designed time slots to publish blocks. If the
delegates miss their blocks on a regular basis or publish invalid transactions,
the token holders vote them out and replace them with some other selected
delegate. Unlike PoW and PoS, in DPoS miners can collaborate to develop blocks.
With a collaborative effort and a partially centralized process, DPoS has been
able to run orders of magnitude which are faster than any other consensus
algorithms.
Byzantine Fault Tolerance
(BFT)
BFT name came from a solution
to “Byzantine generals’ problem,” a logical dilemma that researchers Leslie
Lamport, Robert Shostak and Marshall Pease explained in an academic paper. BFT
is being used to fix the issue of a rogue or unreliable node. If any member of
the community sends inconsistent information to others about transactions, the
reliability of the blockchain breaks down, and there is no central authority
that can step in to correct it. To solve this, PoW already offers BFT through
its processing power. On the other hand, PoS needs a more definite solution.
Nodes will regularly vote in order to identify the true transaction. Using a
version of PoS which works with BFT looks like the most promising approach to
approving transactions in the blockchain.
Practical Byzantine Fault
Tolerance (PBFT)
Hyperledger supports two
consensus algorithms– Practical Byzantine Fault Tolerance algorithm (PBFT) and
SIEVE, which is ready to handle non-deterministic chain code execution. PBFT
was the first solution to achieve consensus in case of Byzantine failure.
Stellar, and Ripple also use PBFT mechanism. In PBFT mechanism, each ‘general’
manages an internal state which is an ongoing information status. After
receiving a message, a general use the message in connection with their
internal state to start a computation process. This computation process asks
the individual general about the opinion on the message. After reaching a
conclusion, the general shares the decision with other generals in the system.
A consensus decision is made based on the total number of decisions submitted
by all the generals. This approach forces a low overhead on the performance of
the replicated service.
SIEVE
SIEVE consensus mechanism is
being used by Hyperledger Fabric which allows the
network to detect and remove possible non-deterministic requests, and also
achieve consensus on the output of the suggested transactions.
Proof-of-Weight (PoW)
PoW is a wide classification
of consensus algorithms based around the Algorand consensus model. When PoS,
the percentage of tokens owned in the network presents a probability of
“discovering” the next block, other relatively weighted value is being used.
Filecoin’s Proof-of-Spacetime is weighted on how much IPFS data is being
stored. There are few other systems include weights for things like
Proof-of-Reputation.
Unique Node Lists (UNL)
Ripple use “collectively
trusted sub-networks” consensus algorithms called “Unique Node Lists”(UNL) to
deal with high latency, which usually characterizes BFT-tolerant systems. To
reach consensus, a node requires to ask its own UNL in place of the entire
network. This mechanism allows less than one-fifth of its nodes being faulty.
Proof-of-Burn (PoB)
In Proof-of-Burn, rather than
spending money on expensive computer equipment, you ‘burn’ coins by sending
them to an address where they are unrecoverable. You can earn a lifetime
privilege to mine on a system based on a random selection process. Miners can
burn the native currency or any currency of an alternative chain. The more
number of coins you burn, the chances are high that you will be selected to
mine the next block. If your stake in the system fails, so eventually, you will
want to burn more coins to increase your odds of being selected for the next
block. PoB is a good alternative for PoW, although the protocol wastes
resources. Slimcoin is the only coin who uses Proof-of-Burn. Slimcoin uses a
combination of PoW, PoS, and PoB.
Proof-of-Activity (PoA)
PoA was invented as an
alternative incentive structure for Bitcoin miners. This combines both PoW
& PoS. In PoA, miners start with a PoW approach to solve the puzzle. If the
blocks mined don’t contain any transactions, the system switches to PoS. Based
on the header information, a group of validators is assigned to sign the new
block. If a validator owns more coin, he has the highest chance to be chosen.
As soon as all the selected validators sign the template becomes a block. If
the validators failed to complete the block, a new group of validators are
being chosen, and this process goes on until a block receives the correct
amount of signatures. Rewards are been divided between the miner and the
validators. PoA requires too much energy like PoW, PoS. Decred is the only coin
using Proof-of-Activity for validation right now.
Proof-of-Capacity (PoC)
This consensus algorithm
mechanism is different from others. Here you pay for your hard disk space. The
more hard disk space you have, the chances are high that you will mine the next
block & earn rewards. Before mining in a PoC, the algorithm generates a
large number of data sets known as ‘plots’, which you store on your hard drive.
The more number of plots you have, you have better chances of finding the next
block. To use this mechanism, you have to spend a lot on hard drive space.
Burstcoin is the only cryptocurrency to use a form of proof of capacity.
Conclusion
Consensus algorithms used by
various blockchain platforms are mainly driven by the type of applications the
platform expects to offer and intimidations it conceives to the integrity of
the chain. The permission less platforms are reaching consensus among a very
high number of untrusted peers using computational complexities. While approved
blockchains are opting for a less scalable but higher throughput model that
assures faster transactions. At the time of choosing the right consensus model
for a particular network, various things are being considered like intended
network, the relationships between participants, and both functional and
non-functional aspects. We hope this blog post sheds light on the current
landscape of the consensus algorithm & various models. Contact us today.