---
title: "Compact Blocks — definition | Nuri Glossary"
description: "Sending short transaction IDs instead of full blocks, letting peers rebuild the block from their mempool."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/compact-blocks"
---

# Compact Blocks

Sending short transaction IDs instead of full blocks, letting peers rebuild the block from their mempool.

## Basically

Compact blocks let Bitcoin nodes share new blocks without sending the same transactions twice. Nodes send short transaction labels and use far less data.

## Key Takeaways

- Compact blocks (BIP 152) cut block propagation bandwidth by approximately 97%. Nodes send a compact sketch with short 6-byte transaction IDs instead of full blocks, and receiving nodes reconstruct each block from their mempool.
- High-bandwidth mode reduces latency by sending compact blocks immediately after header validation. Low-bandwidth mode saves data by waiting for a peer to request the block.
- Compact blocks cut block relay from more than 30 seconds to under 5 seconds. Faster propagation lowers orphan rates to well below 0.1% and helps smaller miners compete on equal footing with large pools, reducing mining centralisation pressure.

## What Are Compact Blocks?

Compact blocks are a Bitcoin peer-to-peer protocol optimisation defined in BIP 152. They cut the bandwidth needed to spread new blocks because most nodes already hold most of a new block's transactions in their mempool when a miner finds it. Nodes send short transaction identifiers instead of repeating those transactions, so the receiving node can reconstruct the full block locally.
Matt Corallo authored compact blocks to tackle slow block propagation, one of Bitcoin's most pressing scaling challenges. Bitcoin Core v0.13.0 first deployed them in August 2016, after full-block relay across the global network could take 30 to 60 seconds. These delays caused orphan races, wasted miner resources and gave large mining operations with optimised infrastructure a structural advantage over smaller participants.

## How It Works

Compact block relay adds four message types to the Bitcoin P2P protocol: sendcmpct, cmpctblock, getblocktxn and blocktxn. Together, these messages replace the traditional full-block download with a lightweight sketch-and-reconstruct flow.
Senders can prefill up to 6 predicted-missing transactions beyond the coinbase, allowing over 90% of blocks to propagate in a single round trip with no missing transactions in practice. A typical 1 MB block becomes roughly 20 to 30 KB of compact sketch data.

## Short Transaction IDs

The 6-byte short IDs provide the main space saving. SipHash-2-4, a fast, collision-resistant keyed hash function, computes each ID.
The block header forms part of the key derivation, so nobody can predict short IDs before the block is mined. A per-connection nonce gives each peer relationship independent short IDs, which prevents even the block creator from engineering collisions across the network. With 48-bit IDs, a block with 10,000 transactions and a mempool of 100,000 transactions has a collision probability of approximately 1 in 281,474 blocks.

## High-Bandwidth vs. Low-Bandwidth Mode

BIP 152 defines two relay modes so nodes can balance latency against bandwidth use. High-bandwidth mode sends compact blocks immediately after header validation, while low-bandwidth mode waits for a peer to request the block.
Bitcoin Core nodes choose up to 3 peers for high-bandwidth mode to get the fastest block awareness with low latency. All other peers use low-bandwidth mode to conserve resources.

## Version 1 and Version 2

BIP 152 specifies two protocol versions: version 1 used the txid for short ID computation, while version 2 uses the wtxid (witness transaction ID). Version 2 arrived alongside SegWit (BIP 141) so witness data is included in the compact block flow. Version 1 became obsolete when SegWit activated in August 2017; Bitcoin Core v22.0 (2021) removed version 1 support entirely, and all current nodes use version 2 exclusively.

## Why It Matters

Block propagation speed directly affects network security and decentralisation. Slow delivery can let multiple miners find valid blocks at similar heights, causing orphan races. The miner whose block propagates faster wins more often, which encourages centralisation around large pools with optimised infrastructure.
Before compact blocks, stale block rates were estimated at 1 to 2% of all blocks. Compact blocks cut propagation across the global network to under 5 seconds, and stale rates have dropped to well below 0.1%. Smaller miners and solo operators benefit disproportionately because their blocks now propagate nearly as fast as those from large pools, making the network more resilient against mining centralisation.
Layer-2 protocols like the Lightning Network and Spark rely on fast, reliable block propagation. They need timely on-chain confirmations for channel opens, closes and dispute resolution. Compact blocks help keep the base layer responsive enough to support the growing ecosystem built on top of it.

## Mining Operations

Miners benefit most from compact blocks. Every second of propagation delay raises the risk that a competing block at the same height arrives first and makes their work worthless. Cutting propagation from tens of seconds to a few seconds reduces orphan risk and makes mining economics more predictable.

## Bandwidth-Constrained Nodes

Full nodes on residential connections, VPSes with transfer caps, or in regions with limited bandwidth benefit substantially from the 97% reduction in block relay data. Running a full node becomes more accessible, which strengthens network decentralisation.

## Network Resilience

Compact blocks complement other propagation improvements to form a layered defence against network partitions and eclipse attacks. Matt Corallo also created the FIBRE (Fast Internet Bitcoin Relay Engine) protocol, which built on compact blocks by adding UDP transport and forward error correction for near-speed-of-light relay between mining pools.

## Transaction Relay Synergy

Compact blocks complement Erlay (BIP 330), a proposed transaction relay improvement that uses set reconciliation to cut bandwidth by approximately 40%. Compact blocks optimise block propagation but depend on consistent mempools between peers. Erlay maintains that consistency more efficiently, so nodes can sustain more peer connections without proportional bandwidth increases.

## Mempool Divergence

Compact blocks work best when peers hold similar mempool contents. Extreme congestion, non-standard transaction policies or mempool eviction can leave nodes with significantly different transaction sets, causing reconstruction to fail more often and requiring extra round trips for missing transactions. These extra trips partly negate the latency benefits, and reconstruction success rates can drop below 50% in severe cases.

## Short ID Collisions

Short ID collisions are rare, at approximately 1 in 281,474 blocks, but they can cause reconstruction failures. A node detects a collision through a Merkle root mismatch and falls back to requesting the full block. The fallback adds latency but degrades gracefully rather than creating a security risk.

## Historical Vulnerability: CVE-2024-35202

Researcher Niklas Gogge discovered a vulnerability in compact block reconstruction logic in 2022. A short ID collision could trigger reconstruction failure, and a second blocktxn message for the same block could then crash the node by violating an assertion; an attacker could trigger this remotely with crafted block responses. Developers merged the fix in January 2023, released it in Bitcoin Core v25.0 and publicly disclosed it in October 2024, highlighting the need for defensive coding in protocol-level optimisations.

## Does Not Replace Full Validation

Compact blocks accelerate block delivery, not block validation, and every node still fully validates each reconstructed block against all consensus rules. High-bandwidth mode forwards a compact block before full validation, so a node may occasionally relay an invalid compact block. Receiving nodes validate independently and discard invalid blocks, making this harmless; the protocol explicitly stopped penalising peers for sending invalid compact blocks as of protocol version 70015.
The glossary entry provides information only and is not financial or investment advice. You should always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
