Author

Topic: Genesis Block generation failed... (Read 270 times)

full member
Activity: 1134
Merit: 100
SOL.BIOKRIPT.COM
February 22, 2018, 05:04:24 AM
#3
If I did not know this problem because I have not been working on a blog at all.
newbie
Activity: 2
Merit: 0
February 22, 2018, 04:55:26 AM
#2
Hi, I've met this problem too.
Did you solve it? If yes, can you show me the steps to resolve this?
Thanks a lot.
jr. member
Activity: 413
Merit: 5
February 20, 2018, 08:21:48 AM
#1
What I did so far.

1. download newest source.
2. change simple parameters only. (like block generation time, etc)
and change   chainparams.cpp 's   genesisoutputScript = CScript() << ParseHex("04.....)
's value by  download and run  [ cat genesiscoinbase.hex ]

3. download Github's GenesisH0
4. Run GenesisH0 with
python genesis.py -a scrypt -z "Now is 2018-02-20"

5. It says merkle hash : be766....
I input this to chainparams.cpp's Main & Testnet's    assert(genesis.hashMerkleRoot == unit256s("0xbe766............"));

and it says pubkey : 04678a.....  
where this pubkey should be written at source?

and it says time : 1519....
I input this to chainparams.cpp's Main's      genesis = CreateGenesisBlock(1519.....   this's first parameter)

and it says nonce : 170938
I input this to     genesis = CreateGenesisBlock(1519.....  , 179038,    this's 2nd parameter)

and genesis hash : 215c...........
I input this to     assert(consensus.hashGenesisBlock == unit256s("0x215c............"));


6. repeat 4.

7. repeat 5.  to chainparams.cpp's Testnet part.

8. add line  printf  at

consensus.hashGenesisBlock = genesis.GetHash();
printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
assert(consensus.hashGenesisBlock == uint256("0x215c......


9. At terminal, 'make', 'make clean', 'sudo make install'

10. run ./bitcoind


And result is
genesis.GetHash = 7fa7c349.......
bitcoind : chainparams.cpp : 124 : CMainParams::CMainParams(): Assertion 'consensus.hashGenesisBlock == uint256S("0x215c...)'  failed.
Aborted (core dumped)


What did I wrong? and how to fix?

Thanks a lot...



Jump to: