0

I don’t quite understand why a malicious miner needs more hashing power than the rest of the network combined.

When miners are solving a hash puzzle, aren’t they solving the puzzle individually? If so, a malicious miner merely needs to be the most powerful node in terms of her hashing power. But I guess miners are actually solving the puzzle together? In this case, it makes sense that the malicious miner needs to have more than 51% of the hashing power.

edited: November 21, 2018

My question is not how to pull of the 51% attack, but why a malicious miner needs more hashing power than the rest of the network combined.

2
  • "I don’t quite understand why a malicious miner needs more hashing power than the rest of the network combined." To do what? It's not clear what this question is about. Nov 21, 2018 at 4:06
  • Right. Let me clarify: to pull off the 51% attack and double spend.
    – sflow
    Nov 21, 2018 at 5:36

4 Answers 4

1

I don’t quite understand why a malicious miner needs more hashing power than the rest of the network combined

Generally speaking, a malicious miner is one attempting to perform a double-spend or reverse the block-chain.

A miner can attempt to broadcast any block, but it will get rejected if the receiving nodes do not agree with it (checking against consensus rules).

It is important to remember that Bitcoin nodes will always favor the chain with the most amount of proof-of-work (chainwork); this is specified in the protocol's node implementation. The malicious miner needs sufficient hash power to recalculate more blocks than the current chain such that it will have more proof-of-work. Once the attacker's chain has greater chainwork, nodes will discard the existing chain in favor of the attackers.

The miner is indeed required to have more power than the rest (the "honest" part) of the network combined. The miner would need a majority of the hashing power. You will often hear this referred to as a 51% attack.

Additionally as Learn Cryptography suggests:

Hitting 51% network control is not a guarantee of success, just the point where success is likely. In fact, you could attempt this sort of attack with much less network control, but your odds of success would be very low.

This is also why it is recommended for users to wait until a transaction has over 6 confirmations as it gets exponentially more difficult for an attacker to double-spend as confirmations build on top of the transactions current block. With 51% hash power and 1 confirmation, the attacker is practically guaranteed to be successful in a double-spend.

You can calculate your own attack probabilities for this here

When miners are solving a hash puzzle, aren’t they solving the puzzle individually?

Miners do their hashing independently, yes. Each miner will check many nonces for the current block until either a solution is found that meets or is below the target, or the block has been broadcast by someone else.

4
  • You're misstating the question by leaving out the weird "rest": "The miner is not required to have more power than the entirety of the network.".
    – Jannes
    Nov 19, 2018 at 5:07
  • Actually in the context where the malicious miner does NOT yet have any hashing power he DOES have to acquire more than the WHOLE (and thus the rest of the) network combined (counter to your answer). And in the context of him already having some hashng power he will need to grow until he DOES have more than the rest of the network combined. Both of those statements are consistent with your 51% explanation
    – Jannes
    Nov 19, 2018 at 5:24
  • 1
    @Jannes Whoops, you are correct. I did not think it through. I appreciate the edit.
    – KappaDev
    Nov 19, 2018 at 5:30
  • Let’s say Bob owns the 30% of the hashing power and other ten people own 7% of the hashing power for each. If they are mining independently, probabilistically speaking, doesn’t that mean Bob can almost always win?
    – sflow
    Nov 21, 2018 at 1:29
0

Because the rule is that everyone follows the most cumulative work. Miners solve the puzzle independently but since the blocks are chained they build on top of each other's work. If a malicious miner wants to produce the longest chain by himself over a long period of time he must have the majority of the hash power.

0

Even though every miner is individually working on its own block template (puzzle), as soon as another fresh block comes in, the puzzle is quickly changed to incorporate (build on top of) the fresh block and the work continues. From the perspective of the attacker all miners are cooperating as though they were one.

That does mean an attacker can increase his chances by timing his attack when the rest of the network is itself temporarily split (partitioned) on two or more chain tips. This happens naturally every week or so when two competing blocks are found at the same time. But could also result from a consensus bug or problems at one or more large pools (misconfiguration or from for example a DOS attack).

0

My question is not how to pull of the 51% attack, but why a malicious miner needs more hashing power than the rest of the network combined.

The malicious miner creates two transactions that conflict. He mines a chain including one transaction and he broadcasts the other transaction to the world. He waits until the worlds has included the transaction and the transaction has enough confirmations that someone has relied on it. Now, to undo the transaction and successfully double spend, he has to make the chain he's mining longer than the chain everyone else is mining.

Only if he has more mining power than everyone else will the chain only he is mining eventually be longer than the chain everyone else is mining. The longest chain wins, so the double spend only occurs if his mining power exceeds everyone else's.

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