Expand description
Delta encoding for Phase 0 pending attestation lists.
Phase 0 maintains two attestation lists with different update semantics:
current_epoch_attestationsgrows by appending new attestations during an epoch.previous_epoch_attestationsis replaced when the epoch transitions.
This module provides a single diff function that selects the most compact supported representation for both cases. If the target list starts with the exact byte sequence of the base list, only the appended bytes are stored. Otherwise, the complete target list is stored as a full replacement.
Both representations use AttestationsDiff and can be applied with
apply_attestations without deserializing individual attestations.
Functionsยง
- apply_
attestations - Applies an attestation delta to a serialized SSZ list in place.
- diff_
attestations - Computes a compact delta between two serialized SSZ attestation lists.