1

For study and fun I try to create my own altcoin. I forked Litecoin, removed checkpoints, changed nTime, *pszTimestamp, noNce and hashed new hashes for genesis block in main net, testnet and regressiontest net. The hardcoded assertions goes OK but when I start the deamon

./src/cryptoind 

I get alwais the same result:

ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8) ... ActivateBestChainStep --> Failed!

Going deeper in the code the following statement always fails (main.cpp):

if (UintToArith256(hash) > bnTarget)

Seems like the genesis block does not respect the difficulty (PoW)

Someone faced the same issue? Thank you all

  • I met same problem. Have you solved? How? – creator Feb 22 '18 at 5:05
1

It seems the -reindex parameter solves the issue.

https://github.com/bitcoin/bitcoin/issues/8081

  • Welcome to BitcoinSE! Please note, the original question states that it is a fork of Litecoin. – Willtech Feb 4 '18 at 9:04
  • Yes but the -reindex parameter still seems to solve the issue. I had made further explanation at stackoverflow.com/questions/47828172/… I also am trying to create an altcoin and had stuck at the same ERROR message then applying -reindex parameter at least made it work up to a point where I begin to get Error -28 from rpc call which is said to be "Client is still warming up!" (whatever it means) at github.com/bitcoin/bitcoin/blob/v0.15.0.1/src/rpc/…. – Bedri Ozgur Guler Feb 5 '18 at 11:30
  • Re-Hi to all, i've tried a lot of times with -reindex parameter, but i have the same issue. "ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8) ... ActivateBestChainStep --> Failed!" – Andrea Pizzirani Feb 6 '18 at 13:13
  • Hello, thx for info. -reindex really take me next step. and now when I run ./xxxcoind -reindex, it seems stop, debug.log says "potential stale tip detected, will try using extra outbound peer", do you know why and solution? – creator Feb 21 '18 at 12:06
  • So I googled and added [ -connect=0 ] at last. Then again ReadBlockError occured. So I need to maybe actually mine genesis block inside the code. How? And where put that code? At chainparams.cpp's before [ assert(consensus.hashGenesisBlock ] line? – creator Feb 22 '18 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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