Energy Consumption and Security in Blockchain

Energy Consumption and Security in Blockchain

EXAMENSARBETE INOM TEKNIK, GRUNDNIVÅ, 15 HP STOCKHOLM, SVERIGE 2020 Energy Consumption and Security in Blockchain ELEONORA BORZI DJIAR SALIM KTH SKOLAN FÖR ELEKTROTEKNIK OCH DATAVETENSKAP Abstract Blockchain is a Distributed Ledger Technology that was popularized after the release of Bitcoin in 2009 as it was the first popular blockchain application. It is a technology for maintaining a digital and public ledger that is decentralized, which means that no single authority controls nor owns the public ledger. The ledger is formed by a chain of data structures, called blocks, that contain information. This ledger is shared publicly in a computer network where each node is called a peer. The problem that arises is how to make sure that every peer has the same ledger. This is solved with consensus mechanisms which are a set of rules that every peer must follow. Consensus mechanisms secure the ledger by ensuring that the majority of peers can reach agreement on the same ledger and that the malicious minority of peers cannot influence the majority agreement. There are many different consensus mechanisms. A problem with consensus mechanisms is that they ​ have to make a trade-off between low energy consumption and high security. The purpose of this report is to explore and investigate the relationship between energy consumption and security in consensus mechanisms. The goal is to perform a comparative study of consensus mechanisms from an energy consumption and security perspective. The ​ consensus mechanisms that are compared are Proof of Work, Proof of Stake and Delegated Proof of Stake. The methodology used is literature study and comparative study by using existing work and data from applications based on those consensus mechanisms. The results conclude that Proof of Work balances the trade-off by having high energy-consumption and high security, meanwhile Proof of Stake and Delegated Proof of Stake balance it by having low energy consumption but lower security level. In the analysis, a new factor arose, decentralization. The new insight in consensus mechanisms is that decentralization and security is threatened by an inevitable centralization where the ledger is controlled by few peers. Keywords Blockchain, consensus mechanism, sustainability, security, decentralization, Proof of Work Sammanfattning Blockchain är en så kallad distribuerad huvudbok teknologi som fick ett stort genombrott med den populära blockchain applikationen Bitcoin i 2009. Teknologin möjliggör upprätthållandet av en digital och offentlig huvudbok som är decentraliserad, vilket betyder att ingen ensam person eller organisation äger och kontrollerar den offentliga huvudboken. Huvudboken i blockchain är uppbyggt som en kedja av block, dessa block är datastrukturer som innehåller information. Huvudboken distribueras i ett nätverk av datorer som kallas för noder, dessa noder ägs av en eller flera personer. Problemet är att alla noderna i nätverket måste ha identiska huvudbok. Detta problem löses med en uppsättning av regler som noderna måste följa, denna uppsättning kallas för konsensus mekanism. Konsensus mekanismer säkrar huvudboken genom att möjliggöra en överenskommelse bland majoriteten av noderna om huvudbokens innehåll, och ser till att oärliga noder inte kan påverka majoritetens överenskommelse. Det finns flera olika konsensus mekanismer. Ett problem med konsensus mekanismer är att de är tvungna att göra en avvägning mellan låg energianvändning och hög säkerhet. Syftet med denna rapport är att undersöka och utreda relationen mellan energianvändning och säkerhet i konsensus mekanismer. Målet är att utföra en komparativ analys av konsensus mekanismer utifrån energianvändning och säkerhet. Konsensus mekanismerna som jämförs är Proof of Work, Proof of Stake och Delegated Proof of Stake. Metodologin som används är litteraturstudier och komparativ analys med hjälp av existerande metoder och data från applikationer som använder konsensus mekanismerna. Resultatet visar att Proof of Work väljer hög säkerhet på bekostnad av hög energianvändning, medan Proof of Stake och Delegated Proof of Stake väljer låg energianvändning men på bekostnad av lägre säkerhet. Analysen ger en ny inblick som visar att centralisering är en oundviklig faktor som hotar säkerheten. Nyckelord Blockkedja, konsensus mekanism, hållbarhet, säkerhet, decentralisering, Proof of Work Table of contents 1 Introduction 6 ​ 1.1 Background 6 ​ ​ 1.2 Problem 7 ​ 1.3 Purpose 8 ​ 1.4 Goals 8 ​ 1.5 Research Methodology 8 ​ 1.6 Delimitations 9 ​ 1.7 Ethics and Sustainability 9 ​ 1.8 Structure of the Thesis 10 ​ 2 Background 11 ​ 2.1 Blockchain 11 ​ ​ 2.2 Consensus in Blockchain 15 ​ 2.3 Proof of Work 16 ​ 2.4 Proof of Stake 21 ​ 2.5 Delegated Proof of Stake 23 ​ 2.6 Related Work 25 ​ 2.7 Summary of the Consensus Mechanisms 27 ​ 3 Methodology 28 ​ ​ 3.1 Research Process 28 ​ 4 Analysis of Different Consensus Mechanism 30 ​ 4.1 Proof of Work 30 ​ 4.1.1 Energy Consumption Analysis 30 ​ 4.1.2 Security Analysis 31 ​ 4.2 Proof of Stake 33 ​ 4.2.1 Energy Consumption Analysis 33 ​ 4.2.2 Security Analysis 35 ​ 4.3 Delegated Proof of Stake 37 ​ 4.3.1 Energy Consumption Analysis 37 ​ 4.3.2 Security Analysis 38 ​ 5 Results and Discussion 40 ​ ​ 5.1 Summary Table 40 ​ ​ 5.2 Discussion and Comparison 41 ​ 6 Conclusions and Future Work 44 ​ 6.1 Conclusions 44 ​ 6.2 Limitations 45 ​ 6.3 Future Work 45 ​ 5 1 Introduction Blockchain is a technology for maintaining a digital and public ledger that is decentralized, which means that no single authority controls nor owns the public ledger [1]. It is a chain ​ ​ of data structures that are called blocks and each block contains information. For instance, in cryptocurrencies with virtual coins, the information kept in blocks are transactions and the chain of blocks is the total transaction history (ledger). A transaction can be defined as a trade between two users. The chain is created and maintained by a network of interconnected users as nodes and each node is a computer that is run by an individual or an organization. These nodes are also called peers and they can send or receive transactions. This network structure enables each peer to broadcast new transactions to other peers so that the transaction is added to everyone’s copy of the ledger. Before adding the broadcasted transactions to the ledger, the transactions are first added into blocks that are then broadcasted [1]. When a block is added, it cannot be ​ ​ removed or altered. The block creation is decentralized and public, all peers have the right to create new blocks. The consequence of a public block production is that peers are constantly racing against each other to create the next block, this results in conflicting blocks that claim to be the next block in the chain [1]. These conflicting blocks might ​ ​ contain the same transactions and only one of them can be added to the ledger. Peers have to achieve a majority agreement on which block is the next one so that their copies of the ledger are identical. Each blockchain application has a set of rules that, if followed, will ensure a majority agreement. This set of rules is called the consensus mechanism and there are many different ones and different concepts of achieving agreement [1]. ​ ​ 1.1 Background The irreversible property of blockchain ensures that the current data in the ledger will never be removed or altered. This requires that all peers agree on the new information by having a set of rules that decides if the new data is valid or to be discarded. This set of rules is called the consensus mechanism [2]. Consensus mechanisms are used to make all the ​ ​ ​ peers agree on the same ledger but also to avoid anyone to take control over the ledger. The three most popular consensus mechanisms used in cryptocurrencies are Proof of Work, Proof of Stake and Delegated Proof of Stake. Proof of Work (PoW) [3] is a consensus mechanism used in Bitcoin and other ​ ​ blockchain applications. In Proof of Work, peers must first solve a cryptographic puzzle that requires computational power before creating a block. The probability of solving the puzzle is higher if a peer has more computational power. The peer who first solves the cryptographic puzzle will add the block to the chain, this leads peers to compete against each other. In PoW, peers agree on the longest chain since it has the most computational power put into it. The only way to create fraudulent blocks is to achieve 51% of the total computational power in the network [2]. In Proof of Stake (PoS) [4], a virtual resource, ​ ​ ​ ​ called coin age, is used to create blocks. The coin age is the amount of coins that a peer owns multiplied with the number of days the coins have been unspent. As in PoW, all the peers agree on the longest chain because it has the most coin age spent on. However, the use of a resource with less energy consumption has led to security flaws called: Nothing-at-stake [5] and Long-range attack [6]. Delegated Proof of Stake (DPoS) [7] is a ​ ​ ​ ​ ​ ​ consensus mechanism where peers elect block producers who have the task of creating blocks. The block producers take turns to create blocks without competing against each other. However, having block producers in charge of block production can lead to a centralized system. 1.2 Problem The most popular consensus mechanism, PoW, requires high energy resources to secure the chain. PoW makes sure that no one can take over the chain without achieving 51% of ​ the total computational power in the network. Other consensus mechanisms avoid high ​ energy consumption by trying to secure the chain without using computational power. The outcome is that energy consumption decreased, but security flaws arose. There is a clear trade-off between energy consumption and security in consensus mechanisms. This means that if a consensus mechanism achieves lower energy consumption, its security level will not be high and vice versa.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    53 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us