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 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.

  • Did you try googling the terms? E.g. first hit for nbits. pubkey is a public key corresponding to any private key under your control. – Murch May 12 '16 at 16:05

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?

Genesis block coinbase cannot be spent Why can’t the genesis block coinbase be spent?


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.

  • 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 May 12 '16 at 17:16
  • 1
    @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 May 12 '16 at 20:20
  • The coins are in the Genesis Block coinbase, all 50 of them. But they cannot be spent, as documented elsewhere. – Walter K May 6 '17 at 7:58

You can see the actual numbers that are hard coded in the bitcoin core source code

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)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.