<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=Compact_blocks</id>
	<title>Compact blocks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=Compact_blocks"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Compact_blocks&amp;action=history"/>
	<updated>2026-09-13T03:28:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Compact_blocks&amp;diff=71302&amp;oldid=prev</id>
		<title>NotATether: Create Compact blocks stub: BIP152 short-ID relay; v1 txid / v2 wtxid; high- vs low-bandwidth; link SegWit/Mempool/Bitcoin Core/Full node</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Compact_blocks&amp;diff=71302&amp;oldid=prev"/>
		<updated>2026-09-12T20:30:23Z</updated>

		<summary type="html">&lt;p&gt;Create Compact blocks stub: BIP152 short-ID relay; v1 txid / v2 wtxid; high- vs low-bandwidth; link SegWit/Mempool/Bitcoin Core/Full node&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Compact blocks&amp;#039;&amp;#039;&amp;#039; are a peer-to-peer protocol for announcing and transferring blocks using short transaction identifiers instead of full transaction data. Peers reconstruct a block from their [[Mempool|mempools]] and request only the missing transactions. The protocol is specified in BIP152, authored by Matt Corallo. Version 1 uses txids. Version 2 uses wtxids and includes witness data for [[Segregated Witness]].&lt;br /&gt;
&lt;br /&gt;
Before compact blocks, a newly mined block was relayed as a full &amp;lt;code&amp;gt;block&amp;lt;/code&amp;gt; message containing every transaction. Most of those transactions were already in receiving nodes&amp;#039; mempools, so the extra bandwidth was wasted. Outbound spikes caused bufferbloat on residential links and delayed further relay. Compact block relay aims to cut that bandwidth. Lower latency is a side effect, not the primary goal. Later work such as FIBRE and erasure-coded relay targeted latency more directly.&lt;br /&gt;
&lt;br /&gt;
Peers negotiate with a &amp;lt;code&amp;gt;sendcmpct&amp;lt;/code&amp;gt; message that carries a boolean and a version. The boolean selects high-bandwidth or low-bandwidth mode. High-bandwidth mode, recommended toward at most a few peers, causes the sender to push a &amp;lt;code&amp;gt;cmpctblock&amp;lt;/code&amp;gt; as soon as it has a valid header and a commitment to the transaction list, possibly before full validation. Low-bandwidth mode announces with headers or inv, after which the receiver may &amp;lt;code&amp;gt;getdata&amp;lt;/code&amp;gt; with type MSG_CMPCT_BLOCK.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;cmpctblock&amp;lt;/code&amp;gt; contains the 80-byte header, a nonce, 6-byte short IDs for most transactions, and a few prefilled transactions (always enough to include the coinbase, and typically limited to about 10 kB). Short IDs are SipHash-2-4 of the txid (version 1) or wtxid (version 2), keyed by SHA256(header || nonce). Using the block hash in the key prevents an attacker from grinding collisions that affect every link. The receiver matches short IDs to mempool transactions. For unmatched positions it sends &amp;lt;code&amp;gt;getblocktxn&amp;lt;/code&amp;gt; with differentially encoded indexes. The sender replies with &amp;lt;code&amp;gt;blocktxn&amp;lt;/code&amp;gt;. Random short-ID collisions are expected to be rare and are resolved by falling back to a full block. Nodes must not punish peers for collisions.&lt;br /&gt;
&lt;br /&gt;
High-bandwidth compact blocks may be announced before full validation. Protocol version 70015 and higher signal that a node will not ban a peer for an invalid compact-block announcement that still has a valid header. Compact-block senders still must not announce headers that fail proof of work or prev-hash checks.&lt;br /&gt;
&lt;br /&gt;
[[Bitcoin Core]] implemented version 1 in pull request 8068 and version 2 (witness) in 8393. Compact block relay is the default block-announcement path among Core peers. Other [[Full node|full node]] implementations (btcd, libbitcoin, knots) implement BIP152 with varying completeness. SPV clients generally do not use high-bandwidth mode, because they would be accepting unvalidated transaction lists from a peer. Compact block filters (BIP158) are a separate client-side filter design and are not the same as compact block relay.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Segregated Witness]]&lt;br /&gt;
* [[Mempool]]&lt;br /&gt;
* [[Bitcoin Core]]&lt;br /&gt;
* [[Full node]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki BIP152: Compact Block Relay]&lt;br /&gt;
* [https://bitcoinops.org/en/topics/compact-block-relay/ Bitcoin Optech: Compact block relay]&lt;br /&gt;
* [https://bitcoincore.org/en/2016/06/07/compact-blocks-faq/ Compact blocks FAQ]&lt;br /&gt;
* [https://github.com/bitcoin/bitcoin/pull/8068 Bitcoin Core PR 8068]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>NotATether</name></author>
	</entry>
</feed>