feat(dot/parachain/bitfield-signing): handle ActiveLeavesUpdateSignal
message
#4415
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 bitfield signing subsystem only handles
parachaintypes.ActiveLeavesUpdateSignal
messages from the overseer. This message usually triggers creation of one or more bitfield signing tasks. The output of these tasks is sent to the bitfield distribution subystem. Only validators create and sign bitfields.The creation of the bitfield itself is out of scope for this issue. It should be mocked here and implemented as part of #4414.
Implementation details
For all leaves that have been deactivated, cancel the signing tasks associated with them.
For all activated leaves, spawn a new signing task. The task needs to perform the following steps:
In the Parity node, this delay is currently set to 1500ms. It must be possible to abort a signing task while it is waiting. Ideally this should be covered by a test.
This part is out of scope for this issue. The input to the process is a context for cancellation, a relay parent hash, the validator index of the node and a channel on which to send the result. Just create a function or method
constructAvailabilityBitfield
that returns a hard-coded bitfield, or whatever makes sense for testing purposes. Roughly:Sign the bitfield with the validators parachain session key.
Send a
DistributeBitfield
message containing the created bitfield to the overseer.Depending on the order of implementation, the struct for this message should have been defined as part of either #4232 or #4413.
Other information and links
parachaintypes.BitVec
Acceptance criteria
The text was updated successfully, but these errors were encountered: