Skip to content

cumulus: unincluded segment submission with every RC slot#12228

Draft
iulianbarbu wants to merge 27 commits into
masterfrom
ib-resubmit-every-slot
Draft

cumulus: unincluded segment submission with every RC slot#12228
iulianbarbu wants to merge 27 commits into
masterfrom
ib-resubmit-every-slot

Conversation

@iulianbarbu
Copy link
Copy Markdown
Contributor

@iulianbarbu iulianbarbu commented May 28, 2026

Description

Initial resubmission flow based on V4 collator protocol (both collator-side #12172 and validator-side tbd), #12091 & #12097 .

Covers parts of #12036 without the freshness tracker, exceptions to it, or core affinity.

Integration

N/A yet

Review Notes

This is a demonstrative flow which attempts seding the entire unincluded segment always on the first core it gets during an RC slot.

In the near future I'd want:

  1. this PR to contain only the resubmission bits, not the unincluded segment store, or the PVF scheduling proof verification (for now the commits from the associated PRs where added in this branch, but in the future I hope I can rebase on top of them, by either having the PRs rebased on top of each other too, or having them merged in baster)
  2. to do a refactor of the block builder task to separate the run_builder_task loop concerns in an easier to reason about way (compatible with both v2 and v3/v4).
  3. add the freshness tracker and the exceptions to it when building close to RC slot boundary
  4. experiment with core affinity: e.g. initial submissions core selectors for each block can be reused for resubmissions, and even if the same core selectors do not make sense certain claim queue offset/scheduling parent, we'd still be able to map it to a core selector with a modulo operation. This is mainly to spread fairly the blocks through the available cores.

iulianbarbu and others added 27 commits May 27, 2026 23:41
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>
For V3, build on the parachain best head directly instead of the
relay-parent-anchored fork search. The scheduling parent already pins the
included head via the relay chain's persisted validation data, so find_parent_v3
takes the best head and verifies it descends from that included head; V1/V2 keep
the existing find_parent search. Reuses fetch_included from the unincluded-segment
walker.

Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Replace the standalone resubmission task with a ResubmissionManager owned
by the collation task. The collation task's select! loop now reacts to both
the regular collator channel and the resubmission channel, converging on the
same handle_segment_message submission path.

Renames resubmission_task.rs to resubmission.rs.

Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Make resubmission the unified V3 submission path instead of a "segment full"
exception. Every slot the first core submits the prior unincluded segment
(resubmitted, signed) prepended to the blocks it builds this slot; other
(elastic-scaling) cores submit only their new blocks as initial submissions.

Split the work into two phases so the expensive part overlaps block building:
a Hydrate request (fired once the scheduling parent is known) walks the prior
segment and loads bodies/proofs; a Finalize request (after the first core is
known) builds the header_chain and signs. The collation task holds the result
and prepends the first core's freshly-built blocks before submitting.

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>
@iulianbarbu iulianbarbu self-assigned this May 28, 2026
@iulianbarbu iulianbarbu added the T20-low-latency for issues and PRs related to Low Latency work label May 28, 2026
@iulianbarbu iulianbarbu changed the title cumulus: add logic for resubmission with every slot cumulus: add logic for resubmission with every RC slot May 28, 2026
@iulianbarbu iulianbarbu changed the title cumulus: add logic for resubmission with every RC slot cumulus: unincluded segment submission with every RC slot May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T20-low-latency for issues and PRs related to Low Latency work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants