TERM_DEF // MINING / CANDIDATE_BLOCK
CANDIDATE
BLOCK
BLOCK
block/">Candidate Block. A block-template assembled by a miner but not yet found a valid PoW.
This page sits in the Mining section — The energy-secured lottery: ASICs, difficulty, halvings, and the economics of block production. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
This page sits in the Mining section — The energy-secured lottery: ASICs, difficulty, halvings, and the economics of block production. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
WHAT_CANDIDATE_BLOCK_IS
Candidate Block — at a glance
MINING
Candidate Block is part of how Bitcoin reaches global agreement on history without trusting any single party. A block-template assembled by a miner but not yet found a valid PoW. Mining is Bitcoin's clock, its security budget, its issuance mechanism, and its censorship-resistance guarantee, all wrapped into one elegant feedback loop.
Why it exists
DESIGN
Before Bitcoin, every digital cash proposal failed at one of two questions: who decides which transactions are valid, and who decides the order in which they happened? Trusted servers solve both — and then become the single point of failure. Proof-of-work answers the same questions without trust: whoever has burned the most electricity has the loudest, costliest vote in the current block, and the chain with the most cumulative work is the canonical one. Candidate Block is one of the gears in that mechanism.
HOW_IT_WORKS
Mechanism
HOW IT WORKS
Miners batch unconfirmed transactions from the mempool into a candidate block. They then hash the 80-byte block header over and over, changing the 4-byte nonce (and, when exhausted, the coinbase extra-nonce) until the resulting double-SHA-256 hash falls below the current target. A valid hash is announced to the network in milliseconds; every node re-verifies it in microseconds. The honest miner earns the block subsidy plus all fees. The next block builds on this one, locking it in by hash. After ~6 confirmations, reversing it would require redoing more proof-of-work than the entire honest network can produce — practically impossible.
1. Collect unconfirmed transactions from the mempool, prioritising by fee-per-vbyte.
2. Assemble the candidate block — build the merkle root over all included transactions plus a coinbase tx that pays the miner.
3. Loop: set the nonce in the header, compute SHA256(SHA256(header)), compare against the target.
4. If hash < target → block is valid. Broadcast it to peers within milliseconds.
5. Every full node re-verifies in microseconds; the block is added to each node's chain.
6. The next miner starts the loop again, using this block's hash as their "previous block hash".
WORKED_EXAMPLE
Block 840,000 — the 2024 halving block
EXAMPLE
height : 840,000
hash : 00000000000000000003c93a3... (19 leading zero bits)
prev_hash : 0000000000000000000... ← chains to block 839,999
merkle_root : abc123... (commits to 3,050 txs)
time : 2024-04-20 00:09 UTC
bits (target): 17034219 (compact encoding)
nonce : 4294967295 (the magic number found)
subsidy : 6.25 → 3.125 BTC (halved here)
fees : ~37.6 BTC (unusual — Runes launch)
total reward : 40.7 BTC to the winning miner
Search space : 2⁹⁶ possible (nonce, extra-nonce, time) tuples
Hashes/second : ~600 EH/s globally in 2024
Expected time : 10 minutes by design (difficulty retargets every 2,016 blocks)
KEY_PROPERTIES
BLOCK INTERVAL
Target ~10 minutes per block, maintained by automatic difficulty retargeting every 2,016 blocks (~2 weeks).
HONEST INCENTIVE
Honest miners earn the subsidy + fees. Attackers burn the same electricity but win nothing.
ENERGY = SECURITY
Every joule spent mining raises the cost of rewriting history. As of 2024 that cost is hundreds of millions of dollars per day.
LONGEST CHAIN
Nodes always follow the chain with the most cumulative proof-of-work. Forks resolve themselves within a block or two.
COMMON_PITFALLS
Things that catch people out
PITFALLS
- Hashrate is not the same as winning probability for a single miner — variance is huge unless you mine in a pool.
- The "51% attack" cannot create coins out of thin air; it can only reorganise recent history and double-spend the attacker's own coins.
- "Solo mining" with a single CPU/GPU in 2024 has a vanishing probability of ever finding a block — ASICs dominate the hashrate by ~9 orders of magnitude.
RELATED_CONCEPTS
Other terms from Mining — click any to read its page:
TERMINOLOGY_INDEX
TERMINOLOGY
Candidate Block
A block-template assembled by a miner but not yet found a valid PoW.
Mining
Repeatedly hashing block headers until you find one whose hash is below the target.
Proof of Work
A scheme where producing a valid block requires demonstrably expending energy.
Hashrate
Number of header hashes attempted per second across the network — currently exahashes per second.
Hash Power
Same as hashrate; a measure of mining capacity.
Difficulty
A scaled inverse of the target; the difficulty-1 target corresponds to the highest threshold ever used.
Difficulty Adjustment
Every 2016 blocks, the target is rescaled so the next epoch averages 10-minute blocks.
Retarget Period (2016 blocks)
The block interval over which difficulty is recalculated, ≈ two weeks.