What Is Bloom Filter?
Also known as: Bloom Filters, Probabilistic Filter
In short
A Bloom filter is a probabilistic data structure that quickly tests whether an item is in a set using very little memory. In blockchains, it is used for light wallets to find their own transactions and for searching event logs on Ethereum.
The Bloom filter was proposed in 1970 by Burton Howard Bloom. The structure consists of a bit array made up of zeros and several hash functions. When an item is added, the bit indicated by each hash function is set to 1. When querying, if even one of these bits is 0, the item is definitely not in the set; if all are 1, the item is probably in the set. In other words, a false positive is possible, but a false negative is not.
In the method defined in Bitcoin by BIP-37 in 2012, SPV (simplified payment verification) wallets add the addresses they are interested in to a Bloom filter and send it to full nodes; the node then forwards only the transactions matching the filter. This way, light clients can track their own transactions without downloading the entire blockchain. On Ethereum, each block header contains a Bloom filter summarizing the event logs in that block, helping applications search for relevant events quickly.
The BIP-37 method was later found to be weak in terms of privacy; nodes could analyze the filters to guess which addresses a wallet owned, and the method was also open to placing unnecessary load on nodes. For this reason, it was turned off by default in Bitcoin Core and was largely replaced by the compact block filters defined by BIP-157 and BIP-158, in which filters are generated on the node side.
Last updated: · This content is for information purposes only and is not investment advice.

