Skip to main content

unit_digest

Function unit_digest 

Source
fn unit_digest(unit: &[u8]) -> Hash
Expand description

Identifies a unit in the backup by its encoding.

AlephBFT passes every unit it adds to its DAG to the BackupWriter, including the units it has just replayed from this backup. Storing those again appends a full copy of the session’s units on every restart within a session, and a guardian that keeps restarting in a stalled session then loads every copy at once at its next start. The backup therefore holds each unit once: the writer skips units it already stored, and the reader skips copies written before this rule existed.