user89355: I followed this medium link to create a coin just like bitcoin . https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-c39139506443
Based on this tutorial i update DEFAULT_MAX_TIP_AGE to int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 4000; but it does not work, i did not able to mine block but when i add -maxtipage=432000000 to my command line daemon then mining work i was able to mine genesis block . but then i thought it would be better if i can create my own geneisis block.
so i followed this link : How can I create a new Genesis Block?
I made changes to pszTimestamp, nTime and nNonce , hashGenesisBlock and hashMerkleRoot.
I was able to run the daemon without any assert issue . First i got this error

ERROR: ReadBlockFromDisk: Errors in block header at
  CBlockDiskPos(nFile=0, nPos=8) 2018-11-08T10:12:47Z *** Failed to read
  block

Then after running command line daemon with -reindex . the previous error vanishes but got a new error 

ERROR: AcceptBlock: high-hash, proof of work failed (code 16)

How can i resolve this issue 
EDIT:
Based on the suggestion given by @JBaczuk . I used genesisgen to generate block information
https://github.com/liveblockchain/genesisgen
CMD Syntax:
./genesis [options] <pubkey> "<timestamp>" <nBits> <startNonce> <unixtime>

My CMD:
./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches" 486604799 2083236893 1541690605

OUTPUT:
nBits: 0x1d00ffff
startNonce: 2083236893
unixtime: 1541690605

Coinbase: 04ffff001d01044c504e4454562030382f4e6f762f3230313820496e6469612057616e747320546f204c6f63616c6c79204d616e75666163747572652c204578706f72742042756c6c657420547261696e20436f6163686573

PubkeyScript: 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

Merkle Hash: 94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d
Byteswapped: 5d899d6099e42acc9a8d97197e834ed7d98adebbced63aadcc399b76c7efb494
Generating block...
124397 Hashes/s, Nonce 20632283897
Block found!
Hash: 000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672
Nonce: 2063257030
Unix time: 1541690608

Changes in code:
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
    const char* pszTimestamp = "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches";
    const CScript genesisOutputScript = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
    return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}

......
......
......
genesis = CreateGenesisBlock(1541690608, 2063257030, 0x1d00ffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672"));
assert(genesis.hashMerkleRoot == uint256S("0x94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d"));

I got this assertion error:
chainparams.cpp:125: CMainParams::CMainParams(): Assertion `genesis.hashMerkleRoot == uint256S("0x94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d")' failed.
Aborted (core dumped)


user60443: This is because you didn't mine the block, i.e. you didn't search for a nonce that results in a block hash less than powLimit (the initial difficulty target) defined in src/chainparams.cpp consensus.powLimit("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), for mainnet. To do this:
Serialize the block header. Concatenate (in this order, little endian, hex format) the version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce. Then calculate the HASH256 or the SHA256(SHA256()). If it is not less than powLimit you must change the nonce and try again, keep doing this until you are successful, this is mining.
There are scripts out there to do this, for example: https://github.com/liveblockchain/genesisgen
Update (example from question above):
Example usage of genesisgen
./genesis [options] <pubkey> "<timestamp>" <nBits> <startNonce> <unixtime>

./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches" 486604799 2083236893 1541690605

    nBits: 0x1d00ffff
    startNonce: 2083236893
    unixtime: 1541690605

    Coinbase: 04ffff001d01044c504e4454562030382f4e6f762f3230313820496e6469612057616e747320546f204c6f63616c6c79204d616e75666163747572652c204578706f72742042756c6c657420547261696e20436f6163686573

    PubkeyScript: 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

    Merkle Hash: 94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d
    Byteswapped: 5d899d6099e42acc9a8d97197e834ed7d98adebbced63aadcc399b76c7efb494
    Generating block...
    124397 Hashes/s, Nonce 20632283897
    Block found!
    Hash: 000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672
    Nonce: 2063257030
    Unix time: 1541690608

You need to use the Byteswapped merkle root and the block hash in the assertions and the newly found nonce in the genesis block creation functions.

89355: <p>I followed this medium link to create a coin just like bitcoin . <a href="https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-c39139506443" rel="nofollow noreferrer">https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-c39139506443</a></p>

<p>Based on this tutorial i update <code>DEFAULT_MAX_TIP_AGE</code> to <code>int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE * 4000;</code> but it does not work, i did not able to mine block but when i add <code>-maxtipage=432000000</code> to my command line daemon then mining work i was able to mine genesis block . but then i thought it would be better if i can create my own geneisis block.</p>

<p>so i followed this link : <a href="https://bitcoin.stackexchange.com/questions/21303/how-can-i-create-a-new-genesis-block">How can I create a new Genesis Block?</a></p>

<p>I made changes to <code>pszTimestamp</code>, <code>nTime</code> and <code>nNonce</code> , <code>hashGenesisBlock</code> and <code>hashMerkleRoot</code>.</p>

<p>I was able to run the daemon without any <code>assert</code> issue . First i got this error</p>

<blockquote>
  <p>ERROR: ReadBlockFromDisk: Errors in block header at
  CBlockDiskPos(nFile=0, nPos=8) 2018-11-08T10:12:47Z *** Failed to read
  block</p>
</blockquote>

<p>Then after running command line daemon with <code>-reindex</code> . the previous error vanishes but got a new error </p>

<blockquote>
  <p>ERROR: AcceptBlock: high-hash, proof of work failed (code 16)</p>
</blockquote>

<p>How can i resolve this issue </p>

<p><strong>EDIT:</strong>
Based on the suggestion given by @JBaczuk . I used genesisgen to generate block information</p>

<p><a href="https://github.com/liveblockchain/genesisgen" rel="nofollow noreferrer">https://github.com/liveblockchain/genesisgen</a></p>

<p>CMD Syntax:</p>

<pre><code>./genesis [options] &lt;pubkey&gt; "&lt;timestamp&gt;" &lt;nBits&gt; &lt;startNonce&gt; &lt;unixtime&gt;
</code></pre>

<p>My CMD:</p>

<pre><code>./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches" 486604799 2083236893 1541690605
</code></pre>

<p>OUTPUT:</p>

<pre><code>nBits: 0x1d00ffff
startNonce: 2083236893
unixtime: 1541690605

Coinbase: 04ffff001d01044c504e4454562030382f4e6f762f3230313820496e6469612057616e747320546f204c6f63616c6c79204d616e75666163747572652c204578706f72742042756c6c657420547261696e20436f6163686573

PubkeyScript: 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

Merkle Hash: 94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d
Byteswapped: 5d899d6099e42acc9a8d97197e834ed7d98adebbced63aadcc399b76c7efb494
Generating block...
124397 Hashes/s, Nonce 20632283897
Block found!
Hash: 000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672
Nonce: 2063257030
Unix time: 1541690608
</code></pre>

<p>Changes in code:</p>

<pre><code>static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount&amp; genesisReward)
{
    const char* pszTimestamp = "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches";
    const CScript genesisOutputScript = CScript() &lt;&lt; ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") &lt;&lt; OP_CHECKSIG;
    return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}
</code></pre>

<p>......
......
......</p>

<pre><code>genesis = CreateGenesisBlock(1541690608, 2063257030, 0x1d00ffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672"));
assert(genesis.hashMerkleRoot == uint256S("0x94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d"));
</code></pre>

<p>I got this assertion error:</p>

<pre><code>chainparams.cpp:125: CMainParams::CMainParams(): Assertion `genesis.hashMerkleRoot == uint256S("0x94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d")' failed.
Aborted (core dumped)
</code></pre>
 60443: <p>This is because you didn't mine the block, i.e. you didn't search for a nonce that results in a block hash less than <code>powLimit</code> (the initial difficulty target) defined in <code>src/chainparams.cpp</code> <code>consensus.powLimit("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff")</code>, for mainnet. To do this:</p>

<p>Serialize the block header. Concatenate (in this order, little endian, hex format) the version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce. Then calculate the HASH256 or the SHA256(SHA256()). If it is not less than <code>powLimit</code> you must change the nonce and try again, keep doing this until you are successful, this is mining.</p>

<p>There are scripts out there to do this, for example: <a href="https://github.com/liveblockchain/genesisgen" rel="nofollow noreferrer">https://github.com/liveblockchain/genesisgen</a></p>

<p><strong>Update (example from question above):</strong></p>

<p>Example usage of <code>genesisgen</code></p>

<pre><code>./genesis [options] &lt;pubkey&gt; "&lt;timestamp&gt;" &lt;nBits&gt; &lt;startNonce&gt; &lt;unixtime&gt;

./genesis 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f "NDTV 08/Nov/2018 India Wants To Locally Manufacture, Export Bullet Train Coaches" 486604799 2083236893 1541690605

    nBits: 0x1d00ffff
    startNonce: 2083236893
    unixtime: 1541690605

    Coinbase: 04ffff001d01044c504e4454562030382f4e6f762f3230313820496e6469612057616e747320546f204c6f63616c6c79204d616e75666163747572652c204578706f72742042756c6c657420547261696e20436f6163686573

    PubkeyScript: 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

    Merkle Hash: 94b4efc7769b39ccad3ad6cebbde8ad9d74e837e19978d9acc2ae499609d895d
    Byteswapped: 5d899d6099e42acc9a8d97197e834ed7d98adebbced63aadcc399b76c7efb494
    Generating block...
    124397 Hashes/s, Nonce 20632283897
    Block found!
    Hash: 000000004c7d908bd3c911a21b849d3cdca124131d2fb8a1af009698742ad672
    Nonce: 2063257030
    Unix time: 1541690608
</code></pre>

<p>You need to use the Byteswapped merkle root and the block hash in the assertions and the newly found nonce in the genesis block creation functions.</p>
