<blockquote>
  <p>I understand that as the bitcoin difficulty adjustment becomes harder the hash output will require more 0s in the beginning of the hash.</p>
</blockquote>

<p>This is slightly incorrect: a higher difficulty <em>will</em> require a valid block hash to have more leading zeros, but validity is <em>not</em> determined by counting the number of zeros. Rather, it is determined by comparing the value of the hash to the target (as defined by the network difficulty). </p>

<p>In other words: a difficulty adjustment may lower the target, but a valid hash post-adjustment could still have the same number of leading zeros as a valid hash pre-adjustment, despite the target being lower.  </p>

<hr>

<p>To dig in a little deeper, lets consider what the lowest target could be.<a href="https://bitcoin.stackexchange.com/questions/23099/what-does-the-mining-difficulty-number-really-mean/23108#23108">This question contains some relevant info</a>, as <a href="https://bitcoin.stackexchange.com/questions/5556/relationship-between-hash-rate-and-difficulty">does this one,</a> and <a href="https://bitcoin.stackexchange.com/questions/8806/what-is-difficulty-and-how-it-relates-to-target/8811#8811">this one</a>.</p>

<p>Quoting from those answers:</p>

<pre><code>difficulty (D) = hashrate / (2^256 / max_target / intended_time_per_block)
               = hashrate / (2^256 / (2^208*65535) / 600)
               = hashrate / (2^48 / 65535 / 600)
               = hashrate / 7158388.055
</code></pre>

<p>(where hashrate is expressed in hashes/s)</p>

<p>The target (T) is defined by:</p>

<pre><code>D = Tmax/T
</code></pre>

<p>where Tmax is: 2^224</p>

<p>Rearranging and combining these formulae, we find:</p>

<pre><code>T = Tmax / D
T = Tmax / (hashrate/7158388.055)
</code></pre>

<p>So we can see that the lowest possible target would be the result of an infinite hashrate, which of course is not possible. But nonetheless, as hashrate approaches infinity, the target would asymptotically approach zero (but being an asymptote, it would never reach it).</p>

CC BY-SA 4.0
2019-05-28T06:02:10.303Z
One question. Difficulty cannot increase more than a factor of 4 at a time. when target hash reaches 0x1 (leading 0s omitted) it will remain there as a jump from 0x1 to 0x0 will be an infinite jump.
Ugam Kamat
CC BY-SA 4.0
2019-07-01T19:27:53.220Z
@UgamKamat I think you have confused the rules about the max difficulty change with the change in target.
chytrik
CC BY-SA 4.0
2019-07-02T01:46:13.643Z
Just so I understand this correctly, let us say that the current difficulty is 2.695953529101131e+67 so, your current target header hash is 0x01. Now to move from 0x01 to 0x00, wouldn't that be impossible as difficulty only adjusted by 4 at a time?
Ugam Kamat
CC BY-SA 4.0
2019-07-02T03:48:27.380Z
The difficulty could continue to increase 4x per retargeting period, but the target cannot reach zero. So I suppose the target would eventually just stall out in the extreme end of the limit
chytrik
CC BY-SA 4.0
2019-07-02T07:00:16.647Z
I think that is exactly what I was pointing out. It would stop at 0x01 as non-integer values won't be allowed. Since you mentioned asymptotically approach zero, I was confused
Ugam Kamat
CC BY-SA 4.0
2018-12-29T00:31:40.637Z
2018-12-29T03:37:06.523Z
2018-12-29T03:37:06.523Z
chytrik
<p>The retargeting every 2016 blocks is computed as follows:</p>

<ul>
<li><code>previous_target * (T2-T1) / (20160 minutes)</code></li>
</ul>

<p>Where:</p>

<ul>
<li>T2: timestamp of previous block</li>
<li>T1: timestamp of block at <code>current height - 2016</code></li>
<li>Target adjustment bounded to factor 4</li>
</ul>

<p>Ignoring the target adjustment limit: For the resulting target to be zero, <code>T2-T1</code> would need to equal zero. That would require an infinite amount of hash-rate. Therefore we can approach your scenario, but never reach it.</p>

CC BY-SA 4.0
2019-01-28T05:22:35.153Z
Couldn't the division round down to 0?
Owen Delahoy
CC BY-SA 4.0
2019-01-28T06:44:38.403Z
For high difficulties, as we currently have, no. The block intervals are too high. For low difficulties, there is a min difficulty of 1, which bounds the max target value.
James C.
CC BY-SA 4.0
2018-12-29T00:20:29.713Z
2018-12-29T00:20:29.713Z
James C.
<p>I had a basic question about Bitcoin mining. I understand that as the bitcoin difficulty adjustment becomes harder the hash output will require more 0s in the beginning of the hash. Is it theoretically possible that the Bitcoin difficulty adjustment would be so large that the hash output would just be all 0s? I know this is theoretical bit I'm just curious.</p>

<mining-theory><difficulty><difficulty-retargetting>
Mining: what is the lowest possible target? Could it be a block hash of all zeros?
Mike 
# Mining: what is the lowest possible target? Could it be a block hash of all zeros?

(Asked by: username_0 on 2018-12-28)

I had a basic question about Bitcoin mining. I understand that as the bitcoin difficulty adjustment becomes harder the hash output will require more 0s in the beginning of the hash. Is it theoretically possible that the Bitcoin difficulty adjustment would be so large that the hash output would just be all 0s? I know this is theoretical bit I'm just curious.

**Tags:** mining-theory, difficulty, difficulty-retargetting


---

## 2 answers

### Answer by username_1 on 2018-12-29. Score: 2

> I understand that as the bitcoin difficulty adjustment becomes harder the hash output will require more 0s in the beginning of the hash.

This is slightly incorrect: a higher difficulty *will* require a valid block hash to have more leading zeros, but validity is *not* determined by counting the number of zeros. Rather, it is determined by comparing the value of the hash to the target (as defined by the network difficulty).

In other words: a difficulty adjustment may lower the target, but a valid hash post-adjustment could still have the same number of leading zeros as a valid hash pre-adjustment, despite the target being lower.

---

To dig in a little deeper, lets consider what the lowest target could be.[This question contains some relevant info](https://bitcoin.stackexchange.com/questions/23099/what-does-the-mining-difficulty-number-really-mean/23108#23108), as [does this one,](https://bitcoin.stackexchange.com/questions/5556/relationship-between-hash-rate-and-difficulty) and [this one](https://bitcoin.stackexchange.com/questions/8806/what-is-difficulty-and-how-it-relates-to-target/8811#8811).

Quoting from those answers:

```
difficulty (D) = hashrate / (2^256 / max_target / intended_time_per_block)
               = hashrate / (2^256 / (2^208*65535) / 600)
               = hashrate / (2^48 / 65535 / 600)
               = hashrate / 7158388.055

```

(where hashrate is expressed in hashes/s)

The target (T) is defined by:

```
D = Tmax/T

```

where Tmax is: 2^224

Rearranging and combining these formulae, we find:

```
T = Tmax / D
T = Tmax / (hashrate/7158388.055)

```

So we can see that the lowest possible target would be the result of an infinite hashrate, which of course is not possible. But nonetheless, as hashrate approaches infinity, the target would asymptotically approach zero (but being an asymptote, it would never reach it).

> **Comments:**
> **username_2**: One question. Difficulty cannot increase more than a factor of 4 at a time. when target hash reaches 0x1 (leading 0s omitted) it will remain there as a jump from 0x1 to 0x0 will be an infinite jump.  
> **username_1**: @username_2 I think you have confused the rules about the max difficulty change with the change in target.  
> **username_2**: Just so I understand this correctly, let us say that the current difficulty is 2.695953529101131e+67 so, your current target header hash is 0x01. Now to move from 0x01 to 0x00, wouldn't that be impossible as difficulty only adjusted by 4 at a time?  
> **username_1**: The difficulty could continue to increase 4x per retargeting period, but the target cannot reach zero. So I suppose the target would eventually just stall out in the extreme end of the limit  
> **username_2**: I think that is exactly what I was pointing out. It would stop at 0x01 as non-integer values won't be allowed. Since you mentioned asymptotically approach zero, I was confused  

---

### Answer by username_3 on 2018-12-29. Score: 2

The retargeting every 2016 blocks is computed as follows:

* `previous_target * (T2-T1) / (20160 minutes)`

Where:

* T2: timestamp of previous block
* T1: timestamp of block at `current height - 2016`
* Target adjustment bounded to factor 4

Ignoring the target adjustment limit: For the resulting target to be zero, `T2-T1` would need to equal zero. That would require an infinite amount of hash-rate. Therefore we can approach your scenario, but never reach it.

> **Comments:**
> **username_4**: Couldn't the division round down to 0?  
> **username_3**: For high difficulties, as we currently have, no. The block intervals are too high. For low difficulties, there is a min difficulty of 1, which bounds the max target value.  

---

