<p>Detailed explanation of the nBits encoding <a href="https://bitcoin.org/en/developer-reference#target-nbits" rel="nofollow noreferrer">https://bitcoin.org/en/developer-reference#target-nbits</a></p>

<p>In a very real sense, exact choice of the pubkey does not matter
<a href="https://bitcoin.stackexchange.com/questions/9746/how-do-i-compute-merkle-root-for-genesis-block">How do I compute merkle root for genesis block?</a></p>

<p>Genesis block coinbase cannot be spent
<a href="https://bitcoin.stackexchange.com/questions/10009/why-can-t-the-genesis-block-coinbase-be-spent">Why can’t the genesis block coinbase be spent?</a></p>

CC BY-SA 3.0
2017-05-04T18:08:24.430Z
2017-05-04T18:08:24.430Z
Tearo Dactyl
<p>You can see the actual numbers that are <a href="https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L112" rel="nofollow">hard coded in the bitcoin core source code</a></p>

<pre><code>CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN)
</code></pre>

<p>where the function signature is</p>

<pre><code>static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount&amp; genesisReward)
</code></pre>

CC BY-SA 3.0
2016-07-29T15:27:06.677Z
2016-07-29T15:27:06.677Z
Chris Stewart
<p>The public key doesn't matter, no coins are created in the genesis block. </p>

<p>nBits decides the blocks difficulty, affecting how long it will take to mine. You also have to modify your daemons code to allow this difficulty. </p>

CC BY-SA 3.0
2016-05-12T17:16:08.507Z
Could you expand more on nBits, maybe give a little bit of insight as to how to select it, also explain what you mean when you say modify my daemons code.
Jordan LaPrise
CC BY-SA 3.0
2016-05-12T20:20:29.550Z
@karimkorun: It's still useful to have the corresponding private key in case you ever want to sign a message to prove that you created it. ;)
Murch
CC BY-SA 3.0
2017-05-06T07:58:59.133Z
The coins are in the Genesis Block coinbase, all 50 of them. But they cannot be spent, as documented elsewhere.
Walter K
CC BY-SA 3.0
2016-05-12T16:59:47.677Z
2016-05-12T16:59:47.677Z
karimkorun
<p>I am hoping to create a new cryptocurrency from a Bitcoin fork, mostly for learning, and a little bit of fun. I roughly followed <a href="https://bitcoin.stackexchange.com/a/19288/35545">this answer</a> to get as far as I am, but the genesis generator requires a <code>pubkey</code> and an <code>nBits</code> param, and I have no idea how to get these.</p>

<p>Any advice or resources pertaining to those parameters or cryptocurrency creation in general would be great.</p>

CC BY-SA 3.0
2016-05-12T16:05:33.557Z
Did you try googling the terms? E.g. first hit for [nbits](https://bitcoin.org/en/glossary/nbits). `pubkey` is a public key corresponding to any private key under your control.
Murch
<difficulty><public-key><genesis-block><altcoin-development>
How do I find a pubkey and the nbits value to generate a genesis block?
Jordan LaPrise
# How do I find a pubkey and the nbits value to generate a genesis block?

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

I am hoping to create a new cryptocurrency from a Bitcoin fork, mostly for learning, and a little bit of fun. I roughly followed [this answer](https://bitcoin.stackexchange.com/a/19288/35545) to get as far as I am, but the genesis generator requires a `pubkey` and an `nBits` param, and I have no idea how to get these.

Any advice or resources pertaining to those parameters or cryptocurrency creation in general would be great.

**Tags:** difficulty, public-key, genesis-block, altcoin-development

> **Comments:**
> **username_1**: Did you try googling the terms? E.g. first hit for [nbits](https://bitcoin.org/en/glossary/nbits). `pubkey` is a public key corresponding to any private key under your control.  

---

## 3 answers

### Answer by username_2 on 2017-05-04. Score: 1 | Accepted answer

Detailed explanation of the nBits encoding <https://bitcoin.org/en/developer-reference#target-nbits>

In a very real sense, exact choice of the pubkey does not matter
[How do I compute merkle root for genesis block?](https://bitcoin.stackexchange.com/questions/9746/how-do-i-compute-merkle-root-for-genesis-block)

Genesis block coinbase cannot be spent
[Why can’t the genesis block coinbase be spent?](https://bitcoin.stackexchange.com/questions/10009/why-can-t-the-genesis-block-coinbase-be-spent)


---

### Answer by username_3 on 2016-07-29. Score: 1

You can see the actual numbers that are [hard coded in the bitcoin core source code](https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L112)

```
CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN)

```

where the function signature is

```
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)

```


---

### Answer by username_4 on 2016-05-12. Score: 1

The public key doesn't matter, no coins are created in the genesis block.

nBits decides the blocks difficulty, affecting how long it will take to mine. You also have to modify your daemons code to allow this difficulty.

> **Comments:**
> **username_0**: Could you expand more on nBits, maybe give a little bit of insight as to how to select it, also explain what you mean when you say modify my daemons code.  
> **username_1**: @username_4: It's still useful to have the corresponding private key in case you ever want to sign a message to prove that you created it. ;)  
> **username_5**: The coins are in the Genesis Block coinbase, all 50 of them. But they cannot be spent, as documented elsewhere.  

---

