cumulus: add segment submission primitive types#12280
Draft
iulianbarbu wants to merge 11 commits into
Draft
Conversation
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds collation-generation subsystem types that are used by the collators to submit segments. Currently the new types have corresponding types in cumulus, to enable the support for segment submission from the block_builder/collation_task levels.
We clearly separate now between V2 and V3/V4 messages - V2 submits
CollatorMessage(named as before, although I would've changed it, and without thescheduling_proof, which was set toNoneeither way), while V3 submitsCollatorResubmitSegment, with various info that's used by the collation-task to craft the correctSubmitSegmentcollation-generation message.The current block building/collation-task changes keep the existing submission contract for V2/V3. We attempt to build bundles for each core (for both V2/V3), but for V3, depending on whether it builds a bundle for the first core or not, it either sends across to the collation-task a
CollatorResubmitSegmentwith aSegmentKind::WithBundle(appending a newly built bundle to an existing list of unincluded blocks, computed in a future resubmission manager, and submitting that - for now, the list contains just the newly built bundle) or aSegmentKind::ResubmitOnly(that's concerned just with resubmitting an existing unincluded segment as is, again computed by a future resubmission manager, and at the moment being handled as a no-op).Integration
N/A - segment submission primitive types usage is gated by the
CandidateReceiptV3node feature on the relay chain side, by theVerifySignedSchedulingInfoparachain runtime config type (for which we do not have yet an implementation, pending on #12097), but it also lacks the requried collator resubmissions machinery (wip here: #12228, depending on this PR) or the V4 collator-protocol (wip here: #12172 for the collator-side, and a validator-side PR that's not yet up).Review Notes
Foundation for the resubmission machinery, and for the V4 collator-protocol's collator-side concerns, of distributing a whole segment.
TODO: