<p>It is a number designed to protect new clients from accepting fake blockchains when they initially are syncing, if an attacker managed to segregate them from the network. As the name suggests, it's the minimum amount of total work a chain must have before the client considers it valid. It is updated to a higher number at every release, based on the total work in the blockchain at the time of that release (the hex format is more compact and consistent with other code than say a decimal number)</p>

CC BY-SA 3.0
2018-03-09T13:41:10.687Z
Ok, so the number is from an actual bitcoin network's block, that means the software is hard wired to the mainnet, no way to run one's own private network, is that right?
fluter
CC BY-SA 3.0
2018-03-09T18:06:11.753Z
No, its just like an amount of work that is needed, any chain that had that much work would be accepted. BUT it would be basically impossible to create a new chain with that much work, that's the point of PoW, so you're correct that you would need to modify that value if you want to run your own private network (you would be creating an altcoin)
meshcollider
CC BY-SA 3.0
2018-03-09T13:32:28.730Z
2018-03-09T13:32:28.730Z
meshcollider
<p>I was trying to run my own private bitcoin network, so I downloaded the source and compiled it, then I started two <code>bitcoind</code> instances in two docker contains, and I made sure they did not connect to outside network, used <code>-connect=0 -dns=0 -dnsseed=0</code>, and then <code>-addnode</code> to specify other node's ip and port. When I then tried to run a local miner, the RPC <code>getblocktemplate</code> always return <code>Bitcoin is downloading blocks...</code>. By looking at the source, it looks it won't pass this line:</p>

<pre><code>// in IsInitialBlockDownlaod
if (chainActive.Tip()-&gt;nChainWork &lt; nMinimumChainWork) {
     return true;
}
</code></pre>

<p>the definition is found in chainparams.cpp:</p>

<pre><code>// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000f91c579d57cad4bc5278cc");
</code></pre>

<p>What does this mean? What is <code>nMinimumChainWork</code> for? And what is the hardcoded hex number, by searching blockchain.info it is not a block hash.</p>

<blockchain><mining-theory><bitcoin-core-development><network>
what is nMinimumChainWork?
fluter
# what is nMinimumChainWork?

(Asked by: username_0 on 2018-03-09)

I was trying to run my own private bitcoin network, so I downloaded the source and compiled it, then I started two `bitcoind` instances in two docker contains, and I made sure they did not connect to outside network, used `-connect=0 -dns=0 -dnsseed=0`, and then `-addnode` to specify other node's ip and port. When I then tried to run a local miner, the RPC `getblocktemplate` always return `Bitcoin is downloading blocks...`. By looking at the source, it looks it won't pass this line:

```
// in IsInitialBlockDownlaod
if (chainActive.Tip()->nChainWork < nMinimumChainWork) {
     return true;
}

```

the definition is found in chainparams.cpp:

```
// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000f91c579d57cad4bc5278cc");

```

What does this mean? What is `nMinimumChainWork` for? And what is the hardcoded hex number, by searching blockchain.info it is not a block hash.

**Tags:** blockchain, mining-theory, bitcoin-core-development, network


---

## 1 answers

### Answer by username_1 on 2018-03-09. Score: 4 | Accepted answer

It is a number designed to protect new clients from accepting fake blockchains when they initially are syncing, if an attacker managed to segregate them from the network. As the name suggests, it's the minimum amount of total work a chain must have before the client considers it valid. It is updated to a higher number at every release, based on the total work in the blockchain at the time of that release (the hex format is more compact and consistent with other code than say a decimal number)

> **Comments:**
> **username_0**: Ok, so the number is from an actual bitcoin network's block, that means the software is hard wired to the mainnet, no way to run one's own private network, is that right?  
> **username_1**: No, its just like an amount of work that is needed, any chain that had that much work would be accepted. BUT it would be basically impossible to create a new chain with that much work, that's the point of PoW, so you're correct that you would need to modify that value if you want to run your own private network (you would be creating an altcoin)  

---

