1

Hello when I run this command (bitcoin-cli -testnet getblockchaininfo) I get this:

{
  "chain": "test",
  "blocks": 0,
  "headers": 0,
  "bestblockhash": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
  "difficulty": 1,
  "mediantime": 1296688602,
  "verificationprogress": 4.453828060385498e-08,
  "initialblockdownload": true,
  "chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
  "size_on_disk": 293,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    }
  },
  "warnings": ""
}

can you explain what does each line mean and why headers :0 ?

Thank you

1 Answer 1

1

You can get information about each value on the RPC documentation on bitcoincore.org or by running bitcoin-cli help getblockchaininfo. I paste it below:

{
  "chain": "xxxx",              (string) current network name as defined in BIP70 (main, test, regtest)
  "blocks": xxxxxx,             (numeric) the current number of blocks processed in the server
  "headers": xxxxxx,            (numeric) the current number of headers we have validated
  "bestblockhash": "...",       (string) the hash of the currently best block
  "difficulty": xxxxxx,         (numeric) the current difficulty
  "mediantime": xxxxxx,         (numeric) median time for the current best block
  "verificationprogress": xxxx, (numeric) estimate of verification progress [0..1]
  "initialblockdownload": xxxx, (bool) (debug information) estimate of whether this node is in Initial Block Download mode.
  "chainwork": "xxxx"           (string) total amount of work in active chain, in hexadecimal
  "size_on_disk": xxxxxx,       (numeric) the estimated size of the block and undo files on disk
  "pruned": xx,                 (boolean) if the blocks are subject to pruning
  "pruneheight": xxxxxx,        (numeric) lowest-height complete block stored (only present if pruning is enabled)
  "automatic_pruning": xx,      (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
  "prune_target_size": xxxxxx,  (numeric) the target size used by pruning (only present if automatic pruning is enabled)
  "softforks": [                (array) status of softforks in progress
     {
        "id": "xxxx",           (string) name of softfork
        "version": xx,          (numeric) block version
        "reject": {             (object) progress toward rejecting pre-softfork blocks
           "status": xx,        (boolean) true if threshold reached
        },
     }, ...
  ],
  "bip9_softforks": {           (object) status of BIP9 softforks in progress
     "xxxx" : {                 (string) name of the softfork
        "status": "xxxx",       (string) one of "defined", "started", "locked_in", "active", "failed"
        "bit": xx,              (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
        "startTime": xx,        (numeric) the minimum median time past of a block at which the bit gains its meaning
        "timeout": xx,          (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
        "since": xx,            (numeric) height of the first block to which the status applies
        "statistics": {         (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
           "period": xx,        (numeric) the length in blocks of the BIP9 signalling period 
           "threshold": xx,     (numeric) the number of blocks with the version bit set required to activate the feature 
           "elapsed": xx,       (numeric) the number of blocks elapsed since the beginning of the current period 
           "count": xx,         (numeric) the number of blocks with the version bit set in the current period 
           "possible": xx       (boolean) returns false if there are not enough blocks left in this period to pass activation threshold 
        }
     }
  }
  "warnings" : "...",           (string) any network and blockchain warnings.
}

The headers field means the number of block headers your node has validated, without validating whether the transactions inside that block are valid. Validating the header includes validating the difficulty, timestamp and blockhash fields and can be done without downloading the whole block. The headers must be equal or higher than the blocks field which indicates how many blocks have been fully validated.

5
  • thank you for your answer. So in my case headers= 0 means no header is validated ? and why i got that? Thank you
    – saadia
    Commented Dec 17, 2019 at 13:40
  • You either created your own testnet and therefore there are no blocks created until you create them or you are having connection issues with other peers - make sure your firewall is not blocking port 18333
    – Pedro
    Commented Dec 17, 2019 at 13:47
  • When I run bitcoin-cli getblocktemplate it gives me that blocks still downloading.. Can it be because the blockchain was not yet downloaded?
    – saadia
    Commented Dec 18, 2019 at 5:07
  • Yes, you have not synchronized any headers or blocks with the network. You may have a network issue. Commented Dec 19, 2019 at 17:17
  • should I let it run for more than one day? or at least some hours?
    – saadia
    Commented Dec 20, 2019 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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