Skip to main content

Module inactivity_scores

Module inactivity_scores 

Source
Expand description

Delta encoding for validator inactivity scores.

Inactivity scores are encoded as sparse updates. Only indices whose values differ from the base vector are stored together with their replacement values.

When the target vector consists entirely of zero-valued scores, a dedicated all-zero representation is emitted, avoiding any per-validator storage.

Deltas produced by diff_inactivity can be applied in-place using apply_inactivity.

Functionsยง

apply_inactivity
Applies an inactivity-score delta in-place.
diff_inactivity
Computes a compact inactivity-score delta.