What is a 51% attack?

After the last article ( https://my.oschina.net/u/3620978/blog/1648736 ) was published, someone raised a question "If one of them is correct and the others join forces to commit fraud, what are the conditions? ". This article will discuss this issue.

 

llThe content of this article is still translated from Authorito Capital CEO 's blog posts "WTF is The Blockchain?" and "Who Owns Blcockchain", with slight deletions.

llOriginal link:

https://medium.com/@mohitmamoria/who-owns-the-blockchain-9b3af7a2ab76

https://hackernoon.com/wtf-is-the-blockchain-1da89ba19348

 

In the previous article, we assumed the blockchain as a ledger, and each block is each ledger page. When a ledger page is full, it needs to use a "password" (hash value) for it. Seal it up and save this page in a folder.

 

Now imagine that there are already 5 pages of content in this folder, all of which are sealed with a "seal password". What if I go back to the second page and modify some of the transaction data for my benefit? Sealing the password will let everyone see the inconsistency of the transaction, right? What if I recalculate a seal password for the modified content and mark it on the page?

 

Here's a little trick to protect the seal password from being modified

 

Remember what I told you before? There are two boxes, one box contains the number 20893, the other box is empty, waiting for the player to calculate a value that adds the contents of the two boxes to get the result we want.

 

In fact, computing the blockchain's seal cipher is more complicated, requiring three boxes instead of two. Two of the three boxes already contain content in advance, one box contains a list of all transactions on this page, the other box contains the output of the previous page after processing by the "magic machine" (hash encryption), and the third box contains the output of the "magic machine" (hash encryption). The box contains the seal password calculated by the player himself. When the three boxes are full and input into the machine, the output from the right side of the machine must meet our preset conditions.

This clever "little trick" in the blockchain ensures that each page is sealed against its previous page. Therefore, if someone wants to modify the content of a certain page that has been sealed, he must modify the content of all pages before this page and the sealing password to ensure the consistency and continuity of the chain.

 

At the very beginning of the last article, we assumed that there were 10 players, if one of these players tried to deceive everyone and modify the content of a certain page of the ledger, he would have to modify the content of many pages and recalculate the content on these pages. Seal the password. We all know how hard it is to calculate the seal code! From the page he modified, he would have to re-establish another chain in the network. But this chain can never catch up with the honest chain maintained by the other 9 people, because the work ability and speed of one person cannot keep up with the work ability and speed of the nine people together. Thus, the longest chain is guaranteed to be the "honest" chain. Therefore, in this game, a dishonest guy can't beat 9 honest players, and it is impossible for him to modify it successfully.

What if instead of one, six became dishonest?

 

This situation, in technical terms, is "51% attack".

 

If the majority of the network becomes dishonest and deceives the rest of the network, the blockchain protocol will fail. While this is unlikely to happen, we also need to be aware of the fragility of blockchain systems, which are built on the assumption that the "majority of the group is always honest."

 

So, in the blockchain, if a person can control 51% of the computing power of the system, he can rewrite the data in the blockchain to benefit himself.

 

What does "51% of the computing power in the system" mean?

The CPU energy and electricity that the players in the system spend for accounting and calculating the "seal password" is what we call computing power.

 

how to solve this problem

 

Some solutions have been proposed, such as "proof of stake" methods that do not rely on computer computing power. Proof-of-stake refers to the fact that players in the system do not solve mathematical puzzles to figure out the "seal password", but instead stake their coins on their proposed solution. If the majority of people agree with the plan, the player will be rewarded. If the majority disagree, the player's previously staked coins will be deducted from his wallet. This method introduces a penalty scheme.

 

But there are also problems with this method. While dishonest guys will be punished, it will also lead to players in the system where "the rich get richer and the poor get poorer". If I win the bet and get rewarded this time, next time I bet more coins, win the bet and bonus again, and bet more assets. The cycle repeats, and in the end, most of the assets in the blockchain will be gathered in the hands of very few people. If these few people with most of the wealth want to rewrite the blockchain, they can.

 

In any case, as long as a few people master the blockchain, the majority of people in the blockchain are at risk.

 

There's a conversation between Vitalik and others on Twitter:

Bug Spencer : Is there any difference between the bank designation rules and the core developer designation rules? Both depend on others.

Vitalik Buterin : If you found out that JP Morgan had abused its power to deceive you, would you and other clients who were dissatisfied with JP Morgan spun off a "JP Morgan classic"?

 

Vitalik's point is that if a blockchain has users who are dissatisfied with its rules, those users can split off and recreate a forked chain, just like the Ethereum Classic and Ethereum blockchains.

 

This method, although not entirely applicable, is also a method.

 

Is there a better solution? There will be, after all, so many blockchain enthusiasts are paying for it. If you have a better approach or a better perspective on blockchain, please contribute to us.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325117256&siteId=291194637