3

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.

1
  • 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
    Commented May 12, 2016 at 16:05

3 Answers 3

1

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?

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.

3
  • 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. Commented May 12, 2016 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
    Commented May 12, 2016 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
    Commented May 6, 2017 at 7:58
1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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