<p>It's enforced by the fact that every miner and every Bitcoin user is running software which implements the adjustment algorithm you described.  So everyone is able to compute, and agree, what the current difficulty is supposed to be.  This is the notion of "consensus" which Bitcoin relies on.</p>

<p>If some miner created a block with a difficulty lower than the "correct" current value, the rest of the network would reject it.  The coins created by that block would not be accepted as payment by anybody else, making them effectively worthless, and the transactions contained in that block would not be considered as confirmed by anyone else (though they could still be added later to another valid block).  Other miners would not use that block as the "previous" for their own blocks, and so it would not be incorporated into the block chain.</p>

CC BY-SA 3.0
2017-09-19T13:38:06.073Z
2017-09-19T13:38:06.073Z
Nate Eldredge
<p>Every single node performs the difficulty adjustment calculation. Because the calculation is based upon data that is already in the blockchain, the difficulty calculation is the same for everyone; there is no element of randomness. It is deterministic so every single node will arrive at the same conclusion as to what the difficulty is for the next block.</p>

CC BY-SA 3.0
2017-09-19T13:37:41.643Z
2017-09-19T13:37:41.643Z
Ava Chow
<p>Here <a href="https://bitcoin.stackexchange.com/a/1291/60069">we read</a>:</p>
<blockquote>
<p>In the Bitcoin network, only blocks with certain hashes get accepted and included in the official list. The criteria for which blocks &quot;count&quot; is that their hash has to be below a certain number called the target. The network adjusts this number up and down according to how frequently blocks are passing the test--this is how it's able to keep the rate of block production at an average of 10 minutes per block.</p>
</blockquote>
<p>This calculation is <a href="https://bitcoin.stackexchange.com/a/5840/60069">expanded on here</a>:</p>
<blockquote>
<p>The Bitcoin difficulty started at 1 (and can never go below that). Then for every 2016 blocks that are found, the timestamps of the blocks are compared to find out how much time it took to find 2016 blocks, call it T. We want 2016 blocks to take 2 weeks, so if T is different, we multiply the difficulty by (2 weeks / T) - this way, if the hashrate continues the way it was, it will now take 2 weeks to find 2016 blocks.</p>
<p>For example, if it took only 10 days it means difficulty is too low and thus will be increased by 40%</p>
</blockquote>
<p>But who does this? Is it a collective property of the cluster? Is it the server? What gives the server the authority to determine this?</p>
<p>My question is: <strong>What is the mechanism by which the 'system' adjusts the difficulty of finding blocks so one is found on average every 10 minutes?</strong></p>
<p>EDIT:
I don't believe the question (&quot;How is the difficulty of bitcoin mining propagated?&quot;) is a duplicate - because it doesn't explain the implementation issue - which is the essence of my question.</p>

<blockchain><block><mining-theory><server>
What is the mechanism by which the 'system' adjusts the difficulty of finding blocks so one is found on average every 10 minutes?
hawkeye
# What is the mechanism by which the 'system' adjusts the difficulty of finding blocks so one is found on average every 10 minutes?

(Asked by: username_0 on 2017-09-19)

Here [we read](https://bitcoin.stackexchange.com/a/1291/60069):

> In the Bitcoin network, only blocks with certain hashes get accepted and included in the official list. The criteria for which blocks "count" is that their hash has to be below a certain number called the target. The network adjusts this number up and down according to how frequently blocks are passing the test--this is how it's able to keep the rate of block production at an average of 10 minutes per block.

This calculation is [expanded on here](https://bitcoin.stackexchange.com/a/5840/60069):

> The Bitcoin difficulty started at 1 (and can never go below that). Then for every 2016 blocks that are found, the timestamps of the blocks are compared to find out how much time it took to find 2016 blocks, call it T. We want 2016 blocks to take 2 weeks, so if T is different, we multiply the difficulty by (2 weeks / T) - this way, if the hashrate continues the way it was, it will now take 2 weeks to find 2016 blocks.
>
> For example, if it took only 10 days it means difficulty is too low and thus will be increased by 40%

But who does this? Is it a collective property of the cluster? Is it the server? What gives the server the authority to determine this?

My question is: **What is the mechanism by which the 'system' adjusts the difficulty of finding blocks so one is found on average every 10 minutes?**

EDIT:
I don't believe the question ("How is the difficulty of bitcoin mining propagated?") is a duplicate - because it doesn't explain the implementation issue - which is the essence of my question.

**Tags:** blockchain, block, mining-theory, server


---

## 2 answers

### Answer by username_1 on 2017-09-19. Score: 2 | Accepted answer

It's enforced by the fact that every miner and every Bitcoin user is running software which implements the adjustment algorithm you described. So everyone is able to compute, and agree, what the current difficulty is supposed to be. This is the notion of "consensus" which Bitcoin relies on.

If some miner created a block with a difficulty lower than the "correct" current value, the rest of the network would reject it. The coins created by that block would not be accepted as payment by anybody else, making them effectively worthless, and the transactions contained in that block would not be considered as confirmed by anyone else (though they could still be added later to another valid block). Other miners would not use that block as the "previous" for their own blocks, and so it would not be incorporated into the block chain.


---

### Answer by username_2 on 2017-09-19. Score: 1

Every single node performs the difficulty adjustment calculation. Because the calculation is based upon data that is already in the blockchain, the difficulty calculation is the same for everyone; there is no element of randomness. It is deterministic so every single node will arrive at the same conclusion as to what the difficulty is for the next block.


---

