Definition
Block template construction is the process of assembling a candidate block for miners to work on: choosing which transactions to include, building the coinbase, computing the Merkle root, and packaging the header fields. In a sovereign setup a node produces this template itself - historically through the getblocktemplate RPC - rather than trusting a third party to decide a block's contents.
Transaction selection
The builder orders mempool transactions by fee rate - fee per unit of block weight - and packs them in descending order until the weight limit is reached, which myopically maximizes fee revenue. Dependency handling complicates this: a low-fee parent may need to be bundled with a high-fee child (child-pays-for-parent), so builders evaluate ancestor and descendant fee rates rather than each transaction in isolation.
Coinbase and Merkle root
The first transaction is always the coinbase, which claims the block subsidy plus the total fees and carries arbitrary data including the extranonce. All transaction IDs, coinbase first, are paired and double-SHA-256 hashed up the Merkle tree to a single root that goes in the header. Because the coinbase holds the extranonce, changing it regenerates the Merkle root and hands the miner a fresh batch of headers to grind.
Why it matters for decentralization
Who builds the template decides which transactions get mined. When pools build templates centrally, that selection power concentrates; protocols and node policies that let individual miners construct their own templates push that power back toward the edge.
This process feeds the work formats described in our Stratum Mining Protocol (v1) and Nonce Space entries.
In Simple Terms
Block template construction is the process of assembling a candidate block for miners to work on: choosing which transactions to include, building the coinbase, computing…
