2

I'm trying to get an understanding of the chain reorganisations my node has experienced by looking at bitcoin-cli getchaintips.

The "status" of the different branches tells me the following:

1.  "invalid"               This branch contains at least one invalid block
2.  "headers-only"          Not all blocks for this branch are available, but the headers are valid
3.  "valid-headers"         All blocks are available for this branch, but they were never fully validated
4.  "valid-fork"            This branch is not part of the active chain, but is fully validated
5.  "active"                This is the tip of the active main chain, which is certainly valid

However I'm not 100% sure what each of these mean in terms of a chain reorganisation. Would I be correct in saying the following:

  1. valid-fork - My node performed a chain reorganisation. I downloaded and validated the blocks in the branch and had them as part of my active chain, but later deactivated them after receiving a new longer chain.
  2. valid-headers - My node observed a possible chain reorganisation. I heard about a competing longest chain, however I did not download the full blocks and activate them as the branch never became longer than my current active chain.
  3. headers-only - My node observed a possible chain reorganisation. I received some (but not all) of the block headers for a competing branch?

Does that sound about right?

I'm trying to get a more practical understanding of what my node is doing when it hears about a potential chain reorganisation. I'm most unsure about the difference between headers-only and valid-headers.

1 Answer 1

4

valid-fork means that the blocks were fully downloaded and validated. It is likely that they were part of the active chain but were reorganized after a better chain was received.

valid-headers means that the blocks were fully downloaded but not fully validated. Only the headers were validated to have a valid Proof of Work before the block was written to disk. Tips with this status could have been valid-fork, but they never had the chance to become part of the active chain and thus never actually fully validated.

headers-only means that the node only has the block headers but not the full blocks themselves. This could happen for a variety of reasons - maybe a node announced those headers but failed to provide the block itself.

One notable headers-only entry you may see is the Bitcoin Cash fork. This is listed as headers-only your node may have received the block headers for that fork (up until the PoW changed) but did not download the blocks for those headers after it found that the first block in that fork was invalid.

2
  • Thank you. I did notice a rather large headers-only branch and was wondering what it was. I'm assuming it's this one: {"height": 478576,"hash":"000000000000000001416af072f8989829f4c60a1a9658e1cec08411798e4ffa","branchlen": 18, "status": "headers-only"}
    – inersha
    Oct 18, 2019 at 15:24
  • Yes, that looks like the one.
    – Andrew Chow
    Oct 18, 2019 at 17:03

Your Answer

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

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