Leading zeros in block hash

I was wondering if there is a reason for the leading zeros on each block hash, I seem to recall there is a reason, but can’t remember what?

1 Like

For a bitcoin block to be accepted into the network, miners need to construct a block with a blockhash that is lower than the target to be accepted by the bitcoin network. depending on the mining dificulty. in practice it needs to have a bunch a leading zero’s so you know that the miner has spend a lot of work creating a block that will have a bunch of leading zeros when this block is hashed. if you hash information, you always will have a scrambled fixed sized length hash of 64 hexadecimal characters representing a 256 bits binary number. its really hard to achieve a hash with leading zeros. so to achieve this, a miner needs to add a random number (nonce) into the header of a block. because we know that hashes are unpredictable, the miner needs to keep trying out a different random number (nonce) hash the whole block and check if the blockhash now has number lower than the target (with enough leading zero’s) this is the called proof of work. because they keep trying different nonces until finally they get a hash low enough to be accepted by the bitcoin network an get rewarded with the blocksubsidy + all fee’s of the transactions that the miner included in his block.

1 Like