225 / 691TARGET

Mining Target

Numerical threshold for proof of work

Mining Target is the threshold used to compare a header hash. Distinguish the number itself, its compact nBits encoding and the target actually required by the rules for that block.

Mining Target is a nonnegative numerical threshold for the header hash in proof-of-work verification. A valid network target must be positive and permitted by the rules; the hash must not exceed it. A lower target makes the search harder.

Bitcoin Core v29.0 rejects a hash greater than the derived target in its proof-of-work check. The condition is therefore hash ≤ target, not strictly less than. It compares the numerical hash of the complete header, not the nonce alone. [Bitcoin Core v29.0 — Proof-of-work checks]

Different numerical hashes can have the same number of leading zeros. The remaining digits and their numerical value relative to the target also matter. Zeros illustrate rarity but do not replace the full hash ≤ target comparison. [Bitcoin Core v29.0 — Proof-of-work checks]

The nBits field has 32 bits, whereas the target is interpreted in a 256-bit space. The encoding contains an exponent and a coefficient with a sign bit. For example, 0x04123456 decodes to 0x12345600; this illustrates encoding, not the network target currently required. [Bitcoin Core v29.0 — Compact arithmetic]

In the 80-byte header, nBits is serialized as four little-endian bytes. The numerical notation 0x1d00ffff therefore corresponds to ff ff 00 1d. Do not confuse byte order when reading data with the digit order of a displayed number. [Bitcoin Developer Reference — Block headers and nBits]

DeriveTarget in Bitcoin Core v29.0 rejects negative targets, zero, overflow and values above the network’s powLimit. Arbitrarily increasing the number in nBits is therefore insufficient. Successfully unpacking the compact representation does not establish target validity. [Bitcoin Core v29.0 — Proof-of-work checks]

Contextual validation compares nBits with GetNextWorkRequired for the previous block and network rules. A mismatch produces bad-diffbits. Even a hash below a self-selected easier target does not excuse an incorrect nBits value in the header. [Bitcoin Core v29.0 — Contextual and block validation]

For a uniform 256-bit hash model and permitted target T, the per-attempt probability is p = (T + 1) / 2^256: values from zero through T are accepted. This is a derivation from the comparison rule; the target alone specifies neither hashrate nor the exact time of the next block. [Bitcoin Core v29.0 — Proof-of-work checks]

Beyond the header, Bitcoin Core checks the transaction root, coinbase, block limits and transaction validity. Meeting the correct target is necessary but does not replace those checks. A low hash cannot repair invalid block contents. [Bitcoin Core v29.0 — Contextual and block validation]

For the clearest picture, read this entry together with Share Difficulty, Proof of Work, Nonce, Block header. The reverse links also lead from Nonce, Mining Share, Share Difficulty.

DOC · 001Bitcoin Core v29.0 — Proof-of-work checksPrimaryDOC · 002Bitcoin Developer Reference — Block headers and nBitsDocumentationDOC · 003Bitcoin Core v29.0 — Compact arithmeticPrimaryDOC · 004Bitcoin Core v29.0 — Contextual and block validationPrimary
Source-first · No investment advice