Skip to content

Collator protocol revamp: Change collation hold-off timing to start at leaf activation#11046

Merged
mchristou merged 5 commits intomasterfrom
mchr/delay-leaf-act
Feb 24, 2026
Merged

Collator protocol revamp: Change collation hold-off timing to start at leaf activation#11046
mchristou merged 5 commits intomasterfrom
mchr/delay-leaf-act

Conversation

@mchristou
Copy link
Copy Markdown
Contributor

#11022

The hold-off delay should be measured from when the relay parent (leaf) is activated, not when the advertisement message arrives. This prevents artificially delaying messages that already arrived late.

Changes

  • Calculate remaining hold-off time from leaf activation, not message arrival
  • Process immediately if hold-off window has already elapsed
  • Add test to ensure late-arriving collations skip artificial delay

@mchristou mchristou added I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Feb 11, 2026
@mchristou mchristou requested a review from tdimitrov February 20, 2026 08:42
@tdimitrov
Copy link
Copy Markdown
Contributor

Hey @mchristou
Your idea is right, but it is implemented in the wrong place. You should do the change in the experimental collator protocol implementation (the one in polkadot/node/network/collator-protocol/src/validator_side_experimental). The one in polkadot/node/network/collator-protocol/src/validator_side (which is the legacy one) should remain unchanged.

@mchristou mchristou changed the title Change collation hold-off timing to start at leaf activation Collator protocol revamp: Change collation hold-off timing to start at leaf activation Feb 23, 2026
@mchristou
Copy link
Copy Markdown
Contributor Author

Hey @tdimitrov
Updated!

Copy link
Copy Markdown
Contributor

@tdimitrov tdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @mchristou. Just a few more nits.

I really like that you've added comments and updated the relevant tests.

'Late advertisement' is not an appropriate term in this case so I made some suggestions to remove it.

An advertisement which is received after the delay timer (300ms) is not necessary late since producing a collation is kind of expensive operation.

@tdimitrov
Copy link
Copy Markdown
Contributor

/cmd prdoc --audience node_dev --bump patch

@tdimitrov
Copy link
Copy Markdown
Contributor

The next steps to get the PR merged is to write a PRDoc. This is a short description of the PR + list of the changed crates with the corresponding semver change. We use this for for release notes generation.

I've triggered the bot to generate a boilerplate prdoc file for you with /cmd prdoc --audience node_dev --bump patch.

@tdimitrov tdimitrov added the A4-backport-stable2603 Pull request must be backported to the stable2603 release branch label Feb 24, 2026
Copy link
Copy Markdown
Contributor

@tdimitrov tdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Copy Markdown
Contributor

@sandreim sandreim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work @mchristou

@mchristou mchristou added this pull request to the merge queue Feb 24, 2026
Merged via the queue into master with commit 7beff9b Feb 24, 2026
244 of 246 checks passed
@mchristou mchristou deleted the mchr/delay-leaf-act branch February 24, 2026 15:20
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Feb 24, 2026
…t leaf activation (#11046)

#11022

The hold-off delay should be measured from when the relay parent (leaf)
is activated, not when the advertisement message arrives. This prevents
artificially delaying messages that already arrived late.

 ## Changes
- Calculate remaining hold-off time from leaf activation, not message
arrival
  - Process immediately if hold-off window has already elapsed
  - Add test to ensure late-arriving collations skip artificial delay

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 7beff9b)
@paritytech-release-backport-bot
Copy link
Copy Markdown

Successfully created backport PR for stable2603:

@eskimor eskimor mentioned this pull request Feb 25, 2026
12 tasks
tdimitrov pushed a commit that referenced this pull request Feb 25, 2026
Backport #11046 into `stable2603` from mchristou.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Marios <marios@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2603 Pull request must be backported to the stable2603 release branch I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants