Skip to content

Fix paths length#11626

Merged
eskimor merged 4 commits intomasterfrom
rk-fix-paths-length
Apr 3, 2026
Merged

Fix paths length#11626
eskimor merged 4 commits intomasterfrom
rk-fix-paths-length

Conversation

@eskimor
Copy link
Copy Markdown
Member

@eskimor eskimor commented Apr 2, 2026

implicit views can return paths longer than lookahead, which leads to is_slot_available skipping the loop here, because of ancestor_valid_len being 0, leading to rejections of candidates.

I also noticed that paths_via_relay_parents can be massively simplified, which also removes above bug. ImplicitView can likely be simplified further as I no longer see any need to keep block_info_storage at all anymore.

Fixes: #11625

@eskimor eskimor added T0-node This PR/Issue is related to the topic “node”. T8-polkadot This PR/Issue is related to/affects the Polkadot network. A4-backport-stable2603 Pull request must be backported to the stable2603 release branch labels Apr 2, 2026
@eskimor eskimor force-pushed the rk-fix-paths-length branch from d2fe550 to e9ab097 Compare April 3, 2026 05:59
@eskimor eskimor requested review from alindima and tdimitrov April 3, 2026 06:05
@eskimor
Copy link
Copy Markdown
Member Author

eskimor commented Apr 3, 2026

ok, a little less bad than I thought in between. Skipping the loop before finding the relay parent is fine. The problem is if it is not skipped for older than expected blocks - as then slots will be seen as occupied, which should not.

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 catch @eskimor

Copy link
Copy Markdown
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

Nice! Amazing finding!

I'll cherry pick this on top of #11610 and request a burnin on our validators 🙏 We should get validation by end of day or latest by monday

Copy link
Copy Markdown
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

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

Good catch, to both you and @lexnv

@eskimor eskimor force-pushed the rk-fix-paths-length branch from e9ab097 to 7a6f7f7 Compare April 3, 2026 14:24
@eskimor eskimor added this pull request to the merge queue Apr 3, 2026
Merged via the queue into master with commit ce07e65 Apr 3, 2026
620 of 659 checks passed
@eskimor eskimor deleted the rk-fix-paths-length branch April 3, 2026 21:01
@paritytech-release-backport-bot
Copy link
Copy Markdown

Successfully created backport PR for stable2603:

paritytech-release-backport-bot Bot pushed a commit that referenced this pull request Apr 3, 2026
implicit views can return paths longer than lookahead, which leads to
is_slot_available skipping the loop
[here](https://github.com/paritytech/polkadot-sdk/blob/a103769c2e2cb739f721d0446acabe97a2c0df08/polkadot/node/network/collator-protocol/src/validator_side/mod.rs#L1598),
because of `ancestor_valid_len` being 0, leading to rejections of
candidates.

I also noticed that `paths_via_relay_parents` can be massively
simplified, which also removes above bug. ImplicitView can likely be
simplified further as I no longer see any need to keep
`block_info_storage` at all anymore.

Fixes: #11625
(cherry picked from commit ce07e65)
eskimor added a commit that referenced this pull request Apr 4, 2026
Backport #11626 into `stable2603` from eskimor.

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: eskimor <jfanatiker@gmx.at>
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 T0-node This PR/Issue is related to the topic “node”. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collator-protocol: Advertised collations are fetched only after reconnection

4 participants