Home Free Lab ReportsAbstruct

Abstruct

Abstruct:
In this paper author has tried to put a trade-off between security provision and performance of different POW based block chain. For this a simulator is designed which can capture the real world constrained like network propagation, different block size, block generation interval. Author has also devised optimal adversarial strategies for double spending and selfish mining.

Introduction:
Since it’s invent in 2009 Bitcoin’s blockchain has been a revolution for solving complex problems. Be it money transaction, healthcare to keeping legal documents blockchain can be used for all these cases. Although several consensus protocol like proof of Stake, Proof of Elapsed time have been proposed most existing blockchain uses computationally expansive Proof of Work(POW) consensus mechanism. This mechanism is currently used by 90% of existing digital cryptocurrencies. Recent research hint that performance of a blockchain cannot be increased without compromising the securities. However, the relationship between performance and security provision of different POW based blockchain is not studied in much detail. In this study author is trying to focus on this topic.

Background
What is block chain? —-block chain is a technology that enable moving digital assets from one individual to another. Now the focus is to understand what the main objective of blockchain is. For this it is necessary to realise how third-party banking transaction system works. If a person A wants to transfer money to B. A orders the third party banking system to transfer to B. The trusted third party identify B and its bank account. Then it moves the money to B after taking some fee from it. This typically takes around 3 days or more for international transaction. What blockchain is trying to do is to make that transaction without the trusted third party. Secondly blockchain tries to do this transaction faster. Third to do it cheaper than the existing banking transaction. Let’s dive into how blockchain addresses the money transfer problem.

The first Concept—-

Figure-1 Open Ledger
1.Open Ledger: Figure 1 is an example to illustrate the concept. These are four people namely A,B,C,D actually wants to move the money from one another. Let’s assume at genesis A has $10. Now let’s see the concept of open ledger and how it is implemented in the blockchain. We are going to add a transaction A-;B $5 and we are going to link it already existing transaction. Let’s assume B moves to D $3. This transaction is also added into the ledger. Finally, if D moves $1 to C and it is added to ledger. So, this is the concept of open ledger and it is a chain of transaction. This is one of the reason it is called blockchain. This picture is a chain of transaction that is open and public to everyone. What it gives us everyone in the network can see where the money is, how much money each one has in his pocket and everyone can decide whether a transaction is valid or not. For example, if A now attempts to move $15 to C, everyone in the network can see it is not a valid transaction because A do not have $15 and this transaction is not added to open ledger.

Figure-2: Distributed Ledger
2. Distributed Ledger: The main goal of blockchain is to get rid of this centralized ledger. Here comes the second principle, distributed ledger. That means blockchain takes centralized ledger and distribute it across network. Now all the elements in the network holds a ledger individually. Figure 2 describes it. However, this creates another problem. Various copies of the same ledger are in the network. So, blockchain need to make sure all these copies are synchronized, and all the participant see the same version of ledger.

Figure:3 Miners and Ledger Synchronization
3. Miners and Synchronizing the ledger: In Figure 3 let’s say B wants to move $5 to C. B is publishing and broadcasting this intended transaction to the network. Every element in the network will see B wants to move $5 to C. It is an unvalidated transaction. It is not part of the ledger. In order to get into ledger let’s look how miner works. Miners are special node which can hold the ledger. In this case let’s say D and A are miners. Miners are going to do the following things. Miners are going to compete among themselves who will be the first to take the transaction and validate it and put it into the ledger. The first miner to do so gets the financial reward. Let’s understand what it means to win the competition. A miner need to do two things. First it need to validate a transaction. This is easy as ledger is open, and miner can immediately calculate whether B has necessary fund to make transaction. The second thing miner needs to do is to find a special key that will enable this miner to take the previous transaction and lock the new transaction. In order to find this key miner needs to invest the computational power and time because search for this key is random. The miner is repeatedly gassing for the keys until it finds this first key which match this kind of random puzzle. The first miner to do that gets the financial benefit. Let’s say D a miner was able to solve this puzzle and add it to it’s own ledger. Now D will publish the solution to entire network. This means everyone in the ledger is enable to add this transaction to it’s own ledger. Now what the other miner will do?. As this problem is already solved there is no point for the other miner to solve this problem again. Miner A will immediately take this transaction and add it to the ledger. It will look to work on another transaction and hopefully get the reward next time.
Now let’s go through some important terms which is necessary to understand this study.

Figure 4: Stale Block(Blue Blocks)
At any given moment, the longest chain of blocks is the valid one. It is the one most miners are working on. Some miner may fork of a blockchain sidechain at any moment, but within seconds the main chain will overtake it in length, as mainchain has more hash power and the sidechain will be disregarded.

Miners are continuously using their computing power to solve the Blockchain puzzles that grant a block discovery. At any given moment a miner could “solve” a specific block. If this occurs, the newly discovered block is broadcasted on the blockchain to every participant. At this point, every participant mining that block must stop, and start to work on a new block.

If a miner continues to work on the already discovered block, it is considered working on a “stale block” since it is now old and no longer eligible for mining rewards. In Figure 4 blue blocks are the stale blocks as it is not part of longest chain. (Reference from steemit.com)

Figure4: Selfish mining
Selfish is an attack on the integrity of the Blockchain. This is where one miner, or mining pool, does not publish and distribute a valid solution to the rest of the network.

The selfish miner then continues to mine the next block and so on maintaining its lead. When the rest of the network is about to catch up with the selfish miner then release here portion of solved blocks into the network. In Figure 4 red blocks are doing this.

The result is that their chain is longer and more difficult, so the rest of the network adopts their block solutions and they claim the block rewards.

The selfish mining attack is a method for mining pools to increase their returns by not playing fair. Although this can be seen in some crypto currencies where pool shares are not so fairly distributed it is more difficult to carry off with Bitcoin.

It is also advantageous for a mining pool to increase in size to be able to perform selfish mining. At over 51% of network power the returns earned by a selfish mining pool are justified as probabilistically they can maintain their advantage in terms of hashing the next block. As the mining pool controls the majority of the network hashing power it can also censor or nullify certain transactions essentially holding the network to ransom.

There have been BIPS, Bitcoin improvement proposal, to lower the probability of a selfish mining attack such as randomly assigning miners to various branches when a fork occurs – or alternatively providing a threshold limit to which a mining pool can reach.
A further solution is to discriminate against a block depending on the timestamp it was released – so if a miner releases a long list of blocks in one shot – then the rest of the network would weight their validity against the timestamp they were hashed and the timestamp they were reported to the network. (Reference from www.cryptocompare.com)
Proof of Work: Proof of work is the competition encouraged by miners to find the correct hash.

The chance of finding the solution is so low that the when one is found, this is considered proof that the miner has done the work and so deserves the block reward.

The problem is that this is very energy intensive and has grown more so as the Bitcoin network has expanded and peta hashes of power have been directed at solving the hash rather than gig hashes. (Reference from HYPERLINK “http://www.cryptocompare.com” www.cryptocompare.com)
Double Spending Attack: It is an attack on blockchain where the given set of coin is spent more than once. There are three different ways to make this double spending attack.

Send two conflicting coin in the rapid succession in the bitcoin network. This is called the race attack.

Own 51% of total mining power and reverse any transaction of choice. This is called 51% attack.

To prevent block chain from this attack block confirmation mechanism is used. when a blockchain transaction is made it is added to the pool of unconfirmed transaction. Miners will the try to solve a hash puzzle and put this transaction inside a block. Then blockchain network confirm this block and add it to the existing network.

As it requires enormous computing power to solve these puzzles, they are difficult to undo. This is because each puzzle builds upon the previous blocks so to get to block #1, one needs to undo blocks #3 and #2. Figure 5 refers to this description. This would take a nearly impossible amount of computing power, so blockchain would be as secure as possible if number of block confirmations are more.

Figure 5: Block Confirmation
Simulator: It is a machine designed to provide a realistic imitation. In this study author has developed an open source block chain simulator. This simulator is callable to thousands of nodes.