Block Template

A block template is the draft block data miners use to build and test candidate blocks in proof-of-work mining.

3 min read
mining

Definition

A block template is a draft block that a miner can use as the starting point for mining. It includes the previous block reference, selected transactions, the reward transaction, and the current difficulty target.

In simple terms, it is the work package that says, “try mining this block.”

How It Works

A full node or mining pool prepares a block template from the current network state. It starts with the latest valid block, then chooses transactions from the mempool, where unconfirmed transactions wait.

The template also includes a coinbase transaction. This special transaction creates the block subsidy and pays fees to the miner or pool. Because it can be adjusted, miners use it to create more block variations.

Once the transactions are chosen, they are summarized into a Merkle root. That Merkle root becomes part of the block header, along with the previous block hash, timestamp, difficulty target, and nonce field.

Mining hardware does not usually hash the full block. Instead, it hashes many versions of the block header. The miner changes fields such as the nonce, timestamp, or coinbase data to produce new hashes. If one hash is below the target, the candidate block can be submitted.

In pool mining, the pool commonly builds the template and sends miners smaller jobs through the Stratum Protocol. Newer approaches, including Stratum V2, aim to give miners more say in template construction.

Why It Matters

Block templates matter because they decide what miners are trying to confirm. A template affects which transactions get included, how much fee revenue is available, and how quickly miners can react when a new block appears.

For miners, fresh templates reduce wasted work. If a miner keeps hashing an old template after the chain tip changes, that work is unlikely to produce an accepted block. Fast updates matter most for large farms and pools.

Template control also matters for decentralization. When only pools choose templates, individual miners may have little influence over transaction selection. More miner-controlled templates can reduce trust in the pool operator.