<p>The difficulty is stored in the block in the <a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="noreferrer">Bits</a> field. When any server receives a block, one of the things it does is check if the value in this field is correct. If it's not a block where the difficulty changes, it must have the same difficulty as the previous block. If it's a block where the difficulty changes, then it must have the correct difficulty according to the well known Bitcoin <a href="https://en.bitcoin.it/wiki/Difficulty" rel="noreferrer">difficulty</a> adjusting algorithm.</p>

<p>There is no "central bitcoin server".</p>

<p>Forks are resolved as follows:</p>

<ol>
<li><p>Blocks that are invalid are ignored. Only block chains consisting entirely of valid blocks are considered.</p></li>
<li><p>The blockchain that would likely have taken the most effort to create (highest total difficulty) wins.</p></li>
</ol>

CC BY-SA 3.0
2014-03-12T10:52:13.463Z
2014-03-12T10:52:13.463Z
David Schwartz
<p>Let's say the current difficulty is set as finding a hash with 4 leading zeroes; once this is found, a block with this hash is propagated. Every client that receives this block checks that it has 4 leading zeroes and accepts this block as valid, adding it to their own chain. </p>

<p>My understanding is that the only information a miner sends out, when he solves his hash, is this block he has created (containing the solved hash and details of all the transactions that he used when creating the hash). This information, and only this information, then propagates to the rest of the network.</p>

<p>Now, how does the "central bitcoin server", or whatever it is, then propagates the change in difficulty every 2 weeks? Would it require everybody to update their client software to recognize that new blocks are only valid if they now have 5 leading zeroes, or is there some genius mechanism that I'm missing? On a side note, I don't really understand how forks are resolved; is this relevant to how this issue is dealt with?</p>

<difficulty><block-header>
How is the difficulty of bitcoin mining propagated?
Yuxuan
# How is the difficulty of bitcoin mining propagated?

(Asked by: username_0 on 2014-03-12)

Let's say the current difficulty is set as finding a hash with 4 leading zeroes; once this is found, a block with this hash is propagated. Every client that receives this block checks that it has 4 leading zeroes and accepts this block as valid, adding it to their own chain.

My understanding is that the only information a miner sends out, when he solves his hash, is this block he has created (containing the solved hash and details of all the transactions that he used when creating the hash). This information, and only this information, then propagates to the rest of the network.

Now, how does the "central bitcoin server", or whatever it is, then propagates the change in difficulty every 2 weeks? Would it require everybody to update their client software to recognize that new blocks are only valid if they now have 5 leading zeroes, or is there some genius mechanism that I'm missing? On a side note, I don't really understand how forks are resolved; is this relevant to how this issue is dealt with?

**Tags:** difficulty, block-header


---

## 1 answers

### Answer by username_1 on 2014-03-12. Score: 5

The difficulty is stored in the block in the [Bits](https://en.bitcoin.it/wiki/Block_hashing_algorithm) field. When any server receives a block, one of the things it does is check if the value in this field is correct. If it's not a block where the difficulty changes, it must have the same difficulty as the previous block. If it's a block where the difficulty changes, then it must have the correct difficulty according to the well known Bitcoin [difficulty](https://en.bitcoin.it/wiki/Difficulty) adjusting algorithm.

There is no "central bitcoin server".

Forks are resolved as follows:

1. Blocks that are invalid are ignored. Only block chains consisting entirely of valid blocks are considered.
2. The blockchain that would likely have taken the most effort to create (highest total difficulty) wins.


---

