BOMBARCHIVE
Explore

A living reference collection. Written in the wiki, preserved in Git.

The archiveBitcoin

Old revision: BIP 152

Archive BIP 152 compact-block relay with source-controlled chronology and version boundaries

BIP 152, Compact Block Relay, is a Bitcoin peer-to-peer specification by Matt Corallo for transmitting recently mined blocks without needlessly retransmitting transactions that the receiving peer already has. Its assigned date is 27 April 2016. Bitcoin Core first shipped compact block relay in 0.13.0 on 23 August 2016. The maintained BIP is marked Deployed, but that label is distinct from a measurement of use by every peer. Maintained BIP — primary specification · Contemporary release announcement

The bandwidth problem

Before compact blocks, a node that heard a transaction through ordinary relay could receive its full contents again inside a newly mined block. For many full nodes the duplication was substantial: their mempools already contained most block transactions. Relaying a complete block also created a short-lived bandwidth spike that could congest slower connections. The original BIP states bandwidth reduction as the primary goal; faster block propagation is a possible secondary benefit. Motivation · Contemporary Bitcoin Core FAQ

A compact block contains its block header, a nonce, short transaction identifiers and some complete, prefilled transactions. The coinbase transaction is normally prefilled. A receiving node uses its mempool and other recently available transactions to reconstruct the ordered block, asking for any missing transactions. This works particularly well when the peers have been receiving similar transactions and applying similar relay policies. It works less well when their mempools diverge. HeaderAndShortIDs and reconstruction · Core 0.13.0 release notes

Messages and reconstruction

The specification adds four messages and one inventory request type:

  • sendcmpct negotiates compact-block encoding support and whether a peer wants unsolicited compact block announcements.
  • cmpctblock carries a block header, shortened transaction IDs and any prefilled transactions.
  • getblocktxn asks for the transactions a receiver could not reconstruct, by their block positions.
  • blocktxn supplies those missing transactions.
  • MSG_CMPCT_BLOCK is an inventory type used in a getdata request for a compact representation; it is not an ordinary announcement to be placed in an inv list. Message definitions

The 48-bit short IDs are obtained by truncating a SipHash-2-4 result. Its keys are derived by hashing the block header together with a nonce, making the identifiers specific to the advertised block and chosen nonce. The receiver must still identify the correct complete transactions; the abbreviated identifiers are neither stable transaction addresses nor cryptographic proofs that a transaction is valid. Collision handling and missing-transaction retrieval are part of the protocol's engineering. Short-ID calculation and justification

The protocol has two operating modes. Low-bandwidth mode continues to announce blocks with inv or headers, allowing the receiver to request a compact block if needed. High-bandwidth mode sends a compact block announcement without waiting for that request, aiming to reduce latency at the cost of possible duplicate announcements. The BIP recommends reserving high-bandwidth receipt for at most three selected peers; this is a normative recommendation, not proof that all implementations always choose the same peers or policies. Intended flow and implementation notes

A compact block is a transport representation. A fully validating node must still reconstruct the complete block and apply Bitcoin's consensus rules. In high-bandwidth mode the specification permits some relay after header checks but before full transaction validation. This improves propagation speed while requiring careful treatment of unverified announcements; Bitcoin Core 0.14.0 later implemented earlier relay of such announcements. Pre-validation considerations · Contemporary Core announcement

Version 1, version 2 and SegWit

Version 1 calculates short IDs from transaction IDs (txid) and does not carry witness-serialized transactions. Version 2 uses witness transaction IDs (wtxid) and includes witness data in the relayed transactions. These are negotiated message encodings, not Bitcoin block versions or consensus activation numbers. A compatible receiver still has to validate the entire reconstructed block. Version 2 specification

Pieter Wuille's Core PR #8393 introduced SegWit-aware compact blocks and was merged 10 October 2016. The accompanying BIP PR #423 was merged 14 October 2016. That is a useful chronological distinction: the implementation merge preceded the corresponding specification PR merge. Core 0.13.1 shipped the SegWit integration and lists #8393 in its release notes. The later activation of SegWit on mainnet was a separate consensus event. 0.13.1 release notes · Segregated Witness

On 16 May 2022, Bitcoin Core merged PR #20799, dropping version 1 support from its own peer-processing code because that version could not deliver witness data needed for full validation of SegWit blocks. It retained version 2. The change is an implementation history, not a repeal of the old specification text or evidence that every other node implementation instantly followed Core. The next major publicly announced Core release incorporating it was 24.0.1 on 12 December 2022; the 24.0 tag was not itself fully released. Core implementation and rationale · 24.0.1 release notes · Release announcement

The documentary chronology

27 April 2016
The BIP's **assigned date**. The maintained header does not, by itself, authenticate a public repository publication on that day. BIP header
18 May 2016
Core PR #8068 opened with a working implementation, referencing a draft in Corallo's fork. This predates the first identified addition of the BIP file to the maintained bitcoin/bips repository. PR timeline
23 May 2016
Corallo's first identified repository commit added the specification to the BIPs repository. The earlier forked draft mentioned by #8068 remains a separate provenance lead.
7 June 2016
Bitcoin Core published a contemporaneous FAQ describing compact-block experiments and implementation work. It is a first-party statement about development then, not a retrospective deployment survey.
22 June 2016
Core merged #8068, introducing the first compact-block implementation. Merge is distinct from a public binary release.
23 August 2016
**Bitcoin Core 0.13.0** shipped compact block relay, automatically enabled between compatible peers. Its release notes explicitly identified PR #8068 and warned that differences between mempool policies could worsen reconstruction efficiency. Release announcement · Detailed notes
10–14 October 2016
SegWit-aware version 2 merged into Core on **10 October** and its specification PR merged on **14 October**. It then appeared in Core **0.13.1**. Core PR · Specification PR · Release notes
13 January 2017
Core merged PR #9375, permitting earlier high-bandwidth relay before full block connection. Core **0.14.0**, announced **8 March 2017**, shipped the improvement. This was an enhancement of already released compact-block support, not BIP 152's first deployment. Release announcement
16 May 2022
Core merged PR #20799, removing version 1 negotiations from that implementation. Core 24.0.1 later release
12 January 2026
The BIPs repository's administrative metadata update renamed the specification status from **Final** to **Deployed**. This is a document taxonomy change, not a measurement of the network on that date. Metadata commit

What the protocol does not establish

A peer can reconstruct a block quickly because its mempool overlaps with the sender's. That is a prediction about which transactions it knows, not trust in the sender or proof of transaction correctness. Different transaction acceptance policies, unavailable transactions and short-ID collisions can require additional round trips or a full block transfer. Reconstruction and justification

BIP 152 is also distinct from BIP 330. BIP 330 describes reconciliation of which unconfirmed transaction announcements peers possess, whereas BIP 152 describes the recently mined block using transactions already seen. Related bandwidth concerns do not make the two wire protocols interchangeable. BIP 330 · BIP 157 · BIP 158

From the archivist's desk

The Git history has a small surprise. The Core implementation pull request was already open before the BIP appeared in the maintained BIPs repository. The assigned date is earlier still. I initially treated those as likely to describe one publication event; the records instead establish several. The sensible history keeps the draft, the repository addition, the implementation merge and the binary release on their own dates.

The design itself also explains why what a node already knows matters so much to bandwidth. Two honest nodes can reconstruct the same valid block at different speeds because they remember different unconfirmed transactions.

Open questions

Open question
Recover and date Corallo's forked draft referenced in the 18 May 2016 Core PR, and compare it with the BIPs repository's 23 May addition. Do not infer the original public draft's exact publication time from the BIP's assigned date.
Open question
Find dated, reproducible measurements of compact-block reconstruction success and missing-transaction round trips across differing relay policies. The BIP's contemporary experimental estimates are not automatically present-day network measurements.
Open question
Document adoption and version-negotiation behavior in non-Core implementations from their versioned source and release histories, rather than generalizing from Core's 2022 removal of version 1.