Prerequisite – Proof of Work (PoW)
As we know, the idea of Proof of Work was by Cynthia Dwork and Moni Naor. This permissionless consensus uses double SHA 256 which makes it secure from hackers. With proof of work, miners compete with each other to complete the transaction and get the bounty. Even it has many advantages like solving the double-spending problem and very difficult to tamper it, but it is not impossible to tamper if the hacker has high computational power.
In this article, we will see two major attacks by which PoW based systems can crash. They are :
- Sybil Attacks
- Denial of Service(DOS) Attacks
These are explained as following below with their solutions.
1. Sybil Attacks :
In Sybil attacks, the attacker attempts to fill the network with the clients under its control. When this thing happens the attacker can actually control or get a monopoly over the network and these clients can do different kinds of actions based on the instruction from the attacker. They can refuse to relay the valid blocks or they can only relay the blocks which are generated by the attackers and those blocks can lead to double-spending.
In Simple language, The attacker can include multiple nodes in the network who can collectively compromise the Proof of Work mechanism.
To prevent Sybil attacks we have to diversify the connections i.e allowing outbound connection to one IP per / 16 IP address. So by diversifying the network it is expected that if the attacker generates multiple false miners the attacker will generate them within the same clustered network or subnet.
Although this solution makes hard to launch sybil attacks but it doesn’t make it impossible.
2. Denial of Service (DOS) Attacks :
In this attack, the attacker sends a lot of data to a particular node so that node will not able to process normal Bitcoin transactions. As a result, the metabolism of the mining procedure will get delayed which wastes the power for computation and in that meantime, the attacker can also send new nodes to the network resulting in a monopoly which is nothing but a Sybil attack.
To prevent DOS attacks there are several rules bitcoin have which are:
- No forwarding of orphaned blocks.
- No forwarding of double-spend transactions.
- No forwarding of same block or transactions
- Disconnect a peer that sends too many messages
- Restrict the block size to 1 MB (1mb according to Satoshi Nakamoto)
- Limit the size of the bitcoin script up to 10000 bytes.
As we have seen above there are 2 major attacks that can alter transactions in Proof of Work (PoW) based systems and we also discussed the solution for that. Now the question comes Can we break Bitcoin PoW?
The answer would be YES, even after taking care of all types of attacks Bitcoin PoW is computationally difficult to break, but not impossible. Because attackers can deploy high power servers to do more work than the total work of the blockchain. There is a known case of successful double-spending.