Ethereum logs bloom filter โ 256-byte (2048-bit) probabilistic filter
summarising the addresses and indexed topics of every log in a receipt or
block. Each item is added via 3 hash probes derived from Keccak-256
(Yellow Paper ยง4.3.1). The data field of a log is not included.
Summary
Functions
Add an item (raw bytes) to the bloom filter.
Check if a bloom filter might contain an item (false positives possible).
Returns an empty (all-zero) 256-byte bloom filter.
Compute the bloom filter for a list of logs.
Bitwise OR of two bloom filters.
Types
@type log_entry() :: %{ address: non_neg_integer(), data: binary(), topics: [non_neg_integer()] }
@type t() :: <<_::2048>>
Functions
Add an item (raw bytes) to the bloom filter.
The item should be a binary โ 20 bytes for an address, 32 bytes for a topic.
Check if a bloom filter might contain an item (false positives possible).
@spec empty() :: t()
Returns an empty (all-zero) 256-byte bloom filter.
Compute the bloom filter for a list of logs.
Each log's address and topics are added. The data field is NOT included.
Bitwise OR of two bloom filters.