feat(dot/parachain): implement constructAvailabilityBitfield()
#4414
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
The creation of availability bitfields involves querying the runtime and the availability store. The result is an availability bitfield with no signature attached.
Implementation details
The signing task receives as inputs a context for cancellation, a relay parent hash, the validator index of the node and a channel on which to send the result. It needs to perform the following steps:
This is done by calling the runtime function
ParachainHostAvailabilityCores()
. The index of eachCoreState
element in the returned slice maps to the index in the bitfield.CoreState
retrieved in step 1:If the value of
CoreState
is not of typeparachaintypes.OccupiedCore
, set the associated index in the bitfield tofalse
.If the value of
CoreState
is of typeparachaintypes.OccupiedCore
, send aQueryChunkAvailability
message to the availability store, via the overseer. In the message, pass the candidate hash fromOccupiedCore
, the validator index and a channel for receiving the result. Make sure to maintain the correct indices to set in the bitfield when receiving the result. Ideally, perform this query and receipt of the results concurrently for all occupied cores.constructAvailabilityBitfield()
.Other information and links
Acceptance criteria
The text was updated successfully, but these errors were encountered: