Mastering Bitcoin — 11.6: BIP158 Compact Block Filters

Опубликовано: 07 Июнь 2026
на канале: Ludium
23
1

How did Bitcoin light clients gain privacy without sacrificing trustlessness? This video traces the design of BIP158 compact block filters, from the privacy disaster of BIP37 to the elegant inversion that lets full nodes serve filters to clients instead of the other way around. Along the way, we unpack Golomb-Rice coded sets, the role of SipHash, and why false positives are a feature rather than a bug.

Key concepts covered:
The privacy flaw in BIP37: clients revealing their addresses to full nodes
Direction reversal: one filter per block, served to many anonymous clients
Bandwidth and confirmation trade-offs of the new model
Golomb-Rice Coded Sets (GCS) and why delta encoding compresses well
The dice-roll intuition for why small differences dominate sorted hash sets
Filter construction: output scripts, SipHash, 64-bit truncation, sorting, deduplication
Scripts versus outpoints, and why tracking scripts enables deduplication
The asymmetric error guarantee: 100 percent true positives, tunable false positives
BIP157 commitments and multi-peer comparison for filter verification
Why false positives can function as privacy-enhancing cover traffic
Proposed coinbase commitments for consensus-enforced filter integrity
The broader pattern: Bitcoin evolving by shifting data burdens away from users