Shamili Scopus Survey 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/345005424

Blockchain Technology: Consensus Protocol Proof of Work and Proof of Stake

Chapter · September 2020


DOI: 10.1007/978-981-15-5566-4_34

CITATIONS READS

36 2,103

3 authors:

B. Sriman s. Ganesh Kumar


SRM Institute of Science and Technology SRM Institute of Science and Technology
22 PUBLICATIONS 85 CITATIONS 25 PUBLICATIONS 147 CITATIONS

SEE PROFILE SEE PROFILE

Shamili Prabakaran
SRM Institute of Science and Technology
8 PUBLICATIONS 60 CITATIONS

SEE PROFILE

All content following this page was uploaded by Shamili Prabakaran on 04 March 2022.

The user has requested enhancement of the downloaded file.


Blockchain Technology: Consensus
Protocol Proof of Work and Proof
of Stake

B. Sriman, S. Ganesh Kumar, and P. Shamili

Abstract The core technology used for many of the cryptocurrencies is blockchain.
The extensive research attention has been received by the blockchain, a distributed
ledger technology. The peer to peer network and the cryptography are playing a
major role in blockchain technology. In addition to that, the consensus protocols
are also playing an important role in the fundamentals of the blockchain tech-
nology. In blockchain systems, the security and the fault tolerance were guaran-
teed by the consensus protocols. There are two broad categories of the blockchain
consensus protocols. They are Probabilistic finality consensus and the absolute
finality consensus protocols. In this paper, the consensus protocols of the above
two categories and the strengths and the weakness of blockchain types that could be
applicable are presented.

Keywords Blockchain · Consensus protocols [POW, POS] · Cryptocurrency ·


Cryptography

1 Introduction

A new decentralized cryptocurrency was described by Nakamoto in the white paper


for the first time in blockchain. The digital cryptocurrency [1] like bitcoin took the
blockchain technology attention among all the people. After that, most of the ideas
came out with the blockchain technology. With the combination of all the techniques
like cryptography, peer to peer network [1], and distributed system technology, the

B. Sriman (B) · S. Ganesh Kumar · P. Shamili


Computer Science and Engineering, SRM Institute of Science and Technology, Chennai 603203,
India
e-mail: srimanb@srmist.edu.in
S. Ganesh Kumar
e-mail: ganeshk1@srmist.edu.in
P. Shamili
e-mail: shamilip@srmist.edu.in

© Springer Nature Singapore Pte Ltd. 2021 395


S. S. Dash et al. (eds.), Intelligent Computing and Applications,
Advances in Intelligent Systems and Computing 1172,
https://doi.org/10.1007/978-981-15-5566-4_34
396 B. Sriman et al.

blockchain uses it. Blockchain provides a secure framework to the cryptocurrencies,


where no one could tamper the data of the transactions. Due to this, the wide use of
blockchain technology [5] is used in the fields of Supply chain, Internet of Things
(IoT), medical, and the financial fields.
There is a big issue based on applying the blockchain technology and many of
the challenges; how to design a suitable consensus protocol. Here the consensus
is the distributed ledger, [6] that is maintained by all the nodes in the network.
In the existing system (Traditional software), the main problem is maintaining the
consensus because of the centralized servers [7]. But, in the blockchain distributed
system, each and every node itself is a host and a server. Moreover, it needs to share
the information to all the nodes in order to complete the consensus protocols.
This is an excellent consensus protocol that could tolerate the phenomena and
minimize the dangers which are not affected by the consensus results. The consensus
protocols should be adopted by the systems that are suitable for the system based
on blockchain. The three types of blockchain are public, private, and consortium
blockchain [19]. Each one has its own application scenarios. In this paper, the
different consensus protocols of the blockchain are analyzed and their applications
and the performances based on the scenarios.

2 Consensus Protocols Proof of Work [Pow]

Satoshi Nakamoto [1] applied the bitcoin white paper with the concept of Proof of
Work (PoW) in 2008, which was first published by Bonneau et al. [7] Cynthia Dwork
and Moni Naor in 1993. The most popular consensus mechanism for cryptocurrency
is the Proof of Work. In 1999, the term “Proof of Work” was initially used by Markus
Jakobsson and Ari Juels [3]. The principle followed here is “Easy to verify but difficult
to find”.
Principle: A solution that is easy to verify but difficult to find
A. Miners

The process of solving the crypto puzzle is called mining [12]. The mining activity
performed by the node in the network is named as minor. Then the new block is added
to the blockchain as shown in Fig. 1. Here comes the proof of work as an answer to
the mathematical problem (crypto puzzle) which is considered as the solution that is
difficult to find but it is easily verified.
B. Mining Pool

For finding the new blocks, the amount of work done by the miners over a network
with the shared processing power equally in the pooling of resources are the mining
pool [14]. The members in the mining pool are awarded with the amount of “Share,”
who provides the partial verified Proof of Work. The difficulty level for the minors
is increased for mining in the pools where it takes more time for the slower miners
Blockchain Technology: Consensus … 397

Fig. 1 Flow of POW

to create a block as shown in Fig. 1. Rather than randomly finding once few years, it
is better to get rewards for every newly generated block. This is the solution for the
problem to the miners to pool in their resources.
C. Solving the Crypto Puzzle
The puzzle is solved by guessing at random hash value [1]. Predicting the output
is made impossible by using the hash function. For that difficulty, the minors choose
the value randomly and apply it to the hash function and the data in a particular block.
The number of zeros that are preestablished will be the starting for the resulting hash.
There may be many results with the combination of two consecutive integers and it
leads to numbers that are impossible to find. Now, what to do if there is more than
one nonce produced? (all minors trying for the same block).
If a particular miner as shown in Table 2, in the peer to peer network solves the
crypto puzzle [10] or finds the hash within the time period and the announcement
takes place. Then the other miners will stop their work and go for the next nodes
to solve the crypto puzzle. As a result, the miners will be rewarded as they get new
bitcoins for solving the puzzle.

3 Cryptography SHA-256

A. Cryptography Major Role in Proof of Work

SHA 256 is the most popularly used Proof of Work consensus and was announced
as the portion of the Bitcoin. [1] The others were SCRYPT, SHA-3, SCRYPT JANE,
SCRYPT-N, etc.
398 B. Sriman et al.

Table 1 SHA HASH calculation


SHA-1 SHA-224 SHA-256 SHA-384 SHA-512
Message digest size 160 224 256 384 512
Message size <264 <264 <264 <2128 <2128
Block size 512 512 512 1024 1024
Word size 32 32 32 64 64
Number of step/round 80 64 64 80 80

With the help of the hash value, the miners try to find the random nonce [14]
(random data of small size) and find the block that holds the hash (of binary values)
as shown in Table 1, with particular 0’s. A hash with number of zeros that has the
rare hashes to find. If it’s a good hash, the data is not found and have to try many
times to find a perfect nonce [16].
The number of zeros were based on the difficulty [17] faced by the miners to
search for a perfect block. For every 10 min, a new block is created by an average of
how many blocks that are previously added to it.
B. Nonce

The cryptocurrencies and the blockchain are working under the mining algorithm
like Proof of Work with the concept of the central part as nonce [9]. A nonce, which
produces the hash which is lower than or equal to the hash value is fixed by the
network as difficult as shown in Fig. 2. For finding these values the miners do mining
and compete with each other. In that network, the miner who finds a nonce is named
as the golden nonce. Then the miner gets the reward and adds that block to the

Fig. 2 Hashing techniques


Blockchain Technology: Consensus … 399

Fig. 3 Block summary

blockchain network. It all happens during the Proof of Work mining. Now let us see
how the process of nonce is done in mining.
C. Building Blocks with Nonce

Like timestamp and the difficulty target, the block header stays with its key data
value. A key with 32-bit in block is the nonce as shown in Fig. 3. For creating a
new block, the miners choose a random nonce and add it to the block header while
building a block. As stated before in nonce, if the miners are not having the number
of zeros, then they avoid the hash and go for the new nonce. It will be repeated until
a nonce is discovered by the miners.
D. Block Reward

Every block that is mined successfully by the miners in the blockchain network are
rewarded with the Bitcoin block.
• The number of bitcoins a miner gets, is the number of rewards that miner mines
a block.
• The reward becomes half for every four years or every 210,000 blocks.
• The expected reward that hit be zero to around 2140

E. Concept of Block Reward

The size of every bitcoin block is 1 MB and holds the data of transaction informa-
tion. Illustration, when a transaction occurs between two nodes in the network and
information about transaction are stored in a block [16].
At the initial stage (in 2009), for each and every bitcoin block was rewarded as a
worth of 50 BTC (bitcoin). In February 2019, its reward was 12.5 BTC for one block
and bitcoin price is $3500, which is of 12.5 × 3500 = $42,000. The block rewards
400 B. Sriman et al.

were given to the miners those who do mining by using their computation powers
to find a new block as shown in Fig. 3 Similarly, the other cryptocurrencies in the
blockchain have the same mechanism for rewarding the miners. The miner who wins
the block reward adds the first transaction on the block.

4 Main Issues with Proof of Work Consensus

The following are some of the issues for the Proof of Work consensus mechanism.
A. The 51% Attack

In the blockchain network, if any node gains 51% or more than 51%, [8] the nodes
could influence the blockchain by gathering most of the network as shown in Table 2.
Time consuming: for solving the crypto puzzle, the miners have to check for the
nonce which must be solved to mine the block. This helps in time consumption.
• Resource consumption: in order to solve the mathematical crypto puzzle, the
miners consume high computational power. This results in wastage of resources
like hardware, space, money, and energy. It is estimated that the world’s electricity
spent for verifying transactions in 2018 was 0.3%.
• It takes a minimum of 10–60 min for the confirmation of any of the transactions in
the blockchain network. This is due to the time taken for mining the transactions
and adding it to the blockchain.
B. Computation Power
• Carbon footprint: 34.73 Mt CO2 In comparison with the carbon footprint
of Denmark over 723,140 VISA transactions with 48,872 h of time watching
YouTube.
• Electrical Energy: 73.12 TWh In comparison with the power consumption of
Austria, the equivalent power consumption has an average of over 20.61 days in
US as shown in Fig. 4.

Table 2 Analysis and comparison


System function Proof of work [POW] Proof of stake [POS]
Mining power The work (solving the crypto Depends on the stake of the
puzzle) done by the miner miners
51% attack Level incentive to avoid 51% Highly expensive in 51% attack
attack
Energy consumption Higher Lesser
Decentralized versus Becomes powerful when nodes Mining communities will
centralized which tend to be centralized become decentralized based
over a period of time upon their stake
Target time for a block For every 10 min For every 15 s
Blockchain Technology: Consensus … 401

Fig. 4 Energy consumption chart

• Electronic Waste: 11.49 kt In comparison with the e-waste generation of Luxem-


bourg, as shown in Fig. 4, the equivalent weight of 1.48 “C”-size batteries or golf
balls around 2.09
C. Definition of 51% Attack

This attack on blockchain is the 51% attack. [15] Usually the bitcoins, the attacks
which are mainly by a group of miners who control more than 50% of the mining
hash in the network or by the computational power. The ability as shown in Table 2,
of the attackers is to prevent the transactions that gain confirmations and can halt the
payments between the users [19]. They can also reverse the completed transactions
of any user in the network and this leads to Double Spend coins. The attackers could
not alter old blocks or create new coins in the blockchain-based cryptocurrency.
D. Double–Spending

The risk at which the spending of digital currency is twice is called Double spending.
The savvy individuals, who understand about the blockchain network and the compu-
tational power needed were reproduced to obtain the digital currencies that are unique
potential problem [15]. This type of issue will not happen during the cash transac-
tions, the parties involving in transactions can easily verify the authenticity and the
ownership of the physical currency. But in digital currency, the digital token can be
copied by the holder and it might be sent to any of the parties or the merchants with
the original one.
E. Proof of Work System Features

The two features that could contribute to the wide spread of the consensus protocol
are
402 B. Sriman et al.

• It is difficult to do the mathematical crypto puzzle problem.


• The correctness of the solution could be easily verified.

5 Consensus Protocols Proof of Stake [Pos]

The complete virtual consensus mechanism was made by the Proof of Stake. The
way of achieving the goal differs and the process remains the same as proof of work.
While in PoW, the miners solve the mathematical crypto puzzle with the help of the
high computing resources.
A. Validators

The validators will be there in PoS instead of miners in PoW [13]. In the ecosystem,
the validators lock some of their Ether [2] as a stake. Like betting, the validators as
shown in Fig. 5, will bet on those blocks that are likely to be added in the chain. In a
proportion to the stake, the validators will be rewarded when a new block is added.
1. One who becomes a validator may hold the cryptocurrency and also sometimes
locked up deposit were required.
2. It is also done based on how much stake or cryptocurrency the validators having
are the chances to mine a new block.
3. In the PoS protocol, it will randomly assign the validator and give the right to
create a new block in between as shown in Fig. 5, the validators and that is based
on the stake value.
4. The reward as shown in Fig. 5, will be provided for the chosen validator.
The Proof of Stake is mainly suitable for resolving the BFT (Byzantine Fault
Tolerance) [4] as the validators were tracked in the network and the known identities.

Fig. 5 Flow of POS


Blockchain Technology: Consensus … 403

For example, the list wallet address. In Byzantine Fault Tolerance, it requires 2/3 of
the validators to be honest and keeping all these individuals helps to maintain the
status.
B. Advantage
• Efficiency in energy

The PoS algorithms were efficient in energy in comparison with PoW [13]. The
mining process in PoS makes it a greener option in cutting out the energy intensively.
• Security
For security in PoS, the attackers should proceed with their stakes and the assets
in order to attempt 51% attacks. In comparison with PoW, the attackers will not lose
their hardware when attempting the 51% attacks.
• Decentralization

Leading to the real threat of centralization, the group of miners mining their resources
(mining pool), could control over 51% [15] of the networks that are running in PoW
systems. As a result, there is an exponential increase in the reward for a single
investment in PoW system because of opposition in the linear increase in the PoS
system. For an example, if the validator in PoS network invests twice as much as any
other validator, they will be granted the control.
C. Conclusion

The PoS made the validators not to have their own computing power as the factors
that may influence the validators to win number of their own coins and the complexity
of the network.
The benefits that switched from PoW to PoS are as follows.
• Savings in energy
• If it becomes highly expensive, there will be safer network.
D. Casper Blockchain

The consensus mechanism in which both the POW/POS works together is named
as Casper Blockchain. Where the Proof of Stake is overlaying on the ethash of the
Proof of Work protocols. In this way, the Casper is a security deposit protocol that
are based on the economic consensus system. The new consensus will be thanked
for making the validators to deposit the security amount to be a part of consensus
protocol. The Casper protocol is a control over security deposit that determines the
specified amount of rewards the validators receive. The validators security deposit
will be deleted and the privilege to be a part of the consensus network will be removed,
if the validator creates the “invalid” block. The Casper security can also be defined
as doing something like Bets. In the PoS protocol, the validators who won the bet
will be rewarded with the money prize based on the transactions.
404 B. Sriman et al.

6 Analysis and Comparison

A. Fault Tolerance

In PoW and PoS protocols [10], the attacker needs a large amount of computing
power or the stake [18] for the creation of a long chain instead of the valid chain. In
bitcoin, the double-spending attack is completed by creating the longer private chain
with a fraction of 50% by using the high computing power. The blockchain network
becomes undetermined, if the attackers fraction becomes 50% or more than that. The
stakeholder who has less than 50% stake only be allowed in the PoW and PoS.
B. Limitation

The PoW consumes most of the computational power in comparison with the other
consensus protocol and the output of PoW per second in the bitcoin, which limits
the applicable transactions of PoW in the payments [20]. The PoW and PoS have the
same features, even though the consumption of the computation power is reduced
and the stakeholders get the reward for the block. Each node communicating in the
PoS requires the message transfer in every round of the consensus, thus it has a
high performance for the network. There will be no anonymity due to the nodes
participating in the consensus. In the PoS, the process in the consensus is completed
in a few seconds, that is suitable for the scenario in payments.
C. Scalability

The PoW and PoS are having good scalability. But there are some ways to improve
the scalability. For example, in Bitcoin it adopts the network of lightning to give
the Off-Chain system to improve the scalability. The plasma layers of layer 1 and
layer 2 are the scaling solution and the sharding technology were proposed by the
Ethereum [8], respectively. With the small number of nodes, the PoS is limited to
the high-performance networks.
D. Scenarios

The current blockchain system is of three parts. They are public, private, and consor-
tium blockchain as mentioned above. Everyone in the public blockchain will partic-
ipate in the distributed ledger and the consensus process. The PoW and PoS [11]
are applicable to the public blockchain. In the private and consortium blockchain,
the nodes in the network participates in the consensus process that belongs to the
permissioned blockchain. Even though, the public and the consortium are not like
a public blockchain, due to the high efficiency and their strong consistency of the
consensus, it will be applicable in the medical and the commercial scenarios.
Blockchain Technology: Consensus … 405

7 Conclusion

In the blockchain system, the consensus protocols are guaranteed for the perfect
operations in the blockchain systems. The nodes in the blockchain network agree
[12] to the transaction or the values through the consensus protocols. In this paper,
the blockchain consensus protocols and the strengths and the weaknesses were
discussed through the application scenarios through the analysis and the compar-
isons. It is concluded that the consensus protocols were of best use and applicable
in the appropriate application scenarios.

References

1. S. Nakamoto et al., Bitcoin: a peer-to-peer electronic cash system


2. V. Buterin, On public and private blockchains (2015). https://blog.ethereum.org/2015/08/07/
on-public-and-private-blockchains/
3. M. Swan, Blockchain: Blueprint for a New Economy (O’Reilly Media, Newton, MA, USA,
2015); A.M. Antonopoulos, Mastering Bitcoin: Unlocking Digital Cryptocurrencies (O’Reilly
Media, Newton, MA, USA, 2014)
4. J. Fan, L.T. Yi, J.W. Shu, Research on the technologies of Byzantine system. J. Softw. 24(6),
1346–1360 (2013). Online available: http://www.jos.org.cn/1000-9825/4395.htm
5. T.T.A. Dinh, R. Liu, M. Zhang, G. Chen, B.C. Ooi, J. Wang, ‘Untangling blockchain: a data
processing view of blockchain systems’. IEEE Trans. Knowl. Data Eng. 30(7), 1366–1385
(2018)
6. F. Tschorsch, B. Scheuermann, Bitcoin and beyond: A technical survey on decentralized digital
currencies, IEEE Commun. Surv. Tuts. 18(3), 2084–2123 (2016). 3rd Quart
7. J. Bonneau, A. Miller, J. Clark, A. Narayanan, J.A. Kroll, E.W. Felten, SoK: research perspec-
tives and challenges for bitcoin and cryptocurrencies, in Proceedings of IEEE Symposium on
Security and Privacy (San Jose, CA, USA, 2015), pp. 104–121
8. G. Wood, Ethereum: a secure decentralised generalised transaction ledger, Yellow paper (2015)
9. C. Natoli, V. Gramoli, The blockchain anomaly, in Proceedings of the 15th IEEE International
Symposium on Network Computing and Applications, NCA’16 (2016), pp. 310–317
10. C. Natoli, V. Gramoli, The balance attack against proof-of-work blockchains: the R3 testbed
as an example, Tech. Rep. 1765133 (2016)
11. A. Black, Hashcash-Adenial of service counter-measure, Tech. Rep. Cypherspace, (2002).
URL http://www.hashcash.org/papers/hashcash.pdf
12. Alyssa Hertig, What Is Ether? Coin Desk, 21 Apr (2017). https://www.coindesk.com/inform
ation/what-is-ether-ethereum-cryptocurrency
13. F.B. Crane, Proof of work, proof of stake and the consensus debate. Cointelegraph, 20 Dec.
2014. https://www.cointelegraph.com/news/proof-of-work-proof-of-stake-and-the-consensus-
debate
14. M.A Alahmad, I. Al-shaikhli et al., Joux multicollisions attack in sponge construction, in
The 6th International Conference on Security of Information and Networks (SIN), 2013 6th
International Conference on, ACM (2013)
15. M.A Al-Ahmad, I.F. Alshaikhli, Broadview of cryptographic hash functions. Int. J. Comput.
Sci. Issues 10(4), 239–246(2013)
16. S. Wu, D. Feng, W. Wu, J. Guo, L. Dong, J. Zou, (Pseudo) preimage attack on round-reduced
Grøstl hash function and others, in Canteaut, vol. 9, pp. 127–145
17. X. Wang, H. Yu, Y.L. Yin, Efficient collision search attacks on SHA-0, in Advances in
Cryptology–CRYPTO 2005 (Springer, Berlin, 2005)
406 B. Sriman et al.

18. Merkle tree URL https://en.wikipedia.org/wiki/merkletree


19. J.R. Douceur, The Sybil Attack, in: International Workshop on Peer-to-Peer Systems (Springer,
Berlin, 2002), pp. 251–260
20. Total cryptocurrency market cap hits new all-time high (2018). URL https://www.coindesk.
com/150-billion-total-cryptocurrency-market-cap-hits-new-time-high. Accessed on 14 May
2018

View publication stats

You might also like