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.

1 Answer 1


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.

  • 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. Commented Jun 25, 2022 at 17:26
  • 4
    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. Commented Jun 25, 2022 at 19:20

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.