🟢Finding a valid block header (block hash)
👉A block header acts as an identifier for each individual block, meaning each block has a unique hash. When creating a new block, miners combine the hash of the previous block with the root hash of their candidate block to generate a new block hash. They must also add an arbitrary number known as a nonce.
🟢As such, when trying to validate their candidate block, a miner needs to combine the root hash, the previous block’s hash, and a nonce and put them all through a hash function. Their goal is to do this repeatedly until they can create a valid hash.
🟢The root hash and the hash of the previous block cannot be changed, so miners must change the nonce value several times until a valid hash is found. In order to be considered valid, the output (block hash) must be less than a certain target value determined by the protocol. In Bitcoin mining, the block hash must start with a certain number of zeros — this is called the mining difficulty.