package tezos-p2p

  1. Overview
  2. Docs
val add : t -> Tezos_base.P2p_addr.t -> unit

add t addr adds addr to the address greylist.

val clear : t -> unit

clear t removes all address greylistings.

val gc : t -> unit

gc t removes some address greylistings (the oldest have a higher probability to be removed, yet due to the underlying probabilistic structure, recent greylistings can be dropped).

val mem : t -> Tezos_base.P2p_addr.t -> bool

mem t addr tells if addr is greylisted, but may return a false positive due to the underlying probabilistic structure.

val fill_percentage : t -> float

fill_percentage t returns the percentage (in the 0,1 interval) of bloom filter cells which are nonzero.

val life_expectancy_histogram : t -> int array

life_expectancy_histogram t returns the life expectancy distribution of cells (measured in gc calls) stored as an array: the value at index k stores the number of cells that are k calls to gc away from being removed from the greylist.

OCaml

Innovation. Community. Security.