0

I got my own hard fork of bitcoin from forkgen.tech. The fork has happened after block 506016.

I have 2 nodes running and after syncing up to block 506016, I want to run a pool server.

But the getblocktemplate command keeps returning:

error code: -10
error message:
MyCoin is downloading blocks...

Also getpeerinfo returns:

"id": 0,
"addr": "xxx.xxx.xxx.xxx:37912",
"addrlocal": "xxx.xxx.xxx.xxx:6703",
"addrbind": "xxx.xxx.xxx.xxx:6703",
"services": "000000000000000d",
"relaytxes": true,
"lastsend": 1517579099,
"lastrecv": 1517579099,
"bytessent": 1783,
"bytesrecv": 1807,
"conntime": 1517578379,
"timeoffset": 0,
"pingtime": 0.001438,
"minping": 0.000366,
"version": 70015,
"subver": "/MyCoin:0.15.0.1/",
"inbound": true,
"addnode": false,
"startingheight": 506016,
"banscore": 0,
"synced_headers": -1,
"synced_blocks": -1,
"inflight": [
],
  "whitelisted": false,
  "bytessent_per_msg": {
  "feefilter": 32,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
},
  "bytesrecv_per_msg": {
  "feefilter": 32,
  "getaddr": 24,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
}

Whereby the values synced_headers and synced_blocks should not be -1. The mining pool software complains about this and the blockTemplate and does not start but keeps on waiting for the synced headers and blocks.

Does anyone know what's going on and how to fix this? Or what further checks I can do to confirm my fork is running correctly.

I am an experience programmer but have no knowledge of c++ but I do know C# and Javascript.

For reference here is the blockchaininfo:

{
  "chain": "main",
  "blocks": 506016,
  "headers": 506016,
  "bestblockhash":"shortened by OP because this value was too long",
  "difficulty": 2603077300218.593,
  "mediantime": 1516861026,
  "verificationprogress": 1,
  "chainwork": "shortened by OP because this value was too long",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}
1

Because block 506016 happened ~1 week ago, when you start your node software, it thinks that it is still in the initial block syncing phase because the timestamps are off of real time by a lot. The only way around this is to mine a block now. You can modify the source code to bypass this warning so that you can mine a block.

  • Exactly the answer I was looking for. Instead of modifying code I don't fully understand in a language I don't master, I went for the easy solution to just increased the FORK_BLOCK variable to a value a little bit above the current block. I re-compiled the code and it's syncing the blocks now. I expect the mining pool code will run without complaints. Thanks Andrew. – Eric Dela Cruz Feb 3 '18 at 3:02

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.