TeachMeBitcoin

The Block Hash Definition

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

The Block Hash Definition

The Block Hash is the unique fingerprint of a Bitcoin block. While it is the most important piece of data for the network's security, it is often misunderstood: The block hash is not actually stored inside the block header.

1. What is the Block Hash?

The block hash is the result of applying the Double-SHA256 algorithm to the 80-Byte Block Header. $$Block\ Hash = SHA256(SHA256(Header))$$

2. The Unique Identifier (ID)

In Bitcoin, the block hash serves as the Block ID.

3. Why Not Store It?

Since the hash is a direct mathematical result of the 80 bytes in the header, storing it inside the header would be redundant. Every node in the world can calculate the hash in microseconds upon receiving the block. By not storing it, Bitcoin saves 32 bytes of space per block header.

4. The Proof of Work Condition

For a block to be valid, its hash must be numerically less than the current Target.

Property Value
Input 80 Bytes (The Header)
Algorithm Double-SHA256
Output Size 32 Bytes (256 bits)
Storage Calculated on-the-fly, not in header.
IMPORTANT

A "Block Hash" is essentially a very large number. When we say a block has "18 leading zeroes," we are saying the number is so small that its first 72 bits (18 hex chars) are all zero.

In the next section, we will look at the Byte-Level Calculation and the importance of Endianness.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!