What is the Block Header

As transactions occur on the BSV network, they are collected by miners to be permanently written to the BSV ledger in an ordered set called a block. These blocks have a standard structure which is the block header followed by the set of transactions in the order determined by the miner who created the block.

The block header is an 80-byte string of specific data elements. Firstly, a 4 byte version parameter followed by a 32 byte HASH256 of the previous block's header, the 32 byte Merkle root created from the Merkle tree containing all of the transactions in the block, a 4 byte timestamp indicating when the block was created, a 4 byte floating point number indicating the difficulty target for the proof of work process and a4 byte 'nonce' or 'number used once' which is used in the puzzle that miners compete to solve.

FIELD

PURPOSE

BYTES

FORMAT

STRING

Version

Version rules to follow

4

Little Endian

01000000

Previous Block Hash

256-bit hash of the previous block header

32

Little Endian

97ef723d53804e4a81a6926e52115d2163c91da0516d17451507000000000000

Merkle Root

256-bit hash of all transactions in the block

32

Little Endian

1e9034c07807ebe6e0f90ec453571bba196116d3ead22cff2d51f4855e3bbebb

Time

Current block timestsamp as UNIX epoch

4

Little Endian

1311855211

nBits

Current difficulty target in compact format

4

Little Endian

1a09ec04

Nonce

32-bit number (starts at 0)

4

Little Endian

2921834576

RAW SERIALISED STRING

0100000097ef723d53804e4a81a6926e52115d2163c91da0516d174515070000000000001e9034c07807ebe6e0f90ec453571bba196116d3ead22cff2d51f4855e3bbebb13118552111a09ec04292183457613118552111a09ec042921834576

It is through the link back to the previous block header that blocks become chained together in a 'blockchain'. Thinking back to the outcome of what changing just a single bit of information changes in a Merkle tree, we can see that the entire contents of the blockchain all the way back to the Genesis block becomes a solid data silo, unchangeable and verifiable. This is how the ledger gets its status as a Write Once Read Many (WORM) database. Any attempt to change to any part of the structure would fail when subject to simple, hash-based data verification processes. In addition, the Merkle root acts as a digital fingerprint that links every transaction in a block to the block header, allowing for a Merkle proof to be used to verify the presence of any transaction in any block.

Last updated

Was this helpful?