<p><a href="http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin/" rel="nofollow">How to make an altcoin</a> on Bear's Den</p>

CC BY-SA 3.0
2016-03-06T10:24:40.170Z
2016-03-06T10:24:40.170Z
derrend
<p>You have to add smth like this
genesis.nNonce   = 353314;
hashGenesisBlock = genesis.GetHash();</p>

<p>LogPrintf("Display genesis hash so we can input it below %s\n", hashGenesisBlock.ToString().c_str());</p>

<p>assert(hashGenesisBlock == uint256("0xe133d1d3f584f1c3f561e7d0606fa87dabb869325a979c2a82e2f3943c0e3370"));
vFixedSeeds.clear();</p>

<p>then after ./coind  in debug.log you can get genesis hash</p>

CC BY-SA 3.0
2018-03-06T00:28:08.107Z
2018-03-06T00:28:08.107Z
nikky
<p>Following <a href="https://bitcointalk.org/index.php?topic=225690.0" rel="nofollow">this</a> guide, I'm trying to learn how to mine a genesis block, not to launch another altcoin or anything, blockchain databases are going to be important and I want to be ahead of the curve.</p>

<p>I'm using <a href="https://github.com/lhartikk/GenesisH0" rel="nofollow">this</a> script and working with the litecoin source. I have only changed the following:</p>

<pre><code>find LoadBlockIndex() function, inside, change:
    - paraphrase (pszTimestamp) to any recent news phase.
    - get the latest unix time (do a google), and put in block.nTime.
    - set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.
</code></pre>

<p>Those variables are now found in <code>chainparams.cpp</code> and I didn't change the testnet time/nonce.</p>

<p>After compiling when I try to run <code>litecoind</code> I get the following error:</p>

<pre><code>litecoind: chainparams.cpp:220: CTestNetParams::CTestNetParams(): Assertion `hashGenesisBlock == uint256("0xf5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f")' failed.
Aborted
</code></pre>

<p>If anyone can help or point me in the direction of some modern documentation I'd me most grateful :)</p>

CC BY-SA 3.0
2016-03-05T14:58:43.323Z
If you change the genesis block you have to change the hash check assertion, because the hash will have changed.
morsecoder
CC BY-SA 3.0
2016-03-05T14:58:47.993Z
Related: http://bitcoin.stackexchange.com/questions/34107/how-do-i-create-a-new-genesis-block-for-an-altcoin. This question seems to have better answers, so maybe the linked question should be marked as a duplicate of this.
morsecoder
CC BY-SA 3.0
2016-03-05T20:30:19.677Z
Thanks @StephenM347 but how do I calculate what the 'hash check assertion' should be?
derrend
CC BY-SA 3.0
2016-03-05T20:36:45.133Z
Also there are no answers in the link you provided.
derrend
CC BY-SA 3.0
2018-03-02T14:06:09.607Z
After this, you maybe suffer ReadBlockFromDisk: Errors in block header at CBlockDiskPos(, have  you?
creator
<litecoin><genesis-block><mining-software>
How to mine a genesis block?
derrend
# How to mine a genesis block?

(Asked by: username_0 on 2016-03-05)

Following [this](https://bitcointalk.org/index.php?topic=225690.0) guide, I'm trying to learn how to mine a genesis block, not to launch another altcoin or anything, blockchain databases are going to be important and I want to be ahead of the curve.

I'm using [this](https://github.com/lhartikk/GenesisH0) script and working with the litecoin source. I have only changed the following:

```
find LoadBlockIndex() function, inside, change:
    - paraphrase (pszTimestamp) to any recent news phase.
    - get the latest unix time (do a google), and put in block.nTime.
    - set any nNonce (doesn't really matter)
you can change the time/nonce for testnet too, if you want to use it.

```

Those variables are now found in `chainparams.cpp` and I didn't change the testnet time/nonce.

After compiling when I try to run `litecoind` I get the following error:

```
litecoind: chainparams.cpp:220: CTestNetParams::CTestNetParams(): Assertion `hashGenesisBlock == uint256("0xf5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f")' failed.
Aborted

```

If anyone can help or point me in the direction of some modern documentation I'd me most grateful :)

**Tags:** litecoin, genesis-block, mining-software

> **Comments:**
> **username_1**: If you change the genesis block you have to change the hash check assertion, because the hash will have changed.  
> **username_1**: Related: http://bitcoin.stackexchange.com/questions/34107/how-do-i-create-a-new-genesis-block-for-an-altcoin. This question seems to have better answers, so maybe the linked question should be marked as a duplicate of this.  
> **username_0**: Thanks @StephenM347 but how do I calculate what the 'hash check assertion' should be?  
> **username_0**: Also there are no answers in the link you provided.  
> **username_2**: After this, you maybe suffer ReadBlockFromDisk: Errors in block header at CBlockDiskPos(, have  you?  

---

## 2 answers

### Answer by username_0 on 2016-03-06. Score: 2 | Accepted answer

[How to make an altcoin](http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin/) on Bear's Den


---

### Answer by username_3 on 2018-03-06. Score: 0

You have to add smth like this
genesis.nNonce = 353314;
hashGenesisBlock = genesis.GetHash();

LogPrintf("Display genesis hash so we can input it below %s\n", hashGenesisBlock.ToString().c\_str());

assert(hashGenesisBlock == uint256("0xe133d1d3f584f1c3f561e7d0606fa87dabb869325a979c2a82e2f3943c0e3370"));
vFixedSeeds.clear();

then after ./coind in debug.log you can get genesis hash


---

