pub(crate) fn is_validator(
replica: &VerifyingKey,
validator_set_state: &ValidatorSetState,
) -> boolExpand description
Determine whether the replica is an “active” validator, given the current validator_set_state.
An active validator can:
- Propose/Nudge and phase vote in the HotStuff protocol,
- Contribute timeout votes and advance view messages.
§is_validator logic
Whether or not replica is an active validator given the current validator_set_state depends on
two factors:
- Whether
replicais part of the Committed Validator Set (CVS), the Previous Validator Set (PVS), both validator sets, or neither. - Whether
validator_set_state.update_decided()or not.
The below table specifies exactly the return value of is_validator in every possible combination
of the two factors:
| Validator Set Update Decided | Validator Set Update Not Decided | |
|---|---|---|
| Part of CVS (and maybe also PVS) | true | true |
| Part of PVS only | false | true |
| Part of neither neither CVS or PVS | false | false |