<p>A 51% attack is a breakdown of the security assumptions underlying proof-of-work, namely that it incentivizes actors strongly enough to behave cooperatively.</p>
<p>If an attack happens, it means those assumptions were wrong, and PoW should be discarded entirely. Switching to another hash function doesn't change anything. If the economic reality allows an actor to gain a hashrate majority with one function, there is no reason to assume it couldn't do the same with another hash function.</p>
<p>Of course, the community - at the social level - obviously <strong>has</strong> the possibility to jointly decide to make <em>any</em> changes to the consensus rules. Whether that is switching to another hash function, or a more narrow change such as deciding that a particular chain by a particular party is invalid. And the existence of that ability is something a would-be 51% attacker should take into account when weighing their odds. I feel this is mostly a mutually assured destruction like scenario; the impact of such a dramatic measure is likely very devastating even if it is successful.</p>

CC BY-SA 4.0
2022-06-25T17:26:51.820Z
Thanks, but why you think if any attack happens to PoW it should be discarded entirely? imagine after a long period of time (e.g. 10 years) some party be able to attack the network and break it down, why not change the rules to survive another 10 years? I mean we can look more flexible. PoW is great but we may need some protections against its weaknesses.
Amir reza Riahi
CC BY-SA 4.0
2022-06-25T19:20:59.240Z
The fact that the attack is possible at all implies PoW doesn't work. Its purpose it removing the need for coordination. If it needs coordination to add "protections" on top of it, then what is the point? There is no reason to assume it would take as long a second time as a first time to break down again.
Pieter Wuille
CC BY-SA 4.0
2022-06-25T17:00:15.803Z
2022-06-25T17:00:15.803Z
Pieter Wuille
<p>While miners use special hardware designed to perform only one job (e.g. calculating sha256) changing that job would make all that hardware useless. So, can the bitcoin community use this vulnerability to protect against a 51-percent attack? For example by changing the hash algorithm from sha256 to sha384 or sha512?</p>
<p>By this, I don't mean something like randomX. As far as I know randomX changes the mining algorithm frequently. But what I mean is to have a second algorithm for the day that a 51%-attack is taking place.</p>

<mining-theory><majority-attack>
Is it practical to prevent a 51%-attack by having a second mining algorithm?
Amir reza Riahi
# Is it practical to prevent a 51%-attack by having a second mining algorithm?

(Asked by: username_0 on 2022-06-25)

While miners use special hardware designed to perform only one job (e.g. calculating sha256) changing that job would make all that hardware useless. So, can the bitcoin community use this vulnerability to protect against a 51-percent attack? For example by changing the hash algorithm from sha256 to sha384 or sha512?

By this, I don't mean something like randomX. As far as I know randomX changes the mining algorithm frequently. But what I mean is to have a second algorithm for the day that a 51%-attack is taking place.

**Tags:** mining-theory, majority-attack


---

## 1 answers

### Answer by username_1 on 2022-06-25. Score: 3 | Accepted answer

A 51% attack is a breakdown of the security assumptions underlying proof-of-work, namely that it incentivizes actors strongly enough to behave cooperatively.

If an attack happens, it means those assumptions were wrong, and PoW should be discarded entirely. Switching to another hash function doesn't change anything. If the economic reality allows an actor to gain a hashrate majority with one function, there is no reason to assume it couldn't do the same with another hash function.

Of course, the community - at the social level - obviously **has** the possibility to jointly decide to make *any* changes to the consensus rules. Whether that is switching to another hash function, or a more narrow change such as deciding that a particular chain by a particular party is invalid. And the existence of that ability is something a would-be 51% attacker should take into account when weighing their odds. I feel this is mostly a mutually assured destruction like scenario; the impact of such a dramatic measure is likely very devastating even if it is successful.

> **Comments:**
> **username_0**: Thanks, but why you think if any attack happens to PoW it should be discarded entirely? imagine after a long period of time (e.g. 10 years) some party be able to attack the network and break it down, why not change the rules to survive another 10 years? I mean we can look more flexible. PoW is great but we may need some protections against its weaknesses.  
> **username_1**: The fact that the attack is possible at all implies PoW doesn't work. Its purpose it removing the need for coordination. If it needs coordination to add "protections" on top of it, then what is the point? There is no reason to assume it would take as long a second time as a first time to break down again.  

---

