Bitcoin Forum
June 27, 2024, 09:02:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Genesis Block generation failed...  (Read 254 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
February 20, 2018, 01:21:48 PM
 #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...



wanhoajun118
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 22, 2018, 09: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.
Ngemmeng
Full Member
***
Offline Offline

Activity: 1134
Merit: 100


SOL.BIOKRIPT.COM


View Profile
February 22, 2018, 10:04:24 AM
 #3

If I did not know this problem because I have not been working on a blog at all.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!