pub(crate) fn is_proposer(
validator: &VerifyingKey,
view: ViewNumber,
validator_set_state: &ValidatorSetState,
) -> boolExpand description
Determine whether validator should act as a proposer in the given view, given the current
validator_set_state.
ยงis_proposer Logic
Whether or not validator is a proposer in view depends on two factors:
- Whether or not
validatoris the leader in either the CVS or the PVS inview(it could possibly be in both), and - Whether or not
validator_set_update.update_decided.
The below table specifies exactly the return value of is_proposer in every possible combination
of the two factors:
| Validator Set Update Decided | Validator Set Update Not Decided | |
|---|---|---|
| Leader in CVS (and maybe also PVS) | true | true |
| Leader in PVS only | false | true |
| Leader in neither CVS or PVS | false | false |