Skip to content

cumulus: add segment submission primitive types#12280

Draft
iulianbarbu wants to merge 26 commits into
masterfrom
ib-submit-segment-type
Draft

cumulus: add segment submission primitive types#12280
iulianbarbu wants to merge 26 commits into
masterfrom
ib-submit-segment-type

Conversation

@iulianbarbu

@iulianbarbu iulianbarbu commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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 the scheduling_proof, which was set to None either way), while V3 submits CollatorResubmitSegment, with various info that's used by the collation-task to craft the correct SubmitSegment collation-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 CollatorResubmitSegment with a SegmentKind::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 a SegmentKind::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).

Closes #12310.

Integration

N/A - segment submission primitive types usage is gated by the CandidateReceiptV3 node feature on the relay chain side, by the VerifySignedSchedulingInfo parachain 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:

@iulianbarbu iulianbarbu self-assigned this Jun 4, 2026
@iulianbarbu iulianbarbu changed the title [wip] cumulus: add segment submission primitive types cumulus: add segment submission primitive types Jun 5, 2026
@iulianbarbu iulianbarbu force-pushed the ib-submit-segment-type branch 2 times, most recently from e563d2a to 0e18981 Compare June 9, 2026 06:04
serban300 and others added 26 commits June 9, 2026 09:57
- avoid querying the relay_client for detecting session changes
- reorder some arguments
- avoid passing the ancestry_lookback as an argument
  (read it from the relay_client)
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>
Add an `unincluded_segment: Vec<Block::Header>` field to
`CollatorResubmitSegment`. Both V3 send sites in the slot-based block builder
populate it with `Vec::new()` for now; `handle_resubmit_segment` destructures
and ignores it with a TODO for the eventual `SubmitSegment` hydration wiring.

Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
@iulianbarbu iulianbarbu force-pushed the ib-submit-segment-type branch from 0e18981 to ab88281 Compare June 9, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cumulus: implement segment submission messages

3 participants