Explain what is target hash?

Technology CommunityCategory: BlockchainExplain what is target hash?
VietMX Staff asked 3 years ago

Hash target is a 256-bit number, which is used as the threshold for mining. In order to mine a block successfully, one has to produce some value x, which after hashing results in a number that is lower than this target. Concisely:

𝐻(𝑥)<𝑡𝑎𝑟𝑔𝑒𝑡

This value x generally represents the block itself and some unique value (called a nonce) that the miner chooses. The latter is essentially like a lottery ticket – a miner continues testing different unique values (nonce) until he comes with the right one. If some other miner succeeds, then everyone moves to the next block and try again – it’s a race.

The hash target is adjusted every couple of weeks on average to ensure that it’s difficult enough to mine new blocks. This is generally done by lowering the target, since the probability of finding a smaller hash decreases with the size of the target.