Glossary

Block Height

Block height is the sequential number assigned to each block in a blockchain, counting from the genesis block at height zero.

Key Takeaways

  • Block height is the sequential position of a block in the chain, counting from the genesis block at height zero. As of mid-2026, Bitcoin's block height is approximately 956,000.
  • Bitcoin uses block height to schedule protocol events: the block subsidy halves every 210,000 blocks, and the difficulty adjusts every 2,016 blocks.
  • Timelocks like OP_CHECKLOCKTIMEVERIFY use absolute block height to enforce spending conditions, making block height a critical building block for time-sensitive contracts on Bitcoin and Layer 2 protocols.

What Is Block Height?

Block height is the number that identifies a block's position in a blockchain, measured as the distance from the first block ever mined. The genesis block sits at height 0, the next block at height 1, and so on. The current block height equals the total number of blocks in the chain minus one.

Think of block height like floors in a building: the ground floor is 0, and each new floor stacked on top increments the count by one. Every Bitcoin node independently tracks the block height by counting blocks from genesis.

Block height is not stored in the block header itself. Instead, nodes derive it from a block's position in the longest valid chain. This distinction matters: during temporary chain forks, two competing blocks can share the same height. The block hash (a 64-character hex string) is the only truly unique identifier for a block.

How It Works

Every block in Bitcoin references the hash of the block before it, creating a linked chain all the way back to the genesis block. When a miner finds a valid block, the network appends it to the chain, and the block height increments by one.

  1. A miner assembles a candidate block containing pending transactions from the mempool
  2. The miner sets the block's "previous block hash" field to reference the current chain tip
  3. After finding a valid proof of work, the miner broadcasts the block to the network
  4. Nodes validate the block and add it to their local copy of the chain, incrementing the block height by one

With Bitcoin's target block time of approximately 10 minutes, the block height increases by roughly 144 blocks per day (6 blocks per hour times 24 hours) and about 52,560 blocks per year.

Block Height vs. Block Hash

Both block height and block hash can identify a block, but they serve different purposes:

PropertyBlock HeightBlock Hash
FormatInteger (e.g., 840000)64-character hex string
UniquenessNot guaranteed during forksAlways unique
Human readabilityEasy to referenceDifficult to memorize
Stored in blockNo (derived from position)Yes (computed from header)

Block explorers like Mempool.space and Blockstream.info let you search by either value. Entering a block height returns whichever block occupies that position on the current longest chain.

Querying Block Height

Developers can query the current block height through Bitcoin RPC calls:

# Get the current block height
bitcoin-cli getblockcount
# Returns: 956782

# Get the block hash at a specific height
bitcoin-cli getblockhash 840000
# Returns: 0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5

# Get full block details by height
bitcoin-cli getblockstats 840000

Block Height and Protocol Events

Bitcoin uses block height rather than calendar dates to schedule consensus-critical events. This design ensures protocol rules are enforced deterministically across all nodes, regardless of clock discrepancies.

Halving Schedule

The block subsidy (the BTC reward miners receive for each block) halves every 210,000 blocks. Bitcoin Core computes the halving count as floor(block_height / 210000), making it a pure function of block height:

HalvingBlock HeightDateSubsidy
Genesis0Jan 3, 200950 BTC
1st210,000Nov 28, 201225 BTC
2nd420,000Jul 9, 201612.5 BTC
3rd630,000May 11, 20206.25 BTC
4th840,000Apr 20, 20243.125 BTC
5th (est.)1,050,000~Mar 20281.5625 BTC

For a deeper analysis of halving economics, see the Bitcoin halving economics research article.

Difficulty Adjustment

Bitcoin's difficulty retargets every 2,016 blocks (approximately every two weeks). The algorithm measures the actual time taken to mine the previous 2,016 blocks and compares it to the 20,160-minute target (2,016 blocks times 10 minutes). If blocks arrived faster than expected, difficulty increases; if slower, it decreases. The maximum adjustment per epoch is capped at a 4x change in either direction.

This self-correcting mechanism ensures that block height advances at a predictable pace regardless of how much hashrate joins or leaves the network.

Block Height and Timelocks

Block height is the foundation for Bitcoin's timelock system, which restricts when outputs can be spent. There are two flavors: absolute timelocks based on block height, and relative timelocks based on confirmation depth.

Absolute Timelocks (CLTV)

OP_CHECKLOCKTIMEVERIFY (CLTV), defined in BIP 65, prevents an output from being spent until a specified block height has been reached. A value below 500,000,000 is interpreted as a block height; a value at or above that threshold is treated as a Unix timestamp.

# Script: "Cannot spend until block 1,000,000"
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
1000000 OP_CHECKLOCKTIMEVERIFY OP_DROP

CLTV is critical to Hash Time-Locked Contracts (HTLCs), which power the Lightning Network's payment routing. Each hop in a Lightning payment uses a CLTV-based timelock to enforce refund deadlines.

For a comprehensive guide to Bitcoin timelocks, see the timelocks deep dive.

Relative Timelocks (CSV)

OP_CHECKSEQUENCEVERIFY (CSV), defined in BIP 112, enforces a relative timelock: the output cannot be spent until a certain number of blocks have passed since the transaction containing it was confirmed. While CLTV references absolute block height, CSV references confirmation depth (how many blocks have been mined on top of the transaction).

CSV is used in Lightning Network commitment transactions to give counterparties time to broadcast justice transactions if a revoked state is published.

Use Cases

  • Network progress tracking: block height is the simplest metric for how far the blockchain has advanced. Wallet software uses it to determine sync progress during initial block download.
  • Confirmation counting: when a transaction is included in a block, its confirmation count equals the current block height minus the block height at which it was mined, plus one. Six confirmations (roughly 60 minutes) is the traditional threshold for considering a Bitcoin transaction irreversible.
  • Soft fork activation: Bitcoin protocol upgrades like SegWit and Taproot activated at specific block heights (481,824 and 709,632, respectively), ensuring all nodes enforce the new rules simultaneously.
  • Smart contract scheduling: protocols built on Bitcoin use block height to schedule events like token unlocks, governance votes, and escrow releases without relying on external clocks.
  • Layer 2 coordination: protocols like Spark and Lightning reference mainchain block height for settlement deadlines, ensuring that off-chain states can always be resolved on-chain within a known timeframe.

Why It Matters

Block height serves as Bitcoin's universal clock. Unlike wall-clock time, which varies across time zones and can be manipulated by miners within a two-hour window, block height is objective and verifiable by every node on the network. This makes it the natural choice for any rule that depends on "when" something happens in the Bitcoin protocol.

For Layer 2 systems, block height is especially important. Lightning Network channels use block-height-based timelocks to enforce CLTV deltas between routing hops. If a payment fails, the sender's funds are guaranteed to be recoverable after the timelock expires at a specific block height. Similarly, Spark uses Bitcoin's block height as a settlement anchor, allowing users to verify the state of their off-chain balances against the main chain.

Risks and Considerations

Block Height Is Not Unique

During a chain reorganization, two or more blocks can temporarily exist at the same height. The network resolves this by following the chain with the most cumulative proof of work, but applications that rely on block height as a unique identifier may encounter inconsistencies until the reorganization settles. Always use block hashes when a unique reference is required.

Time Estimation Is Approximate

While Bitcoin targets one block every 10 minutes, actual block times vary significantly. Individual blocks can take seconds or over an hour to mine. Converting block height to a calendar date is only accurate as an estimate: 144 blocks is roughly one day, but not exactly. Applications that need precise calendar-time guarantees should use timestamps rather than block heights where possible.

Timestamp vs. Block Height in Timelocks

The dual interpretation in nLockTime and CLTV (values below 500,000,000 are block heights, values above are timestamps) can lead to subtle bugs if developers mix them up. A lock value of 1,000,000 means "block one million," while 1,700,000,000 means a specific Unix timestamp. Misinterpreting one for the other could lock funds for far longer (or shorter) than intended.

This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.