Bitcoin Forum
November 12, 2024, 11:46:04 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Generating first block after genesis  (Read 132 times)
crontabaltlinux (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
February 28, 2019, 07:04:33 PM
Last edit: February 28, 2019, 08:07:00 PM by crontabaltlinux
 #1

Hi! I'm currently developing a test altcoin in educational purposes, and can't for some reason generate first pow blocks after generating genesis block. Couple of years ago i successfully made workable fork of fork of dash (or something similar with terribly outdated codebase), but I'm totally unable to reproduce it with modern codebase.

So, to the point. I used PIVX repo, changed chainparams.cpp accordingly:

- removed old checkpoints;
- generated new keys;
- updated ports all over the codebase;
- changed pchMessageStart numbers;
- updated unixtime;
- changed coin name all over the codebase;
- generated genesis (and it was correct, i checked it many times);
- compiled it;
- launched coind;
- launched cpuminer, and it failed with the following in log:

Code:
2019-02-28 16:55:09 ERROR: CheckProofOfWork() : hash doesn't match nBits
2019-02-28 16:55:09 ERROR: CheckBlockHeader() : proof of work failed
2019-02-28 16:55:09 ERROR: CheckBlock() : CheckBlockHeader failed
2019-02-28 16:55:09 CreateNewBlock() : TestBlockValidity failed

I re-generated genesis with code in chainparams.cpp - it was the same as with genesis generator. I tried gen=1 and setgenerate true, and again received the same error, and hashespersec=0 in getmininginfo.

I started searching the web, and found a lot of same questions without any answer. For example, this one looks absolutely same - https://bitcoin.stackexchange.com/questions/79767/cannot-mine-genesis-first-block-pivx-fork-clone

I tried the kind of solution from this thread - https://bitcointalk.org/index.php?topic=2152157.0;prev_next=next - but without any success too.

I assumed that maybe i'm missing something, and tried to do the same with some other PIVX forks. The first one was this - https://github.com/IchibaCoin/ICHIBA - with the same error. The second one was this - https://github.com/cruxcoinsource/CruxCoin - with the same error too. Then i scratched my head, thought deeply, and run diff for all files in /src/ folder of both coins with my testcoin. Files were totally same and differed only where they were different between crux and ichiba.

I tried all possible combinations of bools in this part of chainparams.cpp:

Code:
fMiningRequiresPeers = true;
fAllowMinDifficultyBlocks = false;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
fMineBlocksOnDemand = false;
fSkipProofOfWorkCheck = false;
fTestnetToBeDeprecatedFieldRPC = false;
fHeadersFirstSyncingActive = false;

And when fMineBlocksOnDemand was set to true, command setgenerate true returned that wallet keypool is empty, and keypoolrefill command had no effect.

What am i doing wrong?..)))
crontabaltlinux (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 02, 2019, 09:28:30 PM
 #2

Does anybody know, how can it be fixed?..)
Ardazello
Jr. Member
*
Offline Offline

Activity: 175
Merit: 1


View Profile
March 02, 2019, 10:02:28 PM
 #3

You should better write and ask help in  the development section, here: https://bitcointalk.org/index.php?board=12.0

or here: https://bitcointalk.org/index.php?board=4.0
crontabaltlinux (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 03, 2019, 07:31:47 AM
 #4

You should better write and ask help in  the development section, here: https://bitcointalk.org/index.php?board=12.0

or here: https://bitcointalk.org/index.php?board=4.0

Thanks!
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!