Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix claim queue size #6257

Merged
merged 7 commits into from
Nov 4, 2024
Merged

fix claim queue size #6257

merged 7 commits into from
Nov 4, 2024

Conversation

alindima
Copy link
Contributor

@alindima alindima commented Oct 28, 2024

Reported in #6161 (comment)

Fixes a bug introduced in #5461, where the claim queue would contain entries even if the validator groups storage is empty (which happens during the first session).

This PR sets the claim queue core count to be the minimum between the num_cores param and the number of validator groups

TODO:

  • prdoc
  • unit test

@alindima alindima added I2-bug The node fails to follow expected behavior. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Oct 28, 2024
Copy link
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, just some suggestions.

polkadot/runtime/parachains/src/scheduler.rs Show resolved Hide resolved
polkadot/runtime/parachains/src/scheduler.rs Show resolved Hide resolved
@@ -203,6 +204,12 @@ impl<T: Config> Pallet<T> {
ValidatorGroups::<T>::decode_len().unwrap_or(0)
}

/// Expected claim queue len. Can be different than the real length if for example we don't have
/// assignments for a core.
Copy link
Member

Choose a reason for hiding this comment

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

claim_queue_len is a bit confusing as usually we mean by length of the claim queue the length of individual queues.

If we want to name it with regrads to claim queue, maybe claim_queue_cores?

@alindima alindima added this pull request to the merge queue Nov 4, 2024
Merged via the queue into master with commit f4133b0 Nov 4, 2024
198 of 199 checks passed
@alindima alindima deleted the alindima/fix-cq-size branch November 4, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants