Skip to content

Conversation

@paritytech-release-backport-bot

Backport #9319 into stable2509 from AndreiEres.

See the documentation on how to use this bot.

…metrics accuracy (#9319)

# Description

The polkadot_parachain_collation_expired metric is an indicator for
parachain block confidence. However, this metric has a critical issue:
not every drop should be counted.

Lookahead collators intentionally build collations on a relay chain
block and its forks, so the drop of fork-based collations is an expected
behaviour. If we count them, the drop metrics show a picture that is
worse than in reality. To improve tracking accuracy, we should exclude
legit drops

The minor issue is also present in the expiry mechanism. It doesn't take
into account that collation was moved to a different stage, e.g., from
"fetched" to "backed", and can write a drop of fetched collation.

To solve this issue we should:

- Track relay parent finalization.
- Record expiration metrics only when relay parent was finalized.
- Exclude drops of fork-based collation from the metrics.
- Send metrics only for collations that either finalized or dropped.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit d51c532)
@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Oct 1, 2025
@github-actions github-actions bot requested a review from AndreiEres October 1, 2025 08:40
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@EgorPopelyaev EgorPopelyaev enabled auto-merge (squash) October 1, 2025 09:25
@EgorPopelyaev EgorPopelyaev merged commit 27f1b3e into stable2509 Oct 1, 2025
242 of 245 checks passed
@EgorPopelyaev EgorPopelyaev deleted the backport-9319-to-stable2509 branch October 1, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants