Bitcoin Filter Headers and Checkpoints: BIP157 Security Limits
BIP157 filter headers provide a way to link successive compact block filters. They are useful for detecting disagreement between filter histories, but they must not be confused with Bitcoin block headers or with proof that the filters are complete.
How is a filter header constructed?
For each block, the compact filter is hashed. Its filter header is calculated from that filter hash together with the preceding filter header. This creates a chain of commitments: changing a historical filter changes subsequent filter headers.
Bitcoin block headers commit to transaction Merkle roots and proof-of-work targets; filter headers are a separate client-side indexing structure. Bitcoin consensus does not require miners to commit to BIP158 filters.
What do checkpoints provide?
BIP157 defines a mechanism to request filter-header checkpoints at intervals. A client can compare responses from different peers and identify disagreement. Agreement among several peers can be useful operational evidence, but it is not a cryptographic proof that each filter accurately reflects the block.
What if a server omits a transaction-relevant element?
A dishonest server can construct a false filter that fails to match a wallet's script. Its filter headers may be internally consistent, so checking only that header chain will not expose the omission. A client needs additional trust assumptions, cross-checking, or inspection of actual blocks to detect such behavior.
What happens during a chain reorganization?
Filters correspond to specific blocks, not merely block heights. If the active Bitcoin chain changes, a wallet must revisit filters and wallet state for disconnected and newly connected blocks. Using height alone as a durable identity risks associating a filter with the wrong block.
Practical guidance
Treat filter-header checkpoints as consistency tools. Track the Bitcoin block hash associated with each filter. Do not report that a transaction is absent from Bitcoin solely because a single untrusted filter source did not match it.
Primary references
BIP157 — Client Side Block Filtering: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki
BIP158 — Compact Block Filters for Light Clients: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki
