-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ClaimQueueState overwrites previous assignments at rotation boundary #11556
Description
Discovered by @eskimor:
We only keep the assignment for our core at the particular block (not all cores), but the group is selected based on the scheduling parent. So on a group rotation, the leaf will already be "rotated" - thus storing the assignment of the next core, e.g. [B,B,B]. So we would reject an assignment for para A (old core), while we actually should accept it. The group-core assignment that matters is that of the scheduling parent, not where we will be assigned when the assignment is intended to get backed on chain.
What exactly happens
ClaimQueueState keeps so called future claims which are the claims exposed by the claim queue for the next blocks. On rotation boundary the validator is assigned on a new core, the claim queue changes and the future assignments are overwritten with the new ones.
Potential solution
In PerLeafClaimQueueState, for each leaf, keep track of the assignments per core. Or in other words leaves should become HashMap<Hash, HashMap<CoreIndex, ClaimQueueState>>,. That way old claims won't be overwritten and the claim queue state will correctly represent the assignments from the old and new cores.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status