pub(crate) fn phase_vote_recipient(
phase_vote: &PhaseVote,
validator_set_state: &ValidatorSetState,
) -> VerifyingKey
Expand description
Identify the leader that phase_vote
should be sent to, given the current validator_set_state
.
ยงphase_vote_recipient
Logic
The leader that phase_vote
should be sent to is the leader of phase_vote.view + 1
in the appropriate
validator set in validator_set_state
, which is either the committed validator set (CVS) or the
previous validator set (PVS). Which of the CVS and the PVS is the appropriate validator set depends
on two factors: 1. Whether or not validator_set_update.update_decided
, and 2. What justify.phase
is:
Validator Set Update Decided | Validator Set Update Not Decided | |
---|---|---|
Phase == Generic , Prepare , Precommit , or Commit | CVS | PVS |
Phase == Decide | CVS | CVS |