3

I have forked PIVX and generated new genesis block hash, merkle root and nonce, and changed the rewards parameters.

It compiles fine and the daemon starts, I have even got 2 nodes connected, but attempting to mine the first block with setgenerate true -1 does not work. getmininginfo says mining = true but the hashratepersec is 0.

My debug.log shows pages and pages of this:

2018-02-01 13:16:55 CreateNewBlock() : TestBlockValidity failed
2018-02-01 13:16:55 CreateNewBlock(): total size 1000
2018-02-01 13:16:55 ERROR: CheckProofOfWork() : hash doesn't match nBits
2018-02-01 13:16:55 ERROR: CheckBlockHeader() : proof of work failed
2018-02-01 13:16:55 ERROR: CheckBlock() : CheckBlockHeader failed
2018-02-01 13:16:55 CreateNewBlock() : TestBlockValidity failed
2018-02-01 13:16:55 CreateNewBlock(): total size 1000
2018-02-01 13:16:55 ERROR: CheckProofOfWork() : hash doesn't match nBits
2018-02-01 13:16:55 ERROR: CheckBlockHeader() : proof of work failed
2018-02-01 13:16:55 ERROR: CheckBlock() : CheckBlockHeader failed
2018-02-01 13:16:55 CreateNewBlock() : TestBlockValidity failed
2018-02-01 13:16:55 CreateNewBlock(): total size 1000
2018-02-01 13:16:55 ERROR: CheckProofOfWork() : hash doesn't match nBits
2018-02-01 13:16:55 ERROR: CheckBlockHeader() : proof of work failed
2018-02-01 13:16:55 ERROR: CheckBlock() : CheckBlockHeader failed
2018-02-01 13:16:55 CreateNewBlock() : TestBlockValidity failed
2018-02-01 13:16:55 CreateNewBlock(): total size 1000
2018-02-01 13:16:55 ERROR: CheckProofOfWork() : hash doesn't match nBits
2018-02-01 13:16:55 ERROR: CheckBlockHeader() : proof of work failed

I think this maybe a small error somewhere but not exactly sure where. Maybe someone would know from experience?

If you are commenting to say "not another coin clone" please save your energy for something more productive.

Thanks!

  • Have you fixed it yet? I think that you have some miss in your configure. – ThanhPT Mar 21 '18 at 7:39
  • any luck with this i've got the same issue. – Tim Baker Apr 7 '18 at 2:30
  • I am also trying to clone PIVX. Now I feel the issue may be related to the fact that the PIVX is now PoS only. I am currently looking through the commit history to find any code that may break the PoW functionality. – Michael Smith Dec 10 '18 at 0:59
  • Additionally, I did find a parameter in the chainparams.cpp file named fSkipProofOfWorkCheck that when set to true generates a different error. – Michael Smith Dec 10 '18 at 1:01
0

Create the first block manually. I believe that is how Satoshi Nakamoto did it. I think there is a uniqueness to the first block and I've read that it's funds can't be used for some reason.

  • 1
    well the first block is the genesis block which is block 0 and which I've already gotten the hash for but it won't let me mine block 1 with setgenerate true -1. Even though it compiled fine and even says generate = true but hashpersec is 0 and its still on block 0.. – Shane Buckley Feb 2 '18 at 20:09
  • May want to manually create block 1 and submit to the wallet. That may help identify what part is the issue as it could be the miner or the wallet at this point. – Mine Feb 6 '18 at 16:03
  • how can block 1 be manually created and submitted. i thought of that but when i do getblocktemplate, it tellls me blocks are still downloading – Tim Baker Apr 7 '18 at 5:43
  • @TimBaker Manually create the block instead of using a miner and simply start the program with the first block (or block "0") already manually inputted into the database. Pre-existing in the context of running the wallet. Which just means blk0000.dat (or whatever the filename is) already has that first block for the wallet to read from. I think mining should work properly from there. – Mine Apr 7 '18 at 14:54
  • @mine yeah the issue ended up being with an update a user had pushed which broke the internal miner. I believe i found it in pow.cpp but I got it working now thanks just saw your message – Tim Baker Sep 13 '18 at 23:48

protected by Community Mar 21 '18 at 16:54

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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