bitcoin-abc icon indicating copy to clipboard operation
bitcoin-abc copied to clipboard

getblockchaininfo returns blocks > headers when update from 0.18.5 to 0.18.6

Open TranBaVinhSon opened this issue 6 years ago • 3 comments
trafficstars

Describe the issue

When I update bitcoin abc from 0.18.5 to 0.18.6 and run bitcoin-cli getblockchaininfo on testnet, it returns blocks > headers.

{
  "chain": "test",
  "blocks": 1286392,
  "headers": 1286288,
  "bestblockhash": "000000000000a77a83ec1dbbda5c8197358ff923467defea577230885a1e167a",
  "difficulty": 1,
  "mediantime": 1550287157,
  "verificationprogress": 0.9999991773758619,
  "chainwork": "0000000000000000000000000000000000000000000000439e9c205f379d5d51",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    },
    {
      "id": "csv",
      "version": 5,
      "reject": {
        "status": true
      }
    }
  ]
}

Expected behaviour

blocks <= headers

Actual behaviour

blocks > header

Machine specs:

  • OS: MacOS
  • CPU: 2.9 GHz Intel Core i9
  • RAM: 32Gb
  • Disk size: 256Gb
  • Disk Type (HD/SDD): SDD

After update, I tried run bitcoin-abc with -reindex option, but the blocks number is still bigger than headers number. Result of bitcoin-cli getnetworkinfo

{
  "version": 180600,
  "subversion": "/Bitcoin ABC:0.18.6(EB32.0)/",
  "protocolversion": 70015,
  "localservices": "0000000000000025",
  "localrelay": true,
  "timeoffset": -1,
  "networkactive": true,
  "connections": 8,
  "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    }
  ],
  "relayfee": 0.00001000,
  "excessutxocharge": 0.00000000,
  "localaddresses": [
  ],
  "warnings": ""
}

TranBaVinhSon avatar Feb 16 '19 07:02 TranBaVinhSon

+1

keizo3 avatar Feb 22 '19 18:02 keizo3

Duplicate of #191

jasonbcox avatar Feb 27 '19 00:02 jasonbcox

Hi @TranBaVinhSon, I've looked into this issue a bit, and found the cause. What's happening is that your node is picking up the Bitcoin SV testnet chain, which has somewhat higher proof of work.

If you upgrade to 0.19.7 or higher, there is a now a checkpoint on testnet, so your node will stop downloading more headers from that other chain. Then, if you re-run the initial block download or run -reindex, the alternate chain headers data should be forgotten.

Alternatively if you simply upgrade, you can just wait and the BCH testnet will eventually overcome the stale BSV testnet tip in chainwork, though that could take some time. In any case, blocks > headers is harmless.

markblundeberg avatar Jun 22 '19 11:06 markblundeberg