Module transaction_bitmap

Module transaction_bitmap 

Source
Expand description

(dimension_key, bucket)BitmapBlob.

Inverted bitmap index over tx_seq space. The dimension key is a variable-length opaque token (e.g. [tag][sender]); each bucket holds the roaring bitmap of tx_seqs whose containing transaction matches that dimension.

Indexer pipelines stage merge operands carrying a small bitmap (often a single bit per write); the merge operator unions every operand against the existing on-disk bitmap and emits a single consolidated value optimized for the on-disk encoding.

A per-bucket compaction filter reads the shared tx_seq pruning floor from pruning_watermark::tx_seq_floor and drops buckets whose entire tx_seq range sits below the floor.

Structs§

DimensionPrefix
Prefix encoder for “all buckets recorded against dimension_key”. Encodes as the raw dimension bytes — the leading bytes of every Key whose dimension_key matches.
Key

Constants§

NAME
TX_BUCKET_SIZE
Number of consecutive tx_seq values represented by one bucket. Sized to keep individual bitmaps small (~8 KiB at worst-case density) and the per-row read cost predictable.

Functions§

bit_of
The bit position within a bucket for a given tx_seq. The cast is safe because TX_BUCKET_SIZE <= u32::MAX (enforced at compile time above).
bucket_of
The bucket that owns a given tx_seq.
options
CF options: install the bitmap-union merge operator and a per-bucket compaction filter that drops buckets whose entire tx_seq range sits below the pruning floor.
store_bitmap
Build a (Key, Value) pair that stages the given bitmap as a merge operand against the existing on-disk bitmap. Useful for pipelines that batch many tx_seqs into one bucket per dimension before writing.
store_match
Build a (Key, Value) pair that adds tx_seq to the bitmap for (dimension_key, bucket_of(tx_seq)). The merge operator unions this single-bit operand with whatever’s already on disk.

Type Aliases§

Value