Application of Bloom Filters in Blockchain

Published by Mario Oettler on

Light clients or SPV clients use bloom filters to request transactions for specific addresses from full nodes. They have two advantages. Instead of sending many addresses, they only need to send one bloom filter. This saves bandwidth.

The next reason is to maintain the privacy of the client (or wallet). The full node doesn’t know which addresses the requester is really interested in due to the false positives. As a result, the full node sends more transactions back than the wallet really needs. The wallet then selects only the necessary transactions.

BIP37 introduced bloom filters for Bitcoin SPV clients (Simple Payment Verification).

In Ethereum, bloom filters are used for retrieving log entries (also called events).

Here are some areas besides blockchain where bloom filters are used:

  • databases
  • virus scanning
  • weak password detection
  • url checking
  • search indexes
  • recommendations
  • etc.
Categories: