Skip to main content

DurablePersistence

Trait DurablePersistence 

Source
pub trait DurablePersistence { }
Expand description

Assumption (Durable persistence). A correct validator persists its ChainManager state before releasing a vote to the network, and that state survives a crash.

The implementation is structured to make this hold: every path in linera_core::chain_worker::state that mutates the manager calls self.save() before returning the chain info response that carries the vote โ€” try_handle_block_proposal after create_vote, process_validated_block after create_final_vote, vote_for_leader_timeout after create_timeout_vote, and vote_for_fallback after vote_fallback. The response projection is ChainManagerInfo.

Without this, a crash could lose the record of a vote and let the validator vote again, breaking OneValidationVotePerRound and OneConfirmationVotePerRound, which are the only places where the assumption is consumed. It is one half of a discipline whose other half โ€” that an effect already persisted is never lost โ€” is linera_core::proof::availability. A validator that violates it is faulty in the sense of CorrectValidator, and is counted against MaxByzantineWeight.

Implementorsยง