Skip to main content

Module slashings

Module slashings 

Source
Expand description

Delta encoding for Ethereum slashing vectors.

Ethereum consensus stores slashing totals in a fixed-capacity circular buffer indexed by epoch.

Unlike root and RANDAO buffers, slashing values change infrequently. This module therefore records only epochs whose values differ between two states, producing a sparse delta representation.

Applying a delta updates only the modified epochs while leaving all other entries unchanged.

Functionsยง

apply_slashings
Applies a slashing delta to a circular slashing buffer.
diff_slashings
Computes a sparse delta between two slashing buffers.