4

Im just reading a book on the basics of blockchain and I encountered a confusion regarding the 51% attack. If I'm right, it says that an attacker holding 51% or more of the network's computing power can rewrite the blockchain to his own favor.

What confuses me is the following: Blocks in the mainchain can only be added sequentially, hence the growth speed of the blockchain is at most the speed of the fastest miner in the network. So if a attacker is faster than the fastest miner of the rest of the network can start at some lower block (maybe even the genesis block) and add his own blocks on a new branch one after the other. Since he is faster than the official main-chain, his branch will eventually be longer than the latter and consequently become the new main-chain.

So the attacker does not need 51% of the whole computing power, only more than any other node, which is usually much less than 51%. What is wrong here?

1 Answer 1

5

Yes, the attacker needs to be faster than the rest of the network combined. Being faster than the second-fastest miner is not enough.

I think this is where you are mistaken:

Blocks in the mainchain can only be added sequentially, hence the growth speed of the blockchain is at most the speed of the fastest miner in the network

Yes, blocks are added sequentially, but I can't follow your logic as to why that means block growth only happens at the rate of the fastest miner. If you are the fastest miner on the network, that in no way means that you are producing 100% of the blocks. It means that you are producing the highest proportion of the total, which is still likely a minority. Block growth still happens at a rate of the entire network collectively, regardless of who is fastest.

With that in mind, you can see why an attacker needs to produce blocks faster than the rest of the network combined.

5
  • 2
    The source of confusion is probably that the poster considers mining a block is a deterministic process that requires certain amount of sequential work, that cannot be paralelized. While in fact mining is a guessing process similar to the lottery where the person with 100 tickets is still unlikely to win the lottery comparing to 100000 tickets bought by the rest.
    – croraf
    Nov 15, 2017 at 19:57
  • 1
    Oh yes, I guess I see my misunderstanding. That the time needed for mining a block has a probability distribution with non-vanishing deviation is essential here. Thx Jestin and croraf. Nov 15, 2017 at 20:07
  • @Jestin [1/2] I am still not clear on the answer, probably because I don't understand the part "Block growth still happens at a rate of the entire network collectively". How does the growth depend on the entire network collectively? The nodes are working separately to solve the puzzle. It's not like they are combining their powers to solve the puzzle. Oct 10, 2022 at 8:34
  • @Jestin 2/2 "If you are the fastest miner on the network, that in no way means that you are producing 100% of the blocks" If I were secretly mining on a sidechain, wouldn't this be true? And if I had the highest mining power in the network, I would eventually mine more blocks (in my sidechain) than the rest of the network working of the original chain? Oct 10, 2022 at 8:35
  • @ShariqHasanKhan "It's not like they are combining their powers to solve the puzzle" They absolutely are. Because each node on the network is guessing, it multiples the number of guesses being made. Since it's random who will get it, the more collective random guessing, the faster the problem is solved.
    – Jestin
    Oct 21, 2022 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.