Module Evm_node_lib_prod.Ethbloom

Ethereum Bloom filters. See Ethereum yellow paper, section 4.3.1 for reference.

type t = bytes

Type of Bloom filters, represented as a 256-byte string. Note that values of this type are mutable.

val make : unit -> t

make () returns a new empty filter.

val is_empty : t -> bool

is_empty filter returns whether the filter is empty.

val contains_input : input:Evm_node_lib_prod_encoding.Ethereum_types.hex -> t -> bool

contains_input ~input filter returns whether the filter contains input.

val contains_bloom : t -> t -> bool

contains_bloom filter1 filter2 returns whether filter1 contains filter2.

val accrue : input:Evm_node_lib_prod_encoding.Ethereum_types.hex -> t -> unit

accrue ~input filter extends filter by adding input.

val accrue_bloom : t -> t -> unit

accrue_bloom filter1 filter2 extends filter1 by adding all of the elements from filter2.