Explainer

What is Bitcoin block height?

Bitcoin block height is a block's position in a chain counted from the genesis block at height zero. It identifies a position, while the block hash identifies the block itself.

2 min readGlossary
What is Bitcoin block height?

The short answer

Bitcoin block height is a block's position in a chain. The genesis block has height zero, its child has height one, and each following block adds one. Bitcoin Core 32.1 stores this value as nHeight in its CBlockIndex, where the code also states that the genesis block has height zero.

If the active chain tip is at height 1,000,000, that chain contains 1,000,001 blocks when the genesis block is included. The height counts positions. It is not a timestamp and does not say how many transactions a block contains.

Height and hash answer different questions

A height names a position, while a block hash identifies a particular block. During a temporary fork, two valid candidate blocks can have the same height because both extend the same parent. A node selects its active chain using accumulated proof of work, so the block associated with a height can change during a chain reorganization.

Bitcoin Core's released getblockcount RPC returns the height of the most-work, fully validated chain. Its blockchain RPC code also returns height and hash as separate fields. That distinction is why a height alone is not a permanent block identifier.

Where height appears

BIP 34 requires a miner to put the new block's height at the start of its coinbase transaction input. This makes the height part of each modern block's consensus-checked data. Height also helps software calculate transaction confirmations, evaluate height-based locktimes and determine the block subsidy schedule.

An explorer may display both “block 1,000,000” and a long hexadecimal hash. The first is the height. The second identifies the exact block currently shown at that position.

How to read it safely

Check which network an explorer or node is using before comparing heights. Bitcoin mainnet, testnet4 and signet each have their own genesis block and their own height count. A height copied from one network does not locate a block on another.

Also distinguish height from confirmations. A transaction included at the current tip has one confirmation even though its block height may be a large number. As more blocks extend the active chain, the transaction's confirmation count rises while its containing block's height stays the same.

Newsletter

Bitcoin, without the noise

What happened in Bitcoin, what it actually changes, and the sources so you can check us. One issue at a time, straight to your inbox.

  • One email per issue, never a drip campaign
  • No tracking pixels and no shared addresses
  • Unsubscribe from any issue in one click

Get the next issue

One email per issue, no tracking pixels, and unsubscribe from any of them. We do not share your address. Privacy policy