Skip to main content

Module bip158

Module bip158 

Source
Expand description

BIP158: Compact Block Filters for Light Client Discovery

Specification: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki

Implements Golomb-Rice Coded Sets (GCS) for efficient block filtering. Allows light clients to determine if a block contains relevant transactions without downloading the entire block.

Structs§

CompactBlockFilter
Compact block filter (GCS)

Constants§

BIP158_M
BIP158 filter parameter: multiplier M = 2^P
BIP158_P
BIP158 filter parameter: false positive rate (2^(-P)) P = 19 means ~1 in 524,288 false positives

Functions§

build_block_filter
Build a compact block filter from transaction data
match_filter
Match a script against a compact block filter