Post
Topic
Board Development & Technical Discussion
Re: back to creating new alt coin
by
mironkraft
on 24/12/2021, 21:57:06 UTC
Alright, so here's what you're going to do. Go on genesisgen on github, download genesis.c and build it. Once you have the executable, run name.exe <pubkey> <timestamp> <nBits>.

In <pubkey> you should add your public key in uncompressed format. In <timestamp> your message. In <nBits> the target. Leave it on 486604799 (1d00ffff) which is the lowest you can have with a difficulty of 1.

Once you mine the genesis block, the program will return you the coinbase script, the scriptPubKey, the merkle hash, the byteswapped merkle hash, the unix time, the nonce and finally the genesis block's hash.

1. Change the genesisOutputScript to your scriptPubKey from #L54.
2. Change genesis.hashMerkleRoot to the byteswapped merkle hash in #L114.
3. Change consensus.hashGenesisBlock to your block's hash in #L113.
4. Change the first two values from the CreateGenesisBlock function to the unix time and nonce respectively in #L111.
5. Build Bitcoin Core.

I've made a tutorial here: How to create your own altcoin (v0.20.1). It should be the same for the latest version of Bitcoin Core.

Hi! Thanks for your time in advace

Building genesis in linux right? excuse me for asking maybe stupid things, between language and that I am a bit rusted..

I might start all over with your tutorial, since i worked on bitcoin 2.1 and now is 22.00

Ill keep informed in this post hows going

Thanks again!