ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8) in altcoin

0

I am trying to create altcoin(Abccoin) from bitcoin and change parameters in chainparams.cpp and also generated the genesis block hash and hashMerkleRoot but when I start the daemon with abccoind -daemon

I get the error in debug.log :

ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=8)

Using -reindex also doesn't solve the problem, then I got another error :

ERROR: AcceptBlock: high-hash, proof of work failed (code 16)

Does anybody know how to solve this problem?

user75884

Posted 2018-02-05T12:05:25.887

Reputation: 1

I'm having the same issue. I used the CreateGenesisBlock function.soupdiver 2018-02-06T13:34:10.003

I met same problem. have you solved? Any updates? Please share.creator 2018-02-26T08:04:23.853

Answers

1

The error means that your genesis block has an invalid Proof of Work.

Andrew Chow

Posted 2018-02-05T12:05:25.887

Reputation: 40 910

so that means I have to again generate hash with different valid genesis blockuser75884 2018-02-06T05:21:40.940

How to check if the PoW of the genesis block is valid?soupdiver 2018-02-06T13:34:26.133

You actually have to mine the genesis block (it's very easy to do) and check its proof of work when it is being created. You can do that with a while loop to increment the nonce and the CheckProofOfWork() function.Andrew Chow 2018-02-06T15:34:42.307

@AndrewChow Hi. So again me.. How exactly do that in chainparams.cpp? If I write CheckProofOfWork() in chainparams.cpp (of course #include "pow.h"), error says........... undefined reference to "CheckProofOfWork(..."creator 2018-02-26T08:09:34.580

ok, so I solved link problem, revised makefile.am, and wrote like while(!CheckProofOfWork(genesis.GetHash(), genesis.nBits,,,,, )){ ++genesis.nNonce; }, but still got CBlockDiskPos error with ./xxxcoind run, or AcceptBlock: high-hash, proof of work failed (code 16), Potential stale tip detected, will try using extra outbound peer error with ./xxxcoind -reindexcreator 2018-03-01T09:38:35.993