Block Header

Block Header

A block header is like the metadata at the top of a block of transactions.

The fields in the block header provide a unique summary of the entire block.

Example

Here's the block header for block 123,456:

010000009500c43a25c624520b5100adf82cb9f9da72fd2447a496bc600b0000000000006cd862370395dedf1da2841ccda0fc489e3039de5f1ccddef0e834991a65600ea6c8cb4db3936a1ae3143991

Fields

Field Description
Version The version of the block.
Previous Block Hash The Block Hash of the block that this block is being built on top of. This is what "chains" the blocks together.
Merkle Root All of the transactions in this block, hashed together. Basically provides a single-line summary of all the transactions in this block.
Time When a miner is trying to mine this block, the Unix time at which this block header is being hashed is noted within the block header itself.
Bits A shortened version of the Target.
Nonce The field that miners change in order to try and get a hash of the block header (a Block Hash) that is below the Target.

Data Structure

Field Size Data
Version 4 bytes Little-endian
Previous Block Hash 32 bytes Big-endian
Merkle Root 32 bytes Big-endian
Time 4 bytes Little-endian
Bits 4 bytes Little-endian
Nonce 4 bytes Little-endian

Tools

  • Hash Block Header - Insert individual block header fields, and get the serialized block header and the Block Hash.

By Greg Walker,

Last Updated: Mar 14 2018
  • Mar 14 2018: Renamed block-id to block-hash, finally
  • Aug 16 2017: Finally got nVersion showing correctly. Had to fix Version.php class in bitcoinphp
  • Jan 13 2017: tidied up glossary pages - css, formatting, restructuring
  • Jan 01 2017: Moved /manual/guide/ and /manual/reference/ to /guide/ and /glossary/