Principles of Client-Side Block Filtering
In this lesson, you will learn another technique light clients use to maintain privacy. It is called client-side block filtering.
Bitcoin Light clients (SPV clients) don’t download and hold the complete blockchain. Instead, they request single transactions from full nodes. When requesting single transactions from a full node, this can compromise the wallet owner’s privacy since the full node can find out which addresses the wallet is interested in. The first privacy-preserving approach was bloom filters. But they proved to be less secure than expected.
Client-side block filtering is also called compact block filtering [CBF] and was introduced in BIP 157 and BIP 158 . With CBF, full nodes create a filter for each block. These filters contain information about the transactions in this block. Since those filters are deterministic, every full node creates the same filters. Light clients can check those filters and see, if a block contains a relevant transaction or not.
If the light client discovers a relevant block, it requests the whole block from any full node. Those filters have a false-positive rate but no false-negative rate.
Privacy properties
Blocks are the native data structure of the blockchain. They contain many transactions. That’s why it is harder for a full node to connect wallets with transactions/addresses.
Light clients can download blocks from multiple full nodes. This makes it harder for full nodes to determine which blocks are relevant for the light client.
Light clients can easily download additional blocks to increase the privacy. And they can connect to different full nodes to conceal their interest. However, a higher false-positive rate needs a higher bandwidth.