Expand description
Voting rules: what a correct validator’s state must look like for it to sign.
These are local implementation properties. Each one follows from a single method’s control
flow together with the guards its call sites apply, with no induction over executions. They
are what crate::manager::proof::locking inducts over, and what
CertificateCarriesCorrectVote converts into constraints on the certificates that can
exist at all.
Every statement below is accompanied by a code correspondence table naming the method that implements the transition, the fields it reads and writes, and the preconditions its callers establish.
Traits§
- Confirmation
Needs Validated Certificate - Lemma (A non-fast confirmation requires a validated certificate in the same round). If a
correct validator casts a confirmation vote for block
Ain a roundrother thanRound::Fast, then aValidatedBlockCertificateforAin roundr, valid for the committee of its epoch, existed at that moment. - Confirmation
Only InCurrent Round - Lemma (A non-fast confirmation happens only in the current round). When
ChainManager::create_final_votecasts a confirmation vote in roundr,ChainManager::current_roundequalsrat that moment — and it had already been raised to at leastrearlier in the same call. - Fast
Confirmation Needs Empty Lock - Lemma (A fast confirmation requires an empty lock and no prior vote). If a correct
validator casts a confirmation vote in
Round::Fast, then immediately before that vote itslocking_block,validated_voteandconfirmed_votewere allNone; and immediately after,locking_blockholds aLockingBlock::Fastfor the very block confirmed. - NoValidation
InFast Round - Lemma (No validation vote in the fast round). A correct validator never casts a
Validatedvote inRound::Fast. - Proposal
Gate - Lemma (Proposal gate). A correct validator reaches
ChainManager::create_votefor a proposalponly afterChainManager::check_proposed_blockreturnedOutcome::Acceptforpagainst the same manager state. - Unlocking
Requires Higher Certificate - Lemma (A validation vote past a lock needs a higher certificate). Suppose a correct
validator casts a validation vote for block
Bin roundr, and let(A, p)be the value of itsconfirmed_voteimmediately before. Thenpis defined only if the proposal carried anOriginalProposal, and: - Validation
Round Strictly Increases - Lemma (Validation rounds strictly increase). If a correct validator’s
validated_voteholds a vote in rounds, it casts no further validation vote in any round≤ swhile that field still holds that vote. - Vote
Construction Sites - Lemma (Vote construction sites). A correct validator signs a block-related vote only in
ChainManager::create_voteandChainManager::create_final_vote, and a timeout vote only inChainManager::create_timeout_voteandChainManager::vote_fallback. Specifically: