Block height and BIP34 coinbase commitments
Terms used in this lesson
- BIP34
- The consensus rule requiring a block's coinbase transaction to begin its ScriptSig with the block height.
- Coinbase transaction
- The special first transaction in a Bitcoin block, which claims permitted subsidy and fees and has no ordinary prior-output input.
- Transaction ID
- The identifier produced by hashing a Bitcoin transaction’s non-witness serialization.
Encode the block height as the first minimally encoded Script number in the coinbase ScriptSig and keep it distinct from header fields.
Loading lesson visuals...
Learn the idea
Block height is a position derived by following validated parent links from genesis. It is not one of the six header fields. BIP34 requires the coinbase transaction's ScriptSig to begin with the current height encoded as a minimally encoded Script number, binding that derived position into the transaction list and therefore the block's Merkle root.
Derive height from the parent
A candidate whose parent is at height h can connect at height h plus one. An unknown or invalid parent cannot provide trustworthy height context.
Inspect every idea above to open it.
The header contains version, previous hash, Merkle root, time, nBits and nonce. Height is derived from parent links and committed in modern coinbase ScriptSig bytes.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.