pub fn compute_assignments(
    keystore: &LocalKeystore,
    relay_vrf_story: RelayVRFStory,
    config: &Config,
    leaving_cores: impl IntoIterator<Item = (CandidateHash, CoreIndex, GroupIndex)> + Clone,
    enable_v2_assignments: bool
) -> HashMap<CoreIndex, OurAssignment>
Expand description

Compute the assignments for a given block. Returns a map containing all assignments to cores in the block. If more than one assignment targets the given core, only the earliest assignment is kept.

The leaving_cores parameter indicates all cores within the block where a candidate was included, as well as the group index backing those.

The current description of the protocol assigns every validator to check every core. But at different times. The idea is that most assignments are never triggered and fall by the wayside.

This will not assign to anything the local validator was part of the backing group for.