<p>Nothing (as long as nobody else changes that code as well). I could easily mine hundreds of blocks a second using modified code.</p>

<p>However, as none of those blocks would be accepted by the rest of the network, it's pointless to 'cheat' the system. Which is how Bitcoin basically works: because every node on the network has to store the complete block chain, it can verify every single transaction and block there has ever been, and changes to the mining code aren't dangerous.</p>

CC BY-SA 3.0
2013-04-18T01:44:50.827Z
I'd rephrase this from "nothing" to "Acceptance from network peers."
Highly Irregular
CC BY-SA 3.0
2013-04-18T08:44:38.127Z
@HighlyIrregular Rephrased.
Tom van der Woerdt
CC BY-SA 3.0
2013-04-17T21:11:29.103Z
2013-04-18T08:44:24.830Z
2013-04-18T08:44:24.830Z
Tom van der Woerdt
<p>Tom is exactly right. The network is designed to only accept new blocks generated from the longest blockchain and with the correct solution to the proof of work problem. To lower the difficulty without the consent of the entire network would result in a rejected fork. </p>

<p>As the network is a distributive clock, it is possible for two miners to have two valid solutions at the same time, which is resolved by the solution to the next block. Whichever blockchain gets a new block first wins. </p>

CC BY-SA 3.0
2013-04-18T02:42:03.247Z
2013-04-18T02:42:03.247Z
Charles Hoskinson
<p>What prevents a bitcoin miner from modifying the code to make mining easier instead of more difficult ?</p>

CC BY-SA 3.0
2013-04-17T20:52:32.203Z
https://en.bitcoin.it/wiki/Weaknesses#Generate_.22valid.22_blocks_with_a_lower_difficulty_than_normal
Nick ODell
CC BY-SA 3.0
2013-04-17T21:19:52.413Z
possible duplicate of [What is a hardfork?](http://bitcoin.stackexchange.com/questions/9173/what-is-a-hardfork)
Stephen Gornick
CC BY-SA 3.0
2013-04-18T07:28:55.047Z
@StephenGornick yes, but only if you know the answer to this question.  I'd say leave it open.
eMansipater
<mining-theory>
Code modification could lower mining-difficulty requirements, why isn't this a vulnerability?
Guest N
# Code modification could lower mining-difficulty requirements, why isn't this a vulnerability?

(Asked by: username_0 on 2013-04-17)

What prevents a bitcoin miner from modifying the code to make mining easier instead of more difficult ?

**Tags:** mining-theory

> **Comments:**
> **username_1**: https://en.bitcoin.it/wiki/Weaknesses#Generate_.22valid.22_blocks_with_a_lower_difficulty_than_normal  
> **username_2**: possible duplicate of [What is a hardfork?](http://bitcoin.stackexchange.com/questions/9173/what-is-a-hardfork)  
> **username_3**: @StephenGornick yes, but only if you know the answer to this question.  I'd say leave it open.  

---

## 2 answers

### Answer by username_4 on 2013-04-17. Score: 6

Nothing (as long as nobody else changes that code as well). I could easily mine hundreds of blocks a second using modified code.

However, as none of those blocks would be accepted by the rest of the network, it's pointless to 'cheat' the system. Which is how Bitcoin basically works: because every node on the network has to store the complete block chain, it can verify every single transaction and block there has ever been, and changes to the mining code aren't dangerous.

> **Comments:**
> **username_5**: I'd rephrase this from "nothing" to "Acceptance from network peers."  
> **username_4**: @HighlyIrregular Rephrased.  

---

### Answer by username_6 on 2013-04-18. Score: 1

Tom is exactly right. The network is designed to only accept new blocks generated from the longest blockchain and with the correct solution to the proof of work problem. To lower the difficulty without the consent of the entire network would result in a rejected fork.

As the network is a distributive clock, it is possible for two miners to have two valid solutions at the same time, which is resolved by the solution to the next block. Whichever blockchain gets a new block first wins.


---

