Passer au contenu

Bitcoin accepté au paiement  |  Expédié depuis Laval, QC, Canada  |  Soutien expert depuis 2016

getblocktemplate (GBT)

Network & Protocol

Definition

getblocktemplate, abbreviated GBT, is the Bitcoin Core RPC method that returns everything a miner needs to construct a candidate block. It was standardized in BIP 22 and extended by BIP 23, replacing the older getwork protocol, and its design encodes a principle that still shapes mining politics today: decentralization of block construction. Instead of a pool handing the miner a finished header to grind, GBT hands over the raw ingredients, transactions, rules, and constraints, and lets the mining node assemble the block itself.

What the template contains

A GBT response includes the block version and the active soft-fork rules the block must honor, the previous block hash, a candidate transaction list with each transaction's fee and dependency information, the total coinbase value the miner may claim, the hash target and encoded difficulty bits, the block height, timestamp constraints, size and weight limits, and, for SegWit blocks, the witness commitment that must be embedded. With these fields a miner builds its own coinbase transaction paying an address it controls, computes the merkle root over its chosen transaction set, fills in the 80-byte header, and begins hashing. BIP 23 added a proposal mode, letting a miner submit a fully formed candidate back to the node for validation before committing hashrate to it, plus long-polling so the node can push notice of a new chain tip instead of waiting to be asked.

Why pools moved to Stratum anyway

GBT's virtue is also its cost. A full template with a complete transaction set is large, and re-sending it to thousands of connections every time the mempool shifts is heavy in bandwidth and latency, and in mining, latency is money. The original Stratum protocol won pool mining by inverting the model: the pool builds the template once, and each mining.notify job it distributes carries only the compact pieces a machine needs, the coinbase halves, a merkle branch, and header fields. The efficiency was undeniable. The price was that transaction selection moved from thousands of miners to a handful of pool operators, concentrating exactly the power GBT was designed to distribute, including the ability to exclude transactions.

GBT's decentralization successors

The current generation of protocols works to recover GBT's property without giving up Stratum's efficiency. In Stratum V2, a miner can run its own Template Provider, a node building templates locally via the Template Distribution Protocol, and negotiate its own transaction set with the pool through the Job Declaration Protocol, keeping pooled payouts while returning template authority to the individual operator. In parallel, DATUM, developed by Ocean, pursues the same goal along GBT's philosophical line: each miner's gateway builds blocks from its own local node's view. Different wire protocols, same thesis, the one GBT wrote down in 2012: whoever chooses the transactions holds the censorship pen, and that pen belongs in as many hands as possible.

Where you meet GBT today

GBT remains the standard interface between a node and whatever mining software sits above it. Solo miners hash against it directly, pool infrastructure consumes it upstream of every job it distributes, and home devices pointed at a personal node use it to mine truly self-sovereign blocks. For the structured output that GBT ultimately helps a miner assemble, see block template.

GBT does have practical limits worth knowing. It is a local RPC interface, unauthenticated beyond node credentials and never designed to be exposed across the open internet, which is why home miners typically place lightweight gateway software between their ASICs (which speak Stratum) and the node (which speaks GBT), translating one into the other. That small translation layer is what makes true self-sovereign mining, your node, your templates, your transaction selection, practical on off-the-shelf hardware pointed at a machine in your own house.

In Simple Terms

getblocktemplate, abbreviated GBT, is the Bitcoin Core RPC method that returns everything a miner needs to construct a candidate block. It was standardized in BIP 22…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Glossaire du minage

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Comparer les mineurs