Bitcoin VerityOpen comparator

Level 9 · Advanced technical layer

How miners assemble a block

From a node's candidate template through coinbase and merkle root to proof of work and pool shares.

Article
93
Reading time
15 minutes
Reviewed
10 September 2026

In a nutshell

Mining software starts from a valid candidate block: a previous-block reference, transactions, a coinbase and a header commitment. It repeatedly changes available fields and hashes the header until a value meets the network target; pools use easier shares to measure contributed work.

01

A template begins with validation

A mining node selects valid transactions, usually considering fee rate and ancestor packages while respecting weight, sigop and consensus limits. BIP 22's getblocktemplate lets external mining software receive and submit such work.

02

Coinbase commits and pays

The first transaction creates no more subsidy than consensus permits and collects included fees. Its data can vary an extra nonce, and its outputs pay the miner or pool. A witness commitment is also placed there for SegWit blocks.

03

The header is the proof-of-work target

Transactions form a merkle root committed in the 80-byte header beside version, previous hash, time, target and nonce. Changing the nonce, time or coinbase-derived root produces fresh header candidates until one hash is below target.

04

Pools distinguish shares from blocks

A pool gives miners jobs and accepts shares at an easier target to estimate their work. A share is normally not a Bitcoin block. Newer Stratum V2 work aims to improve transport and let miners participate more directly in transaction selection in relevant modes.

Level 9 · Advanced technical layer

Terms to know

Block template
A candidate block and constraints supplied to mining software.
Coinbase transaction
The first transaction, creating permitted subsidy and collecting fees.
Share
A pool proof at an easier target used for accounting work.

Common misconception

Miners solve transactions one by one and the fastest computer approves each payment.

A more accurate explanation

Nodes first validate transactions; miners construct a candidate block and search for proof of work over its header.

A more accurate explanation

Can a miner include any transaction?

It can choose among valid transactions and omit fees, but every full node will reject a block containing a consensus-invalid spend or excess subsidy.

93

Key takeaways

  1. 01A template contains already validated candidates.
  2. 02The coinbase pays subsidy and fees.
  3. 03Proof of work hashes the block header.
  4. 04Pool shares are usually not network-valid blocks.

A child-friendly recap

In very simple terms

A miner selects valid transactions, builds a candidate block and changes numbers in its header. Only a hash below the target turns that candidate into a valid block.

Reviewed: 10 September 2026

Sources and further reading

Sources support particular facts and definitions; listing one does not mean the editors endorse every view of its author.

01
Bitcoin Developer Guide: miningBitcoin Developer Guide
developer.bitcoin.org
02
BIP 22: getblocktemplateBitcoin Improvement Proposals
bips.dev
03
BIP 23: pooled mining extensionsBitcoin Improvement Proposals
bips.dev
04
Stratum V2 specificationStratum V2
stratumprotocol.org

Educational material, not an investment recommendation.