Skip to content

Conversation

@paritytech-release-backport-bot

Backport #9319 into unstable2507 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
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.

2 participants