Você está na página 1de 10

2018 International Conference on Open Source Systems and Technologies (ICOSST)

Consensus Algorithms in Blockchain: Comparative


Analysis, Challenges and Opportunities
Natalia Chaudhry Muhammad Murtaza Yousaf Punjab University
Punjab University College of Information Technology College of Information Technology
University of Punjab Lahore, Pakistan University of Punjab Lahore, Pakistan
natalia@pucit.edu.pk murtaza@pucit.edu.pk

Abstract— Blockchain is a distributed ledger that gained a intermediary while performing a transaction. Delay in
prevalent attention in many areas. Many industries have started execution time of agreements and additional fee charged by
to implement blockchain solutions for their application and intermediaries make this design inefficient. This design is
services. It is important to know the key components, functional vulnerable to security attacks as a central intermediary might
characteristics, and architecture of blockchain to understand its be compromised and entire business can suffer. Transactions
impact and applicability to various applications. The most well- in blockchain are verifiable and secure. Blockchain design has
known use case of blockchain is bitcoin: a cryptocurrency. overcome these issues. It uses a consensus mechanism among
Being a distributed ledger, consensus mechanism is needed nodes of the network to validate the information, eliminating
among peer nodes of a blockchain network to ensure its proper
the need for intermediaries [9] [10]. Consensus mechanism is
working. Many consensus algorithms have been proposed in
a core concept in blockchain that ensures a tamper free
literature each having its own performance and security
characteristics. One consensus algorithm cannot serve the
environment in which only one version of truth is agreed upon
requirements of every application. It is vital to technically by all the nodes. All the nodes in a decentralized network
compare the available consensus algorithms to highlight their must reach at an agreement about state of the blockchain. This
strengths, weaknesses, and use cases. We have identified and makes it difficult for an attacker to introduce a tampered
discussed parameters related to performance and security of block into the blockchain. Selecting the right consensus
consensus in blockchain. The consensus algorithms are analyzed algorithm is a vital decision to make while implementing a
and compared with respect to these parameters. Research gap blockchain solution. Moreover, there are some critical
regarding designing an efficient consensus algorithm and parameters to be considered while designing a consensus
evaluating existing algorithms is presented. This paper will act algorithm.
as a guide for developers and researchers to evaluate and design
a consensus algorithm. This paper discusses the consensus mechanisms in
distributed systems and their significance. Various
Keywords—blockchain, bitcoin, distributed ledger, consensus consensus algorithms designed both for distributed
environment in general and specifically for blockchain are
reviewed. Parameters relevant to consensus algorithm are
I. INTRODUCTION
identified and discussed that will help the developers in
Blockchain technology emerged to overcome the risks and evaluating and designing a new consensus algorithm. Rest
inefficiencies in business transactions. It has revolutionized of the paper is organized as follows: Section 2 describes the
the structure of industries and businesses [1] [2] [3] [4] [5] blockchain technology and some well-known
[6]. Blockchain can be defined as a distributed ledger, shared cryptocurrencies. Section 3 reviews the work done related to
among the nodes of a business network. Transactional data is the design and comparison of consensus algorithms in
stored in blocks linked to each other forming a chain. It blockchain. Section 4 reviews and discusses the consensus
facilitates assets tracking in a business. An asset can be mechanism in distributed systems. Section 5 includes the
anything of a value including tangible or non-tangible things. comparative analysis of some recently designed consensus
Examples of tangible assets include car, land, house, and cash. algorithms. Section 6 presents the research opportunities.
Intangible assets include intellectual assets such as copyrights, Section 7 concludes the paper.
properties, patents, or branding. Transactions are grouped
together in a block according to the block size defined. Block
confirms the sequence of transactions using a timestamp. A
hash of a previous block is maintained by each block which
helps in backtracking while validating new blocks. This
strengthens the security of whole blockchain as no one can
add a malicious or corrupted block in between valid blocks.
This feature is known as immutability in which no existing
block can be altered. Each node updates the ledger whenever
a transaction occurs. Each full node stores the copy of whole
ledger (blockchain). Figure 1 depicts the architecture of
blockchain.
As compared to traditional distributed databases,
blockchain provides significant advantages such as reduced Fig. 1. Blockchain architecture.
cost and time, no reliance on a third party, and security of
assets [7] [8]. In distributed database systems, each node in
the network holds its own ledger of record and relies on some

978-1-5386-9564-7/18/$31.00 ©2018 IEEE 54


2018 International Conference on Open Source Systems and Technologies (ICOSST)

II. BLOCKCHAIN TECHNOLOGY AND CRYTPOCURRENCIES of transactions and the most recent state. Apart from
transferring money, Ethereum also ensures execution of smart
Blockchain is a distributed system in which a common ledger contracts. It uses GHOST protocol to ensure consensus in the
of transactions is kept and shared among participants of the network. It caters the issue of stale blocks that arise when a
network. Transactions are kept in the form of chain of blocks group of miners possess more computation power than the
where each block references previous block using a hash rest and thus contribute more to the network. This will result
value. The participants must agree on a list of transactions. In into centralization issue. The GHOST protocol integrates the
either case, divergence will happen resulting in forks. Each stale blocks in longest blockchain calculation. The stale
miner has a local state of blockchain which may vary from blocks are rewarded that eliminates the centralization issue.
miner to miner. The local states will be different when two or Miners are now rewarded even if they haven’t managed to be
more miners simultaneously mine two different blocks. In that a part of the main blockchain. As compared to Bitcoin,
Ethereum has better block time (15 seconds). It has a
case, two blocks will point to the same previous block. The
transaction processing rate of 11 per second. It is estimated
global state of a blockchain is constructed by taking union of
that power consumption of Ethereum per transaction is around
all local states. In a global state, the point at which different 49 KWh [42].
blocks have a same predecessor block is referred to as fork.
To resolve fork, various implementations of blockchain; such
as Bitcoin and Ethereum use different mechanisms to identify III. RELATED WORK
the main branch of blockchain. Bitcoin resolves fork by This section discusses the various consensus algorithms in
considering a deepest branch as a main branch of blockchain. blockchain that are recently proposed. The research works
It uses Nakamoto's consensus protocol for this purpose. Main that have performed comparative analysis of consensus
branch is selected as a branch that has the largest number of algorithms in blockchain are also reviewed.
nodes. On the other hand, a consensus algorithm in Ethereum,
Greedy Heaviest Observed Subtree (GHOST) selects heaviest A. Secure sharding algorithm for open blockchain [11]
subtree as a main branch. ELASTICO is proposed as a scalable agreement algorithm
for permission-less blockchain. Transaction rate scales
A. Bitcoin linearly with the computation involved in mining procedure.
In Bitcoin or any other cryptocurrency, a transaction is a That is, with more computation power, more transaction
an atomic operation that represents the transference of money blocks are processed. This algorithm can tolerate with
from sender to receiver. A public key and digitally signed adversaries that possess one fourth of the total computational
hash value of previous transaction defines a current power. The main idea is to divide a network into small chunks
transaction in bitcoin. A transaction is identified by its hash known as committees. Each committee processes a disjoint
value. For digitally signing the transaction, a private key is set of transactions and whole procedure is parallelized. This
used. Public key is used in verification of the transaction. algorithm is different from the classical byzantine algorithm
Each node in this peer to peer network possesses a copy of the in a way the agreement condition is implemented in
ledger. If user A wants to transfer some coins to another user probabilistic manner. Each honest process matches its agreed
B, he has to announce this transaction publically. The network value with a constraint function and checks its validity. The
then verifies the correctness of this transaction. To ensure solution is accepted only if it satisfies the constraint function.
consistency, output of a transaction must not be used as input All committees perform a classical byzantine consensus. The
by entire blockchain more than once. If output is referenced final committee merges the results (shards) of all committees.
more than once then this results in double spending problem Some security properties are defined and algorithm is
that is strictly prohibited in the network. To eliminate these validated with respect to each of these properties that
issues, proof of work is demanded from every node that highlights its security strength. Experiments are run on
verifies the transaction (also known as miners). Miners in a Amazon EC2 involving up to 1600 nodes. Regarding
blockchain must verify the transaction and sender's public key implementation of this algorithm, additional code is added to
based signature. They have to perform heavy computation to the publically available code for Bitcoin [11].
prove that they are valid entities in the network. The network
will remain consistent only if the total computation power B. SCP: A computationally-scalable byzantine consensus
possessed by honest nodes is more than the computation algorithm for blockchain [12]
power of an attacker. Merkle trees are used in Bitcoin to SCP is proposed as a new computationally scalable
verify and commit transactions. It is a binary hash tree where blockchain consensus algorithm based on byzantine.
each leaf holds transaction's ID and is represented by hash of Computationally scalable means the algorithm is flexible
its child nodes. A transaction is committed with a single hash enough to adjust the bandwidth consumption by altering the
value stored at the root of Merkle tree. Each user need to store computational parameters such as level of difficulty in proof
only the root node of the Merkle tree. Bitcoin’s transaction of work (PoW) mechanism. If we increase the computational
processing rate is not scalable. With a high computational power then an increase in throughput will be expected. In
power consumption, it can only process 7 transactions per SCP, miners with less computational power are allowed to
second. Bitcoin's POW mechanism consumes massive power. become a part of committee and involve themselves in the
It is estimated that power consumption of Bitcoin per voting process. Moreover, transactions are divided uniformly
transaction is around 545 KWh [42]. among the data blocks resulting in decentralization of
network. No central certificate is needed thus eliminating the
B. Ethereum risk of single point of failure. The SCP algorithm is mapped
Ethereum is proposed by Vitalik Buterin to address the to scalable cryptocurrency: SCoin. Additionally, Merkel tree
limitations in Bitcoin. The blocks in Ethereum also hold a list is used that avoids double spending problem. Double

55
2018 International Conference on Open Source Systems and Technologies (ICOSST)

spending is prevented locally by checking if a transaction has participating nodes of a network, a voting mechanism is
only one output or not. SCP is proved to scale linearly with needed. In Nakamoto consensus, a node that wins a lottery is
the increase in computational capacity without increasing the elected as a leader. In bitcoin, first node to solve a puzzle
bandwidth in a quadratic manner. Experiments are run with wins a lottery. This leader then broadcasts this block and other
80, 40, 20, and 10 cores on Amazon EC2 to assess the nodes vote implicitly for this block acceptance. Traditional
computational scalability [12]. Byzantine fault tolerance (BFT) algorithms are also used to
achieve consensus among the nodes involving explicitly
C. Leader-free byzantine consensus algorithm [13] voting mechanism.
Byzantine based consensus problem is discussed for a
partially synchronous system. A partial synchronous system is F. The Blockchain Consensus Layer and BFT [16]
an asynchronous system that comes to synchronous mode In this paper, the authors studied the relevance of
eventually. Designing a deterministic leader free algorithm for byzantine fault tolerance algorithms and blockchain
a partially synchronous system is a challenging task. A leader algorithms. A layered view of blockchain is presented that
free algorithm, however, consists of rounds in which all to all highlights its various components. Hybrid solution involving
communication happens among the nodes. This paper Nakamoto algorithm and BFT is also discussed.
proposed a leader free algorithm to achieve consensus in
partial synchronous system. The consensus leader free G. (Leader/Randomization/Signature)-free Byzantine
algorithm for synchronous system is extended for partial Consensus for Consortium blockchain [17]
synchronous system. The consensus algorithm considered in
A consensus algorithm without signature, leader, and
this paper for synchronous systems is based on interactive
randomization is presented. The algorithm reduces the multi
consistency problem. Each process computes a set of values
valued based Byzantine consensus problem to binary
with each value representing an element for a process. The
Byzantine consensus problem. Binary instances of consensus
correct processes come up with the same set of values. This
are run in parallel by which a value is decided in constant
algorithm is extended in two ways. One is by using
time. The optimality of proposed design is proven
parametrized consensus algorithm in which different models
theoretically.
of fault are allowed in agreement. The other way proposed in
this paper is to make the consensus optimal with strong
validation [13]. H. Implicit Consensus: Blockchain with Unbounded
Through- put [18]
D. On the Security and Performance of Proof of Work An implicit consensus model is proposed in which each
blockchain [14] node possesses its individual blockchain. Primary benefit
gained with this is an unbounded throughput. Termination
A quantitative framework is introduced to assess the
property of BFT is replaced with a property of self-interest.
security and performance of PoW consensus based blockchain
Consensus is not guaranteed for every transaction. This makes
with respect to various network and consensus related
this scheme scalable with linear message complexity. Instead
parameters. PoW consensus is adopted by most of the existing
of consensus of transaction blocks, a special type of blocks
blockchain. The variants of PoW have not received attention
are considered, known as check point blocks. The
in literature with respect to security assessment. The
performance and other aspects are analyzed theoretically.
relationship between the performance and security of PoW
blockchain is not studied well. This paper has studied this
relationship using a simulator to mimic the network and I. Design and Implementation of a Proof-of-Stake
consensus mechanism of a blockchain. Impact of varying the Consensus Algorithm for Blockchain [19]
block size and block interval on double spending and selfish This research work discusses the implementation of proof
mining is studied. It is found that the high block reward for of stake (PoS) consensus algorithm in blockchain. PoW is one
blockchain will result in less chance of double spending of the heavily discussed aspects of Bitcoin. It is used as a way
attack. With the block size of 1 MB and block interval time of of selecting a block signer based on the computational effort
1 minute, the security is not penalized. of miners in computing complex mathematical problem. To
overcome the energy wastage issue of it, Proof of Stake (PoS)
E. Blockchain Consensus: An analysis of Proof-of-Work and is introduced. The basic idea is that the nodes having more
its applications [15] stake will get an opportunity to add blocks to the network
more often. A new block signer is elected using a random
The authors analyzed proof of work in detail. Average
criteria based on the amount of stake that a miner possess.
time to mine a block, the number of stale blocks, and average
With this, the power effort in mining a block will get
fork length is analyzed with the varying problem complexity.
significantly reduced as compared to brute-force like
As the problem complexity is increased, mining time for new
computation in PoW. Ouroboros and Casper are the two well-
blocks is also increased. Various applications of blockchain in
known PoS based consensus protocols. Ouroboros elects the
general are also reviewed. PoW is a widely used consensus
stakeholder randomly by a secure coin flipping algorithm and
mechanism in blockchain solutions. It was first introduced by
an effective time slots synchrony. Casper provides a weaker
Bitcoin. In this algorithm, all the nodes vote by solving a
guarantee regarding how much stake is controlled by
proof of work and create new blocks with their own
adversary to cause disruption.
computation power. Bitcoin works with a hash based proof of
work to find a nonce value. Security of this algorithm relies
on the assumption that no node should possess more than 50% J. PPCoin: Peer-to-Peer Crypto-Currency with Proof-of-
of the total computational power of a network. If this happens Stake [20]
then such a node can control the whole system by This paper discusses proof-of-stake algorithm that
constructing a longest chain. To ensure an agreement among minimizes the energy consumption as it has no long term

56
2018 International Conference on Open Source Systems and Technologies (ICOSST)

impact on the security of a blockchain network. Design of a algorithm is not validated extensively using experiments. A
peer to peer crypto currency: PPcoin is introduced that has no short quantitative comparison with PoW and BFT solutions is
dependence on energy consumption. The design of a proof of provided.
stake algorithms is discussed with respect to the concept of
coin age. Coin age is the time period for which a currency M. PoPF: A Consensus Algorithm for JCLedger [23]
amount is held. Unlike PoW, creator of a new block is elected Developers can customize the cloud specific services
deterministically depending on its wealth (stake). There is no using a model known as JointCloud. JCLedger is a blockchain
reward associated with the block mining or generation. It is based solution for JointCloud. This paper discusses the
more cost effective as miners do not have to compete to proposed consensus algorithm for JCLedger, known as PoPF
approach to the mathematical solution first. The hash target is (Proof of Participation and Fees). The computing overhead of
not fixed for all nodes. It is dependent on the coin age PoW makes it difficult to get adopted by JCLedger.
consumed. Blockchain that has highest coin age consumed is Therefore, a consensus algorithm is proposed that consumes
treated as a winner. This algorithm makes double spending much less computing power. The candidates for mining are
attack more easy for an attacker as only certain amount of elected using two factors: fee paid by participant and number
coin age has to be accumulated to introduce a forged block to of times the participant appeared as accountant. The authors
a blockchain. have experimentally evaluated the algorithm through
simulation with respect to distribution of accountants. The
K. A Proof-of-Trust Consensus algorithm for Enhancing accuracy and performance related aspects are not involved in
Accountability in Crowdsourcing Services [21] experiments.
A consensus algorithm is proposed for crowdsourcing
services. Transactions validators are elected based on the trust N. The Ripple algorithm Consensus Algorithm [24]
values of nodes. Two algorithms, Shamirs secret sharing A consensus algorithm, Ripple is presented that uses
algorithm and RAFT leader election are used in its design. subnetworks that are collectively trusted within the whole
The scalability challenges associated with the traditional BFT network. The protocol is executed every few seconds to
algorithms are addressed. The consensus algorithm is divided ensure correctness of the network. After consensus is reached,
into 4 phases. Phase 1 is focused on leader election in the ledger becomes closed. The last closed ledger possessed
consortium using Raft leader election algorithm. Next phase by all the network nodes should be identical if no fork
selects transaction validators using voting mechanism. In happens. This protocol runs in rounds. At the start, each node
phase 3, group of nodes (that are selected for transaction publically announces a candidate list having all the valid
validation in previous phase) validate the transactions. Last transactions that it has perceived before the consensus round.
phase assembles the validated transactions and link it with the Each node then votes on the correctness of all transactions
blockchain. The proposed algorithm can handle the failure of and unites the candidate sets of all nodes. Number of votes are
nodes such that x≥3y+1 where x is the number of nodes in compared to a threshold value and accept/ discard the
the network and y is the number of byzantine nodes. Four transaction on the basis of it. Then, a final round is carried out
categories of nodes are made in consensus procedure. These which requires that at least 80% of the nodes must agree on a
are consortium leader nodes, gateway nodes, normal ledger transaction. All transactions confirming to this criteria are
management nodes, and validator nodes. The proposed validated and applied to the ledger, constituting a new closed
algorithm design is reviewed on the basis of properties: ledger.
agreement, validity, performance, fairness, liveness, and
scalability. Attack scenarios are also discussed. The size of O. Proof of Vote: A High-Performance Consensus algorithm
consortium and validator group remains the same in hybrid Based on Vote Mechanism & Consortium Blockchain
consortium architecture even with the rapid increase in the
[25]
number of nodes. This makes the scalability better than BFT.
Experiments are conducted using simulation on a single Consensus algorithm, named as Proof of Vote (POV) is
machine. Comparison of PoT with the three consensus pro- posed that is efficient than POW. Verification of the
algorithms: Ripple, consortium, and joint consensus is done. blocks is carried out using voting mechanism. Four roles are
The effect of concurrent transactions is also studied well. The defined in a consortium network model. These are
results indicate that PoT is better than other consensus commissioner, butler candidate, butler, and ordinary user. The
alternatives with respect to accuracy, scalability, and proposed algorithm has shown best performance in terms of
performance. power consumption.

L. RMBC: Randomized Mesh Blockchain Using DBFT P. Proof of Work [26]


Consensus Algorithm [22] In PoW, miners that solve a mathematical puzzle first are
Diversity of opinion based BFT consensus algorithm is rewarded. The complexity of a puzzle is decided by the
proposed and discussed. This algorithm mainly addressed the overall power of the blockchain network. In order to mine,
two problems in PoW and BFT algorithms respectively. In miners have to possess huge computational power to solve a
PoW, there is a cost overhead. With BFT, as number of mathematical puzzle first. The main disadvantage of this
malicious entities in a network increases by a large number algorithm is the overhead of computations involved.
then invalid transactions cannot be prevented. There are two
layers in consensus agreement process. The first phase Q. Qualitative comparisons
involves a BFT algorithm. Second phase performs grouping In [27], authors have done a short comparison of PoS,
of related departments. After that, a verifier is elected from PoW, BFT, PoET, and Federated BFT on the basis of some
each department. Transaction is confirmed if the first and qualitative parameters. The research work [28] compared
second agreement phase are identical. The proposed design of variants of Proof of exercise (PoX) and some hybrid

57
2018 International Conference on Open Source Systems and Technologies (ICOSST)

consensus algorithms qualitatively. In [29], five consensus Consensus is still important to achieve in that case as the
algorithms, PBFT, PoW, DPoS, PoS, and RAFT are nodes are not trustworthy. Figure 2 depicts the architecture of
compared briefly with respect to Byzantine and crash fault blockchain. In general, consensus is worth to consider where
tolerance, verification speed, throughput, and support for the nodes of a network are faulty or they communicate in an
scalability. The research work [30] briefly compared some unreliable way. Consensus is achieved in distributed systems
consensus algorithms qualitatively. However, some recent with regard to some failures. Further, while defining
algorithms proposed are not involved in comparison. Giang et consensus system communication model such as synchronous
al. [43] qualitatively compared the two main categories of or asynchronous is also considered relevant. There are various
consensus mechanisms in blockchain, vote-based and proof- categories of failures: crash failure, transient failure, omission
based. The authors only briefly discussed the working failure, security failure, software failure, byzantine failure,
mechanism of various consensus algorithms that belong to temporal failure, and environmental perturbations.
these two categories. The categories are generically reviewed
with respect to agreement, joining of nodes, number of
executing nodes, decentralization, trust, identities of nodes,
and security threats. In [44], author compared PoW based
solutions to BFT state machine replication based approaches.
High level comparison is done on the basis of node identity
management, consensus finality, scalability, performance,
power consumption, adversary tolerance, network synchrony,
and availability of correctness proofs. In [45], authors
reviewed some consensus protocols on the basis of consensus
resilience properties. Some prominent consensus protocols
focused on permissioned systems are discussed. Elli et al. [46]
discussed the horizontal scaling of permissioned blockchain
Fig. 2. Consensus in distributed environment.
using sharding. In permissioned blockchain, the power of
adversary is relaxed. Confidentiality in the presented design is • Crash failure: In crash failure, process halts in an
also reviewed. Sharding is adapted for permissioned asset irreversible way. Timeout measures will help to detect
management environment. this failure in synchronous environment whereas in
There exist some research gaps in the fore-mentioned asynchronous environment, it is difficult to detect crash
research works. The proposed algorithms are not evaluated in failure.
detail with respect to performance and security parameters. • Transient failure: These faults are non-deterministic
Performance and security are two core aspects that must be and permanent. In terms of hardware it can be a fault due
involved in evaluating the quality of blockchain consensus to weak batteries or power surge. With respect to
solutions. There is a need to cover these aspects to analyze the software, these errors could be bugs in internal codes
consensus solutions. Research works that have compared the that occur rarely and are not detected during the testing
consensus algorithms in blockchain have not incorporated phase.
some critical performance and security parameters. The • Omission failure: These type of failures occur due to
comparison is done briefly that does not help in evaluating
transmission issues such as buffer overflow, collisions,
maturity of a consensus solution. Most of the comparison
studies have evaluated the algorithms qualitatively without or malfunctioning of transmitter.
considering quantitative performance related aspects. • Security failure: Security failures are induced as a
Moreover, some recent consensus algorithms are not involved result of security attacks and impersonation. Data might
in comparative analysis. In this paper, we have identified be corrupted due to it.
some critical parameters related to the performance and • Software failure: Software failures are due to the design
security of a consensus algorithm. Various recently proposed and modeling flaws. This type of failure can induce
consensus algorithms are compared and analyzed with respect other type of failures such as crash or omission.
to the identified parameters. This research study will help • Byzantine failure: Byzantine failure refers to the fault
developers in selecting appropriate algorithm design for their that presents different symptoms to all members of the
blockchain application. This will also highlight the research system. It hinders all members to reach a consensus or
gap regarding evaluation of consensus algorithms. agreement. These failures confuse the system and makes
it difficult for the system to tolerate the failures. For
IV. CONSENSUS IN DISTRIBUTED SYSTEMS AND BLOCKCHAIN example, a server may appear failed to one observer and
functioning to the other. The server cannot be entitled as
Consensus is a core concept in distributed systems and not
restricted to blockchain. It applies to scenarios in which failed because both the observers will not reach
multiple processes or nodes have to maintain a common state consensus because they have conflicting information.
of data item. Permission-less and permissioned blockchain are • Temporal failure: Temporal failures occur due to
two major types of blockchain. In permission-less blockchain, latency in meeting the deadline. That is, correct results
nodes are anonymous. A new tampered transaction block can might be generated but too late to be considered useful.
be added resulting in a fork. Fork occurs where a valid This category is quite relevant in real-time systems.
transaction mismatches with the invalid one. The primary • Environmental perturbations: This type of failure
goal of consensus algorithm is to achieve agreement among occurs if solution is not made adaptable to the
the nodes such that each node agrees on one true value. In environment changes. Environment change might make a
permissioned blockchain, the nodes are not anonymous and correct result wrong [31].
considered as known entities.

58
2018 International Conference on Open Source Systems and Technologies (ICOSST)

Blockchain are not managed by a central authority and


maintains a decentralized ledger. Malicious entities might be
given huge incentives to try causing faults. Thus considering
Byzantine problem and its solutions will be relevant to
blockchain. Byzantine fault refers to the fault that presents
different symptoms to all members of the system. It hinders
all members to reach a consensus or agreement. These
failures confuse the system and makes it difficult for the
system to tolerate the failures. For example, a server may
appear failed to one observer and functioning to the other.
The server cannot be entitled as failed because all the
observers will not reach consensus. The term Byzantine is
derived from Byzantine general’s problem. It is an agreement
problem in which group of generals head an army encircling a
city. The generals want to decide upon a plan regarding
attacking a city. Preference of each general will be either to
retreat or attack. Each general should agree on a common Fig. 3. Categorization of consensus algorithms.
decision. Issue is created when there is a traitor in a group of Apart from the general categorization of consensus algorithms
generals. The traitor will vote for sub-optimal strategy and do in distributed environment, the categorization can be done
this act selectively to create confusion. For example, if there with regard to blockchain. Specific to blockchain, consensus
are 11 generals with one traitor and ten honest generals. If algorithms can be categorized into two groups: proof-based
five of them vote for retreat and five of them vote for attack, consensus and vote-based consensus. In proof-based
then the traitor will send a vote of retreat to the group consensus, node that wants to join the network must prove
supporting retreat and vote of attack to the group supporting that it is more qualified than the rest in carrying out the
attack. In this case, half of the army will retreat and half will appending work. In vote-based consensus, each node in the
attack. Consensus problem is difficult to be solved in network is required to communicate and exchange the result
asynchronous networks. To cater this, some randomized of new transaction block that it verifies to the rest of the
consensus solutions are proposed in literature that relax the network nodes. Final decision is made only after considering
three mandatory properties of Byzantine consensus, results of the majority. For example, a node A will manage to
agreement, termination, and validity. Some well-known get a block x appended to the blockchain only if at least T
randomized solutions include Ben-Or’s consensus algorithm nodes append the same block x to it. T is a threshold
and Rabin’s consensus algorithm. There are many flavors of parameter decided by the system.
randomized algorithms such as Monte Carlo consensus and
Las Vegas consensus algorithms. There is another category of A. Comparative analysis of consensus algorithms in
consensus algorithm that deals with a leader selecting a blockchain
probability for itself by election process. Monte Carlo This section discusses the parameters relevant in evaluating
consensus is further classified on the basis of relaxed validity the consensus algorithms in blockchain. Blockchain type,
property. Randomized consensus solutions have a drawback transaction rate, scalability, adversary tolerance model,
that they violate the safety properties of the distributed experimental setup, latency, throughput, bandwidth,
system. The main categories of consensus algorithms are communication model, communication complexity, attacks,
randomized [32] [33] [34], deterministic [35] [36], Monte energy consumption, mining, consensus category, and
Carlo [37] [38], Las Vegas [39], leader based [40], and leader- consensus finality are identified as a critical parameters for
free algorithms [13]. Apart from this, each algorithm is also comparing the various consensus algorithms for blockchain.
categorized based on communication model such as Comparative analysis of some recently proposed algorithms:
synchronous, partial synchronous, and asynchronous. ELASTICO [11], leader-free Byzantine consensus [17],
Randomized consensus provides guarantee to agreement, implicit consensus [18], blockchain with unbounded
validity, and termination properties but with some probability throughput [18], Proof of trust (PoT) [21], DBFT consensus
value. If no probability is associated then the solutions are [22], PoPF [23], Ripple [24], Proof of Vote [25], and Proof
referred to as deterministic. Monte Carlo consensus works by of work [26] is performed. The comparative view of the
running Monte Carlo algorithm on each process or node with consensus algorithms is presented in table I-III. The
specific ranged data. Values from various processes are identified parameters and comparison of the consensus
combined to a global consensus value. Las Vegas is another algorithms with respect to them is presented as under.
category in which each consensus round has a probability.
The difference between Monte Carlo and Las Vegas is in the • Blockchain type: There are three types of blockchain,
running time. Monte Carlo has deterministic running time public, private, and consortium [41]. The type of
whereas Las Vegas has a probabilistic running time. There blockchain defines the membership control in the
also exist leader based consensus algorithms in which a leader consensus algorithm. This has to be considered while
is needed to make termination on consensus. Leader-free evaluating the consensus algorithms to check what kind
consensus algorithms are also proposed. Figure 3 depicts the of membership is assumed in the design. The type of
generic architecture and categorization of consensus blockchain should be chosen according to the nature of
mechanisms in distributed systems. business application.

59
2018 International Conference on Open Source Systems and Technologies (ICOSST)

• Scalability: Scalability is a core requirement to deal with number of nodes. If the network has large number of
big data in today’s environment. Scalability is achieved if nodes then it is preferable to use ELASTICO, PoW,
increasing the number of nodes results in more PoPF, and implicit consensus. In other case, the rest of the
transaction blocks being processed. Proof of trust and consensus protocols (involved in comparison) would fit
ELASTICO are scalable. Implicit consensus and PoW are best.
not scalable solutions. Other algorithms involved in • Consensus finality: Finality in blockchain indicates that
comparisons are not tested with respect to their scalability the transaction is finalized and will not be reverted back.
yet. It is an important aspect to consider while designing a
• Adversary tolerance model: Adversary model controls consensus protocol for blockchain. Probabilistic finality
the fraction of blockchain network that can withstand and absolute finality are the two categories of consensus
failure or attack without affecting consensus. The finality. In probabilistic finality, as the block gets deeper
algorithm proposed for consensus in blockchain come into the chain the chance of its reverting decreases.
with threshold value for this adversary model. Higher However, in absolute finality, a transaction is
value for adversary threshold is better. ELASTICO has immediately finalized after its inclusion in the blockchain.
best adversary control than the rest of the algorithms. If absolute consensus finality is to be achieved then
• Performance related parameters: Some of the existing ELASTICO, PoPF, and implicit consensus are
consensus algorithms are not experimentally evaluated. recommendable variants in consensus.
They are only compared theoretically using correctness
proofs. However, along with this there is a need to have a In summary, number of features exist to evaluate a
quantitative analysis in place that reviews the consensus algorithm with respect to its working,
performance and security of these consensus algorithms. performance, and security related aspects.
Latency, throughput, and bandwidth are the three core
performance aspects that must be focused on for each of V. CONCLUSION AND FUTURE WORK
the consensus algorithms. Except ELASTICO, other With the recent trend towards blockchain, a lot of
algorithms are not experimentally evaluated with respect applications and businesses are moving towards blockchain
to these performance aspects. based solutions. This made it important to comprehensively
• Communication model and complexity: In synchronous analyze blockchain with respect to performance and security
communication, sender waits for recipient to characteristics. Recently, some research efforts are done
acknowledge the request. In asynchronous regarding comparing the existing consensus algorithms used
communication, sender does not need to wait for the in blockchain and proposing a new one. In this paper, we have
response from recipient and continue with the discussed in detail the consensus mechanisms, their
communication. For real time applications that cannot categories, and importance in distributed environment.
afford delays, PoW, PoT, Ripple, and implicit consensus Consensus mechanisms are discussed generally for a
can be considered. If there are more read operations distributed system and specifically for blockchain. We
expected in an application then synchronous model must compared some recently proposed consensus algorithms with
respect to number of parameters that have a significant impact
be chosen as it gives immediate response. ELASTICO
on consensus algorithm. The parameters identified for
and leader free consensus algorithm [17] has synchronous
comparison covers both security and performance aspects.
communication model assumed in consensus algorithm The algorithms are then discussed along with each of the
design. Leader free consensus algorithm [17] has linear identified parameters. Apart from these, a number of other
and better cost of communication than ELASTICO and aspects are also important to be considered. Network topology
PoT. Communication cost of the rest of the algorithms is (e.g. fully connected graph), transaction rate, consistency
not analyzed yet in literature. achieved by the consensus solution, concurrency check,
• Attacks: Ripple is prone to Sybil attack in which single transaction verification speed, and complexity of rounds (if
attacker controls multiple network nodes by creating the consensus algorithm involved multiple rounds or phases).
different IP addresses, virtual machines, and user For future research, these parameters can be incorporated to
accounts. Leader free consensus, PoT are secure against make a more detailed comparison. The comparative view
this attack. The algorithms are not evaluated and analyzed provided in this paper has highlighted the parameters with
with respect to the number of security attacks possible in respect to which some recent algorithms need evaluation and
a blockchain network. It is important to review the analysis. A detailed qualitative and quantitative comparison
algorithms with respect to security attacks. can be carried out that covers up the missing areas in
• Energy consumption: Energy consumption defines the comparison presented in this paper. Experiments must be
amount of energy or electricity that the hardware carried out in cluster environment to truly evaluate the
strengths and weaknesses of the consensus algorithms with
infrastructure consumes in the blockchain network. The
respect to big data needs.
energy consumption of almost all of the consensus
algorithms is not experimentally evaluated.
• Mining and consensus category: It defines how the REFERENCES
process of mining is carried out in the blockchain [1] K. Christidis and M. Devetsikiotis, “Blockchains and smart contracts
for the internet of things,” Ieee Access, vol. 4, pp. 2292–2303, 2016.
network. It is closely related with how the verification
[2] J. L. Zhao, S. Fan, and J. Yan, “Overview of business innovations and
process occurs. Proof-based consensus is ideal for research opportunities in blockchain and introduction to the special
networks with large number of nodes. Vote-based issue,” 2016.
consensus, on the other hand, works best with limited

60
2018 International Conference on Open Source Systems and Technologies (ICOSST)

[3] M. Crosby, P. Pattanayak, S. Verma, and V. Kalyanaraman, [26] S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” 2008.
“Blockchain technology: Beyond bitcoin,” Applied Innovation, vol. 2, [27] A. Baliga, “Understanding blockchain consensus models,” Persistent,
pp. 6–10, 2016. 2017.
[4] D. Yermack, “Corporate governance and blockchains,” Review of Fi- [28] W. Wang, D. T. Hoang, Z. Xiong, D. Niyato, P. Wang, P. Hu, and Y.
nance, vol. 21, no. 1, pp. 7–31, 2017. Wen, “A survey on consensus mechanisms and mining management in
[5] T. J. MacDonald, D. W. Allen, and J. Potts, “Blockchains and the blockchain networks,” arXiv preprint arXiv:1805.02707, 2018.
boundaries of self-organized economies: Predictions for the future of [29] D. Mingxiao, M. Xiaofeng, Z. Zhe, W. Xiangwei, and C. Qijun, “A
banking,” in Banking Beyond Banks and Money. Springer, 2016, pp. review on consensus algorithm of blockchain,” in Systems, Man, and
279–296. Cybernetics (SMC), 2017 IEEE International Conference on. IEEE,
[6] M. Pilkington, “11 blockchain technology: principles and 2017, pp. 2567–2572.
applications,” Research handbook on digital transformations, p. 225, [30] N. Chalaemwongwan and W. Kurutach, “State of the art and challenges
2016. facing consensus protocols on blockchain,” in Information Networking
[7] T. McConaghy, “Blockchain, throughput, and big data,” Bitcoin (ICOIN), 2018 International Conference on. IEEE, 2018, pp. 957–962.
Startups Berlin, Oct, vol. 28, 2014. [31] “Homepage.divms.uiowa.edu,” [online]
[8] D. Brandon, “The blockchain: The future of business information http://homepage.divms.uiowa.edu/ ghosh/16612.week10.pdf.
systems,” International Journal of the Academic Business World, vol. [32] S. Toueg, “Randomized byzantine agreements,” in Proceedings of the
10, no. 2, pp. 33–40, 2016. third annual ACM symposium on Principles of distributed computing.
[9] J. Mattila et al., “The blockchain phenomenon–the disruptive potential ACM, 1984, pp. 163–178.
of distributed consensus architectures,” The Research Institute of the [33] G. Bracha and O. Rachman, “Randomized consensus in expected o (n 2
Finnish Economy, Tech. Rep., 2016. log n) operations,” in International Workshop on Distributed
[10] H. Watanabe, S. Fujimura, A. Nakadaira, Y. Miyazaki, A. Akutsu, and Algorithms. Springer, 1991, pp. 143–150.
J. J. Kishigami, “Blockchain contract: A complete consensus using [34] J. Aspnes, “Randomized protocols for asynchronous consensus,” Dis-
blockchain,” in Consumer Electronics (GCCE), 2015 IEEE 4th Global tributed Computing, vol. 16, no. 2-3, pp. 165–175, 2003.
Conference on. IEEE, 2015, pp. 577–578.
[35] M. J. Fischer, N. A. Lynch, and M. S. Paterson, “Impossibility of
[11] L. Luu, V. Narayanan, C. Zheng, K. Baweja, S. Gilbert, and P. Saxena, distributed consensus with one faulty process,” Journal of the ACM
“A secure sharding protocol for open blockchains,” in Proceedings of (JACM), vol. 32, no. 2, pp. 374–382, 1985.
the 2016 ACM SIGSAC Conference on Computer and
Communications Security. ACM, 2016, pp. 17–30. [36] D. Dolev, C. Dwork, and L. Stockmeyer, “On the minimal synchronism
needed for distributed consensus,” Journal of the ACM (JACM), vol.
[12] L. Luu, V. Narayanan, K. Baweja, C. Zheng, S. Gilbert, and P. Saxena, 34, no. 1, pp. 77–97, 1987.
“Scp: A computationally-scalable byzantine consensus protocol for
[37] S. L. Scott et al., “Comparing consensus monte carlo strategies for
blockchains.” IACR Cryptology ePrint Archive, vol. 2015, p. 1168,
2015. distributed bayesian computation,” Brazilian Journal of Probability and
Statistics, vol. 31, no. 4, pp. 668–685, 2017.
[13] F. Borran and A. Schiper, “A leader-free byzantine consensus
algorithm,” in International Conference on Distributed Computing and [38] S. L. Scott, A. W. Blocker, F. V. Bonassi, H. A. Chipman, E. I. George,
Networking. Springer, 2010, pp. 67–78. and R. E. McCulloch, “Bayes and big data: The consensus monte carlo
algorithm,” International Journal of Management Science and
[14] A. Gervais, G. O. Karame, K. Wu¨st, V. Glykantzis, H. Ritzdorf, and Engineering Management, vol. 11, no. 2, pp. 78–88, 2016.
S. Capkun, “On the security and performance of proof of work
blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference [39] H. Ishii and R. Tempo, “Las vegas randomized algorithms in distributed
on Computer and Communications Security. ACM, 2016, pp. 3–16. consensus problems,” in American Control Conference, 2008. IEEE,
2008, pp. 2579–2584.
[15] A. Porat, A. Pratap, P. Shah, and V. Adkar, “Blockchain consensus: An
analysis of proof-of-work and its applications.” [40] A. Mostefaoui and M. Raynal, “Leader-based consensus,” Parallel
Processing Letters, vol. 11, no. 01, pp. 95–107, 2001.
[16] I. Abraham, D. Malkhi et al., “The blockchain consensus layer and
bft,” Bulletin of EATCS, vol. 3, no. 123, 2017. [41] “Different types of blockchains in the market and why we need them,”
[online] https://coinsutra.com/different-types-blockchains/.
[17] T. Crain, V. Gramoli, M. Larrea, and M. Raynal,
[42] “Digiconomist - Cryptocurrency Fraud and Risk Mitigation” [online]
“(leader/randomization/signature)-free byzantine consensus for
https://digiconomist.net/
consortium blockchains,” arXiv preprint arXiv:1702.03068, 2017.
[18] Z. Ren, K. Cong, J. Pouwelse, and Z. Erkin, “Implicit con- sensus: [43] Nguyen, Giang-Truong, and Kyungbaek Kim. "A Survey about
Blockchain with unbounded throughput,” arXiv preprint Consensus Algorithms Used in Blockchain." Journal of Information
arXiv:1705.11046, 2017. Processing Systems 14.1 (2018).
[19] E. Garcia Ribera, “Design and implementation of a proof-of-stake [44] Vukolić, Marko. "The quest for scalable blockchain fabric: Proof-of-
consensus algorithm for blockchain,” B.S. thesis, Universitat work vs. BFT replication." International Workshop on Open Problems
Polite`cnica de Catalunya, 2018. in Network Security. Springer, Cham, 2015.
[20] S. King and S. Nadal, “Ppcoin: Peer-to-peer crypto-currency with [45] Cachin, Christian, and Marko Vukolić. "Blockchains consensus
proof- of-stake,” self-published paper, August, vol. 19, 2012. protocols in the wild." arXiv preprint arXiv:1707.01873 (2017).
[21] J. Zou, B. Ye, L. Qu, Y. Wang, M. A. Orgun, and L. Li, “A proof-of- [46] Androulaki, Elli, et al. "Channels: Horizontal Scaling and
trust consensus protocol for enhancing accountability in crowdsourcing Confidentiality on Permissioned Blockchains." European Symposium
services,” IEEE Transactions on Services Computing, 2018. on Research in Computer Security. Springer, Cham, 2018.
[22] S. Jeon, I. Doh, and K. Chae, “Rmbc: Randomized mesh blockchain
using dbft consensus algorithm,” in Information Networking (ICOIN),
2018 International Conference on. IEEE, 2018, pp. 712–717.
[23] X. Fu, H. Wang, P. Shi, and H. Mi, “Popf: A consensus algorithm for
jcledger,” in Service-Oriented System Engineering (SOSE), 2018 IEEE
Symposium on. IEEE, 2018, pp. 204–209.
[24] D. Schwartz, N. Youngs, A. Britto et al., “The ripple protocol
consensus algorithm,” Ripple Labs Inc White Paper, vol. 5, 2014.
[25] K. Li, H. Li, H. Hou, K. Li, and Y. Chen, “Proof of vote: A high-
performance consensus protocol based on vote mechanism &
consortium blockchain,” in High Performance Computing and
Communications; IEEE 15th International Conference on Smart City;
IEEE 3rd Interna- tional Conference on Data Science and Systems
(HPCC/SmartCity/DSS), 2017 IEEE 19th International Conference on.
IEEE, 2017, pp. 466– 473.

61
2018 International Conference on Open Source Systems and Technologies (ICOSST)

TABLE I. COMPARISON OF THE CONSENSUS ALGORITHMS WITH RESPECT TO GENERIC PARAMETERS

Consensus algorithms
Parameters
References Date Blockchain type Mining Consensus category
Based on
ELASTICO [11] 2016 Permission-less computational Proof based
power
Leader- free Byzantine Non-proof of work
[17] 2017 consortium Vote based
Consensus based mining
Proof based
Implicit Consensus [18] 2017 permissioned Proof based
mining
Permission-based Probability and
Proof of trust (PoT) [21] 2018 Vote based
consortium vote based mining
Non-proof of work
DBFT based mining
[22] 2018 permissioned Vote based
Consensus Algorithm (random selection
of verifier)
Selection on the
PoPF [23] 2018 permissioned basis of accounting Proof based
right

[24] 2014 Permissioned Vote based mining Vote based


Ripple

Proof of Vote (PoV) [25] 2017 consortium Vote based mining Vote based

Based on
Proof of Work (PoW) [26] 2008 Permission-less computational Proof based
power

TABLE II. COMPARISON OF THE CONSENSUS ALGORITHMS WITH RESPECT TO PERFORMANCE RELATED PARAMETERS

Consensus algorithms
Parameters Communicatio Communication
Scalability Latency Throughput Bandwidth Experimental setup
n model complexity
103-110 O(nc+nc3)
1-6
seconds Simulation, where c is a
blocks/epoch Constant,
ELASTICO Linear with around Amazon EC2 with Synchronous committee size
with 100-1600 5MB/ node
400-800 1600 nodes and n is the
nodes
nodes number of nodes
Termination
Theoretically
Leader- free time: O(t) where
- - - - evaluated the Synchronous
Byzantine Consensus t is the number
design
of faulty process
Theoretically O(n) where n is
Implicit Consensus Not scalable - - - evaluated the Asynchronous the number of
design nodes
O(m2) where m
is the number of
Simulation, Single consortium
Proof of trust (PoT) Scalable - - - Asynchronous
machine ledger
management
nodes
Proposed solution
DBFT is not validated
- - - - Asynchronous -
Consensus Algorithm through
experiments
Simulation, Single
PoPF - - - - - -
machine
Simulation, Single
- - - - Asynchronous -
Ripple machine
0.25
minutes for Simulation, Single
Proof of Vote (PoV) - - - - -
transaction machine
verification
Real
Less than 100
Proof of Work (PoW) Not scalable - - implementation Asynchronous -
seconds
done using Bitcoin

62
2018 International Conference on Open Source Systems and Technologies (ICOSST)

TABLE III. COMPARISON OF THE CONSENSUS ALGORITHMS WITH RESPECT TO SECURITY RELATED PARAMETERS

Consensus algorithms
Parameters
Adversary Secure against
Prone to attacks Energy consumption Consensus finality
tolerance model attack
Faulty process
can have up to
Double spending Absolute/ instant
ELASTICO 1/4th of the - -
attack irreversibility
computational
capacity
Number of
faulty process <
Leader- free Byzantine Consensus - Sybil attack - Probabilistic
number of
processes/3
Number of
faulty process ≤
Implicit Consensus DDoS attack - - Absolute
number of
processes/3
n≥ 3b+1 where
n is the number Sybil attack,
Proof of trust (PoT) of nodes and b is DDoS attack - Probabilistic
collusion attack
the number of
byzantine nodes
DBFT
- - - Probabilistic
Consensus Algorithm
No node can
Less energy
possess more
consumption
PoPF than 50% of the - 51% attack Absolute
claimed as compared
computational
to PoW
power.
faulty
DoS attack, Sybil
processes¡= - - Probabilistic
Ripple attack
(processes- 1)/5
faulty processes
Proof of Vote (PoV) ¡ 50% of - - - Probabilistic
processes
No node can
Selfish mining,
possess more
DoS attack, Sybil 538 KWh electricity
Proof of Work (PoW) than 50% of the - Probabilistic
attack, bribe consumption
computational
attack
power.

63

Você também pode gostar