feat(parachain/availability-distribution): implement management of chunk fetching tasks #4492
Labels
C-simple
Minor changes changes, no additional research needed. Good first issue/review.
S-subsystems-availability
issues related to polkadot host availability subsystem functionality.
T-implementation
this issue/pr is a new feature or functionality.
Issue summary
This functionality is part of the message handling logic for
ActiveLeavesUpdateSignal
.Implementation details
For each newly activated leaf plus the ancestors retrieved in the previous step, instantiate a runtime instance and call
ParachainHostAvailabilityCores()
. Filter out all cores that are unoccupied or not associated with the relay parent. For each core, check whether there is already a fetch task running for the candidate hash associated with the core. If yes, add the newly activated leaf to the state of the fetch task.If not, determine the chunk index for the core and start a new fetch task for this chunk.
For each deactivated leaf, remove it from the state of all running fetch tasks. Cancel all fetch tasks that have an empty list of leaves.
Other information and links
get_occupied_cores()
add_cores()
stop_requesting_chunks()
Acceptance criteria
The text was updated successfully, but these errors were encountered: