<p>All blocks have a field for their 'difficulty'. This is a parameter that determines how many hashes have to be calculated (on average) before you find a block. Higher difficulty means the block will be harder to solve. </p>

<blockquote>
  <p>How can a block be considered more difficult to solve/hash than another one?</p>
</blockquote>

<p>Think of it like flipping coins, where the difficulty number is the number of Heads you have to flip in a row. So, With difficulty 8, you have to get 8 heads in a row, etc. Difficulty 9 is harder than a difficulty 8. </p>

<p>This difficulty number is used to increase/decrease the number of blocks solved on the network, according to very specific rules, in order to keep blocks solved at an average of 10 minutes. If the network is solving too many blocks, say a block every 9 minutes on average, then the network will increase the difficulty. Similarly, if the network is only solving blocks every 11 minutes at the current difficulty, then the difficulty is lowered. This re-adjustment process happens every two weeks in Bitcoin.</p>

<p>The tricky part is what can happen if a fork takes place at the same time as the difficulty adjustment. Let's say our blockchain looks like this:</p>

<pre><code>                X_8
              /
-&gt; X_8 -&gt; X_8
              \
                X_8
</code></pre>

<p>(Where <code>8</code> is the difficulty of each block). Since the top fork and the bottom fork have different time fields in their block header, they result in a different difficulty re-adjustment calculation (difficulty re-adjustment is based on number of blocks in a given time, trying to keep it at a block per 10 minutes). Now the next blocks on either side of the chain, which have the newly calculated difficulties, at not given the same weight. </p>

<pre><code>                X_8 -&gt; X_9
              /
-&gt; X_8 -&gt; X_8
              \
                X_8 -&gt; X_7
</code></pre>

<p>Since the difficulty re-adjustment in the top fork ended up with a higher difficulty, any block solved on that half of the chain (X_9) will override a block solved on the bottom side of the fork (X_7). However, if X_7 had been solved significantly before the X_9 block, then that would be the chain with the most work (8 + 7 on the bottom chain is better than just 8 on the top chain).</p>

<p>The network essentially looks for the chain of blocks with the highest sum of difficulties, i.e. the chain that took the most work to produce, and would be the hardest for an attacker to try to override. Nodes on the network choose this highest-difficulty-sum chain as their correct chain, and the great thing about this is that when everyone follows the simple rules, they arrive at consensus about the history of transactions. </p>

<blockquote>
  <p>Does it have to do with the number of transactions it contains?</p>
</blockquote>

<p>No.</p>

CC BY-SA 3.0
2015-09-08T14:22:32.403Z
2015-09-08T16:49:48.337Z
2015-09-08T16:49:48.337Z
morsecoder
<p>Block difficulty is determined only by the sum speed of miners working on that chain particular chain, kept track of by evaluating the the spacing of the timestamps of blocks in a 2 week period. It's worthwhile to think about the block chain as a tree that just happens to have a very strong main branch, where branches are weighed by how much work went into creating them rather than their length.  </p>

<p>                                                           </p>

<pre><code>           +---&gt; 9 +---&gt; 9 
9 +----&gt; 9 |  
           +---&gt; 1 +---&gt; 1 +---&gt; 1 +---&gt; 1 +---&gt; 1 
</code></pre>

<p>            <br>
Here we have two competing tips of the chain, one with a cumulative difficulty of 36 (9+9+9+9, and one with a cumulative difficulty of 25 (9+9+1+1+1+1+1). Although the top section of the fork has less blocks, it has a higher difficulty than the bottom fork and so is regarded as the current "best" side of the chain. </p>

CC BY-SA 3.0
2015-09-05T06:12:17.120Z
"*by the sum speed of miners working on that chain particular chain*" => do you mind explaining that better, for the mere mortal?
Peter Mel
CC BY-SA 3.0
2015-09-05T21:52:12.390Z
The time between blocks is made to target 10 minute intervals on average. If the miners go too fast, the difficulty of making blocks is raised in the next period. If they go too slow, the difficulty is lowered.
Claris
CC BY-SA 3.0
2015-09-05T06:07:22.977Z
2015-09-05T06:07:22.977Z
Claris
<p>In this answer: <a href="https://bitcoin.stackexchange.com/a/760/28219">https://bitcoin.stackexchange.com/a/760/28219</a></p>

<p>It is said:</p>

<blockquote>
  <p>Because of all this work, when a Bitcoin client signs on to the
  network it can trust the block chain that was most difficult to
  produce (since this is <strong>evidently</strong> the one that was being worked on by
  the most miners).</p>
</blockquote>

<p>There is nothing evident there :)</p>

<p>Can someone explain how can a block be more difficult to solve than another one? Does it have to do with the number of transactions it contains?</p>

<blockchain><block><proof-of-work>
How can a block be considered more difficult to solve/hash than another one?
Peter Mel
# How can a block be considered more difficult to solve/hash than another one?

(Asked by: username_0 on 2015-09-05)

In this answer: <https://bitcoin.stackexchange.com/a/760/28219>

It is said:

> Because of all this work, when a Bitcoin client signs on to the
> network it can trust the block chain that was most difficult to
> produce (since this is **evidently** the one that was being worked on by
> the most miners).

There is nothing evident there :)

Can someone explain how can a block be more difficult to solve than another one? Does it have to do with the number of transactions it contains?

**Tags:** blockchain, block, proof-of-work


---

## 2 answers

### Answer by username_1 on 2015-09-08. Score: 4

All blocks have a field for their 'difficulty'. This is a parameter that determines how many hashes have to be calculated (on average) before you find a block. Higher difficulty means the block will be harder to solve.

> How can a block be considered more difficult to solve/hash than another one?

Think of it like flipping coins, where the difficulty number is the number of Heads you have to flip in a row. So, With difficulty 8, you have to get 8 heads in a row, etc. Difficulty 9 is harder than a difficulty 8.

This difficulty number is used to increase/decrease the number of blocks solved on the network, according to very specific rules, in order to keep blocks solved at an average of 10 minutes. If the network is solving too many blocks, say a block every 9 minutes on average, then the network will increase the difficulty. Similarly, if the network is only solving blocks every 11 minutes at the current difficulty, then the difficulty is lowered. This re-adjustment process happens every two weeks in Bitcoin.

The tricky part is what can happen if a fork takes place at the same time as the difficulty adjustment. Let's say our blockchain looks like this:

```
                X_8
              /
-> X_8 -> X_8
              \
                X_8

```

(Where `8` is the difficulty of each block). Since the top fork and the bottom fork have different time fields in their block header, they result in a different difficulty re-adjustment calculation (difficulty re-adjustment is based on number of blocks in a given time, trying to keep it at a block per 10 minutes). Now the next blocks on either side of the chain, which have the newly calculated difficulties, at not given the same weight.

```
                X_8 -> X_9
              /
-> X_8 -> X_8
              \
                X_8 -> X_7

```

Since the difficulty re-adjustment in the top fork ended up with a higher difficulty, any block solved on that half of the chain (X\_9) will override a block solved on the bottom side of the fork (X\_7). However, if X\_7 had been solved significantly before the X\_9 block, then that would be the chain with the most work (8 + 7 on the bottom chain is better than just 8 on the top chain).

The network essentially looks for the chain of blocks with the highest sum of difficulties, i.e. the chain that took the most work to produce, and would be the hardest for an attacker to try to override. Nodes on the network choose this highest-difficulty-sum chain as their correct chain, and the great thing about this is that when everyone follows the simple rules, they arrive at consensus about the history of transactions.

> Does it have to do with the number of transactions it contains?

No.


---

### Answer by username_2 on 2015-09-05. Score: 3

Block difficulty is determined only by the sum speed of miners working on that chain particular chain, kept track of by evaluating the the spacing of the timestamps of blocks in a 2 week period. It's worthwhile to think about the block chain as a tree that just happens to have a very strong main branch, where branches are weighed by how much work went into creating them rather than their length.

```
           +---> 9 +---> 9 
9 +----> 9 |  
           +---> 1 +---> 1 +---> 1 +---> 1 +---> 1 

```

Here we have two competing tips of the chain, one with a cumulative difficulty of 36 (9+9+9+9, and one with a cumulative difficulty of 25 (9+9+1+1+1+1+1). Although the top section of the fork has less blocks, it has a higher difficulty than the bottom fork and so is regarded as the current "best" side of the chain.

> **Comments:**
> **username_0**: "*by the sum speed of miners working on that chain particular chain*" => do you mind explaining that better, for the mere mortal?  
> **username_2**: The time between blocks is made to target 10 minute intervals on average. If the miners go too fast, the difficulty of making blocks is raised in the next period. If they go too slow, the difficulty is lowered.  

---

