This guide explains Bitcoin Core getchaintips RPC in plain English. It shows what the command does, what its result means and what it cannot prove.
TL;DR
- What it is: Bitcoin Core 0.16.0 getchaintips returned every known tip in the block tree, including the active chain and orphaned or incomplete branches. Each entry carried height, hash, branch length and status: active, valid-fork, valid-headers, headers-only or invalid.
- Why it matters: getchaintips is the correct local view for competing branch awareness, but it requires status, ancestry, chainwork and multi-node context. Short forks are evidence to evaluate, not automatic proof of attack.
- Current position: Bitcoin Core 0.16.0 getchaintips returned every known tip in the block tree, including the active chain and orphaned or incomplete branches.
Bitcoin Core getchaintips RPC in simple English
Bitcoin Core getchaintips RPC: For non-active tips, branchlen describes how many blocks connect the tip back to the active branch point.
Simple example
A miner is checking Bitcoin Core getchaintips RPC. Do not delete a branch record when it disappears from the live RPC response. Walk header ancestry to locate the fork and measure which monitored payments or templates actually intersect it.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Active entry
The active tip has branchlen zero and active status. Verify there is exactly one active entry in a coherent response and compare its hash with getbestblockhash. A mismatch across calls can be a normal tip transition, so sample with timestamps and retry under a bounded consistency procedure.
Branch length
For non-active tips, branchlen describes how many blocks connect the tip back to the active branch point. It is not confirmation count, economic weight or number of affected transactions. Walk header ancestry to locate the fork and measure which monitored payments or templates actually intersect it.
Status meanings
invalid contains an invalid block; headers-only lacks block data; valid-headers has available blocks not fully validated; valid-fork is fully validated but inactive; active is the selected main tip. Preserve these distinctions. A headers-only branch is not evidence of a valid competing chain, and a valid fork is not necessarily dangerous.
Local knowledge
The node reports branches it has learned about and retained. Another node may know different tips because of peers, pruning, restart or attack visibility. Compare several independent nodes and relevant logs. Absence from one response does not prove a branch never existed or was not seen elsewhere.
Alert policy
Short valid forks occur naturally when blocks race. Alert on depth, duration, chainwork proximity, invalid-source patterns and affected business state rather than every second tip. Escalate deep or persistent divergence and pause sensitive services when confirmation assumptions are threatened.
Evidence retention
Record tip hash, height, branch length, status, active tip, chainwork and observation time without storing unrelated peer identities. Preserve detached headers and affected transaction references through the incident. Do not delete a branch record when it disappears from the live RPC response.
How specialists test it
Operators test the command on a non-production node first. They check a normal reply, an invalid request, a timeout and a restart. This shows what the response means and prevents one local result from being mistaken for a network-wide outcome.
Frequently asked questions
What is the main point of Bitcoin Core getchaintips RPC?
Bitcoin Core getchaintips RPC: For non-active tips, branchlen describes how many blocks connect the tip back to the active branch point.
For Bitcoin Core getchaintips RPC, what should a beginner know about active entry?
The active tip has branchlen zero and active status. Verify there is exactly one active entry in a coherent response and compare its hash with getbestblockhash.
For Bitcoin Core getchaintips RPC, what should a beginner know about branch length?
For non-active tips, branchlen describes how many blocks connect the tip back to the active branch point.
For Bitcoin Core getchaintips RPC, what should a beginner know about status meanings?
invalid contains an invalid block. Headers-only lacks block data. Valid-headers has available blocks not fully validated.
Conclusion
getchaintips is the correct local view for competing branch awareness, but it requires status, ancestry, chainwork and multi-node context. Short forks are evidence to evaluate, not automatic proof of attack.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.