<blockquote>
  <p>I assume, since they operate on the same algorithm, they automatically change the goal for their algorithm from time to time without having to verify their assumptions with anyone.</p>
</blockquote>

<p>Yes that is correct, every node in the network must calculate this independently and come to the same result. All content used for validation is always independently constructed by every full node, you can manage complete synchronization of the Bitcoin network using only block binaries and no further information at all. </p>

<blockquote>
  <p>For example, for some time a certain miner has been trying to provide responses to challenges so that the hash(challenge+proof) has 40 leading zeros. </p>
</blockquote>

<p>"Number of leading zeros" is frequently used to describe Bitcoin mining but doesn't really reflect how proof of work operates, it merely shows a side effect how the blocks are encoded and displayed to users. SHA256 hashes are 256 bit integers, miners are attempting to find block hashes that are lower than a particular integer target. If the system were just based on the number of zeros in the hex encoded hash there wouldn't be enough granularity between two levels. </p>

<blockquote>
  <p>Even though the miners didn't have an official agreement - "From now on, we are all solving an easier task. Ok? - Ok! - Lets go!"</p>
</blockquote>

<p>That would be against the consensus rules, and any blocks arbitrarily targeting the wrong value are simple discarded. Nodes in the network strictly validate every single rule and throw out any blocks with don't follow them. Miners only exist to order valid transactions into blocks and provide relative trust to SPV clients where required, they don't set the rules. </p>

CC BY-SA 3.0
2015-07-31T23:36:00.287Z
2015-08-01T00:13:34.093Z
2015-08-01T00:13:34.093Z
Claris
<p>Basically for this question I need a confirmation that all of my listed assumptions are fairly accurate.</p>

<p>The bitcoin network measures how much time it took to create the last 2016 blocks in a blockchain. If it took significantly more than 2 weeks, the challenge difficulty is reduced. If it took significantly less than 2 weeks, the difficulty is increased. </p>

<p>Who performs these measurements? Every miner for themselves? I assume, since they operate on the same algorithm, they automatically change the goal for their algorithm from time to time without having to verify their assumptions with anyone.</p>

<p>For example, for some time a certain miner has been trying to provide responses to challenges so that the <code>hash(challenge+proof)</code> has 40 leading zeros. </p>

<p>After each new block is being inserted in the blockchain, a miner measures the time it took to produce last 2016 blocks. </p>

<p>If the measured time is higher than a certain treshold, difficulty should decrease. </p>

<p>From then on, the miner simply starts submitting proofs of work that result in 39 leading zeros. </p>

<p>The miner is counting on the fact that the other miners had the same conclusion and that they will accept his answer, his proof of work? </p>

<p>Even though the miners didn't have an official agreement - <em>"From now on, we are all solving an easier task. Ok? - Ok! - Lets go!"</em></p>

<proof-of-work>
Challenge difficulty adjustments
AndroC
# Challenge difficulty adjustments

(Asked by: username_0 on 2015-07-31)

Basically for this question I need a confirmation that all of my listed assumptions are fairly accurate.

The bitcoin network measures how much time it took to create the last 2016 blocks in a blockchain. If it took significantly more than 2 weeks, the challenge difficulty is reduced. If it took significantly less than 2 weeks, the difficulty is increased.

Who performs these measurements? Every miner for themselves? I assume, since they operate on the same algorithm, they automatically change the goal for their algorithm from time to time without having to verify their assumptions with anyone.

For example, for some time a certain miner has been trying to provide responses to challenges so that the `hash(challenge+proof)` has 40 leading zeros.

After each new block is being inserted in the blockchain, a miner measures the time it took to produce last 2016 blocks.

If the measured time is higher than a certain treshold, difficulty should decrease.

From then on, the miner simply starts submitting proofs of work that result in 39 leading zeros.

The miner is counting on the fact that the other miners had the same conclusion and that they will accept his answer, his proof of work?

Even though the miners didn't have an official agreement - *"From now on, we are all solving an easier task. Ok? - Ok! - Lets go!"*

**Tags:** proof-of-work


---

## 1 answers

### Answer by username_1 on 2015-07-31. Score: 4 | Accepted answer

> I assume, since they operate on the same algorithm, they automatically change the goal for their algorithm from time to time without having to verify their assumptions with anyone.

Yes that is correct, every node in the network must calculate this independently and come to the same result. All content used for validation is always independently constructed by every full node, you can manage complete synchronization of the Bitcoin network using only block binaries and no further information at all.

> For example, for some time a certain miner has been trying to provide responses to challenges so that the hash(challenge+proof) has 40 leading zeros.

"Number of leading zeros" is frequently used to describe Bitcoin mining but doesn't really reflect how proof of work operates, it merely shows a side effect how the blocks are encoded and displayed to users. SHA256 hashes are 256 bit integers, miners are attempting to find block hashes that are lower than a particular integer target. If the system were just based on the number of zeros in the hex encoded hash there wouldn't be enough granularity between two levels.

> Even though the miners didn't have an official agreement - "From now on, we are all solving an easier task. Ok? - Ok! - Lets go!"

That would be against the consensus rules, and any blocks arbitrarily targeting the wrong value are simple discarded. Nodes in the network strictly validate every single rule and throw out any blocks with don't follow them. Miners only exist to order valid transactions into blocks and provide relative trust to SPV clients where required, they don't set the rules.


---

