DEV Community

Cover image for ◼️44/100 Block-by-Block: Bloom filters
András Novoszáth
András Novoszáth

Posted on

◼️44/100 Block-by-Block: Bloom filters

One thing I learned about: Bloom filters.

On-chain data indexers often try to avoid refetching the same transactions.

A bloom filter can help to test if they already have a record.

  • It is a probabilistic data structure consisting of a binary array
  • Maps record hash values to values of the array
  • Maps record keys to the corresponding indexes of the array
  • Membership check consists of checking the array values

Caveat: Can produce false positives.

🔽🛠️Resources🔽

Top comments (0)