This guide explains Bitcoin compact block reconstruction in plain English. It focuses on what the subject is, why it matters and what a beginner should remember.
TL;DR
- What it is: Bitcoin Core 0.13.0 implemented BIP 152 compact block relay, allowing a receiver to reconstruct a new block from short transaction identifiers and transactions already in its mempool. If entries are missing or collide, the receiver requests them before validation.
- Why it matters: Compact blocks reduce relay cost by reusing the receiver’s mempool, but mining value depends on reconstruction speed and reliable fallback. Monitor the full announcement-to-valid-tip path across diverse peers.
- Current position: Historical testing must include those fixes rather than assume the first implementation was final.
Bitcoin compact block reconstruction in simple English
Bitcoin compact block reconstruction: Record announcement source, mode, block size and weight, local mempool overlap, missing count, request latency, reconstruction duration, validation completion and tip activation.
Simple example
A node operator is checking Bitcoin compact block reconstruction. When reconstruction is incomplete, getblocktxn requests missing positions and blocktxn supplies the corresponding transactions. BIP 152 defines modes influencing whether compact announcements arrive directly or after headers.
Key terms in plain English
- BIP:
- Bitcoin Improvement Proposal: a document describing a proposed rule, standard or process. Its status must be checked separately.
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Compact message contents
A compact block carries the header, a nonce, short identifiers for most transactions and selected prefilled transactions such as coinbase. The identifiers are keyed per block and deliberately short. They save bandwidth but are not collision-free transaction hashes and cannot replace full validation.
Local reconstruction
The receiver maps short identifiers against its mempool and other available transactions, places unambiguous matches and identifies gaps. Success depends on having much of the sender’s transaction set. Different relay policy, recent restart, partition or private transactions increase missing entries.
Recovery round trip
When reconstruction is incomplete, getblocktxn requests missing positions and blocktxn supplies the corresponding transactions. The completed block is then validated normally. Monitor the extra round trip, requested count and total time; a fallback is expected behaviour, but persistent excess indicates policy or connectivity divergence.
High-bandwidth mode
BIP 152 defines modes influencing whether compact announcements arrive directly or after headers. A node should maintain a small, diverse set of useful high-bandwidth peers rather than enable every connection. Version-specific peer-selection logic and denial-of-service protections must be traced before tuning.
Mining-policy alignment
The 0.13.0 notes observed that blocks containing transactions discouraged by the receiver’s policy reconstruct more slowly. A miner benefits when template policy broadly matches relay peers, but must not turn policy into cartel enforcement. Measure missing sets and stale outcomes across diverse routes.
How specialists test it
Developers test the proposal with made-up data on an isolated test network. They check normal cases and deliberately invalid cases. Different implementations should reach the same result before anyone relies on the proposal.
Monitoring design
Record announcement source, mode, block size and weight, local mempool overlap, missing count, request latency, reconstruction duration, validation completion and tip activation. Aggregate without exposing private topology. Alert on sustained changes relative to full-block and alternate compact peers.
Frequently asked questions
What is the main point of Bitcoin compact block reconstruction?
Bitcoin compact block reconstruction: Record announcement source, mode, block size and weight, local mempool overlap, missing count, request latency, reconstruction duration, validation completion and tip activation.
For Bitcoin compact block reconstruction, what should a beginner know about compact message contents?
A compact block carries the header, a nonce, short identifiers for most transactions and selected prefilled transactions such as coinbase.
For Bitcoin compact block reconstruction, what should a beginner know about local reconstruction?
The receiver maps short identifiers against its mempool and other available transactions, places unambiguous matches and identifies gaps.
For Bitcoin compact block reconstruction, what should a beginner know about recovery round trip?
When reconstruction is incomplete, getblocktxn requests missing positions and blocktxn supplies the corresponding transactions.
Conclusion
Compact blocks reduce relay cost by reusing the receiver’s mempool, but mining value depends on reconstruction speed and reliable fallback. Monitor the full announcement-to-valid-tip path across diverse peers.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.