In cryptocurrency mining, a target hash is a numeric value that a hashed block header must be less than or equal to in order for a new block to be awarded to a miner. The block header contains the block version number, a timestamp, the hash used in the previous block, the hash of the Merkle Root, the nonce, and the target hash. In cryptocurrency mining, a target hash is a numeric value that a hashed block header (which is used to identify individual blocks in a blockchain) must be less than or equal to in order for a new block to be awarded to a miner. In cryptocurrency mining, a target hash is a numeric value that a hashed block header must be less than or equal to in order for a new block to be awarded to a miner. Target hashes are used in cryptocurrencies that use a proof-of-work (PoW) system to set the current mining difficulty (including Bitcoin); if a cryptocurrency uses a different system for mining, it may not require a target hash.
What Is a Target Hash?
In cryptocurrency mining, a target hash is a numeric value that a hashed block header must be less than or equal to in order for a new block to be awarded to a miner. Block headers identify individual blocks in a blockchain.
Cryptocurrency mining refers to the process of gathering cryptocurrency as a reward for work that you complete. The nature of this work is to verify the legitimacy of a given cryptocurrency's transactions. In this way, cryptocurrency miners are essentially auditors. When you mine, you can earn cryptocurrency without having to put down money for it.
The target hash is used in determining the difficulty of the input and can be adjusted in order to ensure that blocks are processed efficiently. For example, target hashes are used in cryptocurrencies that use a proof-of-work (PoW) system to set the current mining difficulty (including Bitcoin). If a cryptocurrency uses a different system for mining, it may not require a target hash.
How a Target Hash Works
Cryptocurrencies rely on the use of blockchains that contain the history of all that cryptocurrency's transactions. These transactions are hashed, or cryptographically encoded, into a series of alphanumeric characters. Hashing involves taking a string of data of any length and running it through an algorithm to produce an output with a fixed length. The output will always be the same length, regardless of how big or small the input is (although the number of permutations of a hash is astronomically large). Each block will contain the hash of the previous block header.
Validating and encoding the blockchain is referred to as mining. Mining involves the use of computers to run hashing algorithms to process the most recent block; the information that a user needs to mine is found in the block's header. The cryptocurrency network sets a target value for this hash — called the target hash — and miners try to determine what this value is by testing out all possible values.
The block header contains the block version number, a timestamp, the hash used in the previous block, the hash of the Merkle Root, the nonce, and the target hash. The block is generated by taking the hash of the block contents, adding a random string of numbers (the nonce), and hashing the block again.
If the hash meets the requirement of the target, then the block is added to the blockchain. Cycling through solutions in order to guess the nonce is referred to as proof of work (PoW), and the miner who is able to find the value is awarded the block and paid in cryptocurrency.
Target Hash for Bitcoin
Bitcoin uses the SHA-256 hash algorithm. This algorithm generates verifiably random numbers in a way that requires a predictable amount of computer processing power.
Mining a block requires the miner to produce a value (a nonce) that, after being hashed (cryptographically encoded), is less than or equal to the one used in the most recent block accepted by the bitcoin network. This number is between 0- (the smallest option) and 256-bits (the largest option) but is unlikely to ever be the maximum number.
Because the target hash could be a huge number, the miner may have to test a large number of values before being successful. An unsuccessful miner has to wait for the next block (which is why miners that find a hash solution are likened to winners of a race or the lottery).
The target hash is adjusted periodically. The hash functions used to generate the new target have specific properties designed to make the blockchain (and its cryptocurrency) secure. This process is deterministic, meaning that it will produce the same result each time the same input is used. It is fast enough so as to not take too long to return a hash for the input. It also makes determining the input very difficult, especially for large numbers, and makes small changes to the input result in a very different hash output.
Bitcoin Mining : Is It Still Profitable?
Breaking down everything you need to know about Bitcoin mining, from blockchain and block rewards to proof of work and mining pools. read more
Block Header (Cryptocurrency)
A block header is the unique identity of a particular block on a blockchain and is hashed by miners for rewards. read more
Blockchain : What You Need to Know
A guide to help you understand what blockchain is and how it can be used by industries. You've probably encountered a definition like this: “blockchain is a distributed, decentralized, public ledger." But blockchain is easier to understand than it sounds. read more
Cryptocurrency : What Is Cryptocurrency?
A cryptocurrency is a digital or virtual currency that uses cryptography and is difficult to counterfeit because of this security feature. read more
Cryptocurrency difficulty is a measure of how difficult it is to mine a block in a blockchain for a particular cryptocurrency. read more
A hash is a function that converts an input of letters and numbers into an encrypted output of a fixed length. read more
Merkle Root (Cryptocurrency)
A Merkle root contains information about every single transaction hash that ever was on a particular block in a blockchain. read more
In blockchain technology, nonce means a number added to a hashed, or encrypted block, that, when rehashed, meets the difficulty level restrictions. Blockchain miners aim to solve the nonce. read more
Proof of Activity
Proof of activity is the blockchain consensus algorithm based on a hybrid approach. read more