Compact Blocks in Bitcoin: How BIP-152 Speeds Up Relay
Bitcoin nodes transmit new blocks across the globe in milliseconds by sending 6-byte short transaction identifiers instead of full transactions, using pre-validated mempools to suppress orphan rates and prevent mining centralization.
Key points
- BIP-152 reduces block relay data by over 95% by sending 6-byte short IDs instead of full transaction records.
- Nodes reconstruct blocks using pre-validated transactions already sitting in their local mempools.
- High-bandwidth mode eliminates an entire network round-trip, allowing nodes to push compact blocks immediately.
- Faster propagation suppresses stale and orphan block rates, eliminating unfair latency advantages for large miners.
Live Prediction Odds (Polymarket)
All Crypto Odds →Bitcoin nodes do not transmit megabytes of raw transaction data every time a miner finds a block. Instead, they use an optimization known as Compact Blocks (standardized under Bitcoin Improvement Proposal 152, or BIP-152) to announce new blocks using lightweight sketches that point to transactions the receiving node already holds.
Because healthy nodes maintain a continuous, peer-to-peer stream of unconfirmed transactions, sending an entire 1-megabyte to 4-megabyte block across the network is largely redundant. By transmitting only short identifiers, BIP-152 cuts block propagation times from seconds to fractions of a second, materially lowering the rate of accidental blockchain splits.
The Block Propagation Bottleneck
When a miner discovers a valid proof-of-work, it must distribute the completed block to the rest of the network as quickly as possible. Every second of delay puts that miner—and every other miner that has not yet heard about the new block—at a competitive disadvantage.
In the original Bitcoin protocol design, a node that received a newly mined block announced it to its peers with an inv (inventory) message. The peer replied with a getdata request, prompting the sender to transmit the full, serialized block across the wire. This legacy approach created two structural problems: high bandwidth consumption and network latency.
If two miners discover valid blocks at roughly the same height within seconds of each other, the network temporarily diverges into competing branches. Nodes eventually follow the branch that accumulates the most proof-of-work, leaving the other block abandoned as an orphan block (or stale block). The miner who solved the abandoned block receives zero transaction fees and zero block subsidies for their electrical expense. Prior to modern propagation improvements, larger mining operations with dedicated low-latency peering held an unfair advantage over smaller, geographically isolated miners.
The Role of the Local Mempool
To understand why full blocks are redundant, one must examine the transaction lifecycle. When a user submits a transfer of $BTC to the network, nodes do not wait for a block to be mined before examining it. They validate the signature, check the input references, and store the unconfirmed transaction in an internal holding area called the mempool.
By the time a miner packages transactions into a candidate block, the vast majority of those transactions have already traversed the network. Nodes have already downloaded, parsed, verified, and stored them in memory. In an unoptimized system, transmitting a block means sending thousands of transactions across a connection twice: first as isolated transactions during mempool gossip, and second as a bundled package inside the completed block. Nodes looking to understand this local staging can review how unconfirmed transactions work in the Bitcoin mempool.
BIP-152 takes advantage of this state synchronization. If Node A and Node B already share 99% of the same valid transactions in their respective mempools, Node A only needs to tell Node B the precise ordering of those transactions to construct the block.
How BIP-152 Works: Short Transaction IDs
A full Bitcoin transaction identifier is a 32-byte hash computed via double-SHA-256. If a block contains 2,500 transactions, merely transmitting standard transaction IDs would require 80,000 bytes, plus the block header and index overhead.
BIP-152 compresses this payload by deriving a 6-byte short transaction ID (short ID) for each transaction in the block. To prevent an adversary from deliberately generating hash collisions that confuse receiving nodes, the calculation incorporates an ephemeral salt:
- The sending node takes the 80-byte block header and appends a single 8-byte nonce chosen for that transmission.
- The node runs a single SHA-256 hash over this combined 88-byte data structure, producing a 32-byte digest.
- The first 16 bytes of this digest serve as an ad-hoc key for SipHash-2-4, a fast, cryptographically secure short-input hashing algorithm.
- Every transaction identifier in the block is run through SipHash-2-4 with that key, and the node truncates the output to just the first 6 bytes (48 bits).
The transmitting node then sends a cmpctblock message containing the 80-byte header, the 8-byte nonce, the full Coinbase transaction (which cannot exist in the mempool beforehand because it generates new currency and claims fees), and an ordered list of these 6-byte short IDs.
Reconstructing the Block
When the receiving peer receives the cmpctblock message, it performs the reverse operation using its own local mempool:
- It validates the 80-byte header to verify proof-of-work meets the target difficulty.
- It computes the SipHash key using the block header and the sender's nonce.
- It hashes every transaction ID currently held in its local mempool using that SipHash key, mapping out its own list of 6-byte identifiers.
- It matches its local short IDs against the ordered list provided in the compact block sketch.
If the receiving node locates every single short ID in its mempool, it instantly reconstructs the complete block, writes it to its database, adjusts the chain tip, and begins validating the state changes. No additional round-trips or transaction downloads take place.
If any transaction is missing—perhaps because a miner included a zero-fee transaction that did not meet the node's relay threshold, or a transaction originated private to the miner—the receiver issues a getblocktxn message requesting only the specific missing indices. The sender replies with a blocktxn message containing just those missing full transactions. Once those arrive, reconstruction finishes.
High-Bandwidth vs. Low-Bandwidth Modes
BIP-152 specifies two operational modes to accommodate different network environments: low-bandwidth mode and high-bandwidth mode.
In low-bandwidth mode, the protocol follows an announcement-and-request pattern. Node A tells Node B that a new block exists by sending a lightweight announcement. If Node B has not received that block from another peer, it responds by requesting a compact block. This mode avoids sending duplicate block data across multiple connections, conserving bandwidth for constrained nodes.
In high-bandwidth mode, Node B explicitly instructs a select subset of its highest-quality peers (typically up to three) to skip the announcement phase entirely. When one of those peers validates a new block, it pushes the full cmpctblock message to Node B immediately, without waiting for a request. While this consumes slightly more bandwidth if multiple peers push the same compact block simultaneously, it eliminates an entire round-trip network hop (one round-trip time, or RTT). For mining pools and core routing nodes, saving 50 to 100 milliseconds across transoceanic fiber links significantly reduces orphan risk.
A Worked Example: The Bandwidth Math
To see the efficiency gains in practice, consider a standard block under realistic network conditions.
Assume a miner produces a block containing 2,500 transactions, totaling an uncompressed raw size of 1.5 megabytes (1,500,000 bytes). The receiver's mempool is well-synchronized, missing only three of the transactions selected by the miner.
In legacy block transfer:
- The sender announces the block.
- The receiver requests the block.
- The sender transmits the full 1,500,000 bytes.
- Total data sent to communicate block contents: 1,500,000 bytes.
Under BIP-152 Compact Blocks:
- Block header: 80 bytes.
- Ephemeral nonce: 8 bytes.
- Short transaction IDs: 2,500 transactions multiplied by 6 bytes per short ID = 15,000 bytes.
- Full Coinbase transaction: approximately 250 bytes.
- Compact block structure overhead: approximately 40 bytes.
- Initial message payload: 15,378 bytes.
The receiver identifies three missing transactions. It sends a getblocktxn request containing the indices of those three transactions (roughly 10 bytes). The sender returns the three full transactions, averaging 500 bytes each, inside a blocktxn message (roughly 1,500 bytes).
Total data exchanged to deliver the block:
- Initial compact block: 15,378 bytes
- Missing transaction request and response: ~1,510 bytes
- Total: ~16,888 bytes
By leveraging the receiver's local mempool, the data transmitted over the wire drops from 1,500,000 bytes to under 17,000 bytes—a bandwidth reduction exceeding 98%. More importantly, the transfer requires only a single TCP burst in most instances, bypassing network congestion limits.
Common Misconceptions
Misconception 1: Compact Blocks make the Bitcoin block size limit larger. Compact Blocks change how nodes communicate with each other across the peer-to-peer network; they do not alter consensus rules. The underlying consensus constraint, which caps maximum block weight at 4,000,000 weight units (introduced via Segregated Witness), remains unchanged. A block reconstructed from a compact message must still satisfy all consensus checks, script validations, and size boundaries.
Misconception 2: 6-byte short transaction IDs create a high risk of transaction confusion. Because 6 bytes provide 48 bits of entropy (over 281 trillion possible values), the chance of an accidental collision within a pool of 50,000 mempool transactions is negligible. Furthermore, because the SipHash key is generated uniquely for every block and every peer using a fresh nonce, an attacker cannot pre-calculate transactions to force a collision.
Misconception 3: Compact Blocks validate transactions faster. BIP-152 speeds up data relay, not execution or signature verification. The computational work required to verify ECDSA and Schnorr signatures is performed in advance while transactions sit in the mempool. If a compact block includes transactions the node has not yet verified, it must still run standard cryptographic checks on those specific transactions before accepting the block.
How This Connects to the Market
Block propagation efficiency is not merely an engineering concern; it directly protects Bitcoin's security economics and decentralization.
When block relay is slow, large mining operations cluster in shared physical data centers or coordinate across private relays to minimize transmission latency among themselves. A mining pool controlling 30% of network hashrate that receives its own blocks instantly has a measurable advantage over an independent miner across the world who receives blocks three seconds later. That three-second window represents "wasted work," during which the isolated miner burns electricity hashing on a block template that has already been superseded.
By slashing propagation time to hundreds of milliseconds worldwide, BIP-152 flattens the playing field between institutional mining operations and independent node operators. It suppresses orphan rates to fractional percentages of historical levels, preserving proof-of-work fairness without requiring trusted, centralized routing backbones.
Questions this story raises
- What happens if a node receives a short transaction ID that does not match its mempool?
- The receiving node sends a getblocktxn message asking the peer to return only the missing transactions by index. The peer answers with a blocktxn message containing just those records.
- Can an attacker force a transaction collision with 6-byte short IDs?
- No. The short IDs use SipHash-2-4 keyed with a fresh salt derived from the block header and a unique random nonce. An attacker cannot pre-calculate collisions in advance.
- Does BIP-152 replace the FIBRE mining network?
- No. BIP-152 operates at the native peer-to-peer protocol level for all full nodes. FIBRE was a specialized, low-latency relay network using custom UDP protocols primarily designed for mining pools.
- Do compact blocks lower transaction confirmation fees?
- They do not alter fee market dynamics directly, but they reduce bandwidth consumption for node runners and ensure smaller miners compete on equal terms regarding relay speed.
References
- [1] Bitcoin Core Documentation: Protocol Messages — Bitcoin Core Developers
- [2] Bitcoin Improvement Proposal 141: Segregated Witness — Bitcoin Improvement Proposals
- [3] BIP 152: Compact Block Relay — Bitcoin Improvement Proposals
Evergreen explainer written by Basis Desk's system and checked by an independent model pass for factual errors and advice language. Figures, fees and rules change — the references above are where to verify current specifics. Market figures marked "at the time of writing" come from live exchange data. Report an error: corrections@basisdesk.news · corrections policy.
The Daily Brief, in your inbox at 07:00 ET
Five stories, the numbers that moved, what to watch. Three minutes. No hype, no advice, unsubscribe in one click.
Get the big crypto stories first
A few alerts a day at most: major breaking news and the morning brief. Switch off anytime.
Not financial advice. Basis Desk publishes information, not recommendations. Crypto assets are volatile and you can lose what you invest.