Skip to content

Flexible minimum validator set size on RCs #1193

Merged
fellowship-merge-bot[bot] merged 12 commits into
mainfrom
kiz-flexible-validator-set-on-rc
Jun 2, 2026
Merged

Flexible minimum validator set size on RCs #1193
fellowship-merge-bot[bot] merged 12 commits into
mainfrom
kiz-flexible-validator-set-on-rc

Conversation

@kianenigma

@kianenigma kianenigma commented May 28, 2026

Copy link
Copy Markdown
Contributor

And, this PR lowers the default limits to:

  • 100 for Kusama
  • 250 for Polkadot

Reasoning:

  • Context: MinimumValidatorSetSize on the RCs is not a parameter that controls the validator set-size in any way (that's staking.ValidatorCount in AHs). It is only a safety mechanism that ensures no matter what AH does, RC ignores a set smaller than this size.
  • The StakingAsync on AHs already has strict checks where any set smaller than ValidatorCount are rejected on the AH side.
  • Why keeping MinimumValidatorSetSize flexible via a storage item vs. const? Because if not, any reduction of validator set requires a runtime upgrade on the RC first, slowing down the process.
  • Why pallet-parameters for the flexibility? Unlike parameter_types { pub storage } the origin can be flexible, and the proposal to upgrade it is more transparent than a system.setStorage.
  • Why lower defaults?
    • As mentioned above, these lower limits won't have any meaningful impact, until Staking.ValidatorCount on AH is changed.
    • Since reduction of sets is already envisioned as a part of the DAP proposal, this flexibility + lower defaults speeds up that effort.
  • Why 100 and 250? They follow the the core count and usage in each respective network.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found.

Comment thread relay/polkadot/src/lib.rs Outdated
Comment thread relay/kusama/src/lib.rs Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 actionable issue found.

Comment thread relay/polkadot/src/lib.rs Outdated
@github-actions

Copy link
Copy Markdown

No issues found

@kianenigma kianenigma mentioned this pull request May 28, 2026
13 tasks
@kianenigma kianenigma requested review from ggwpez and muharem May 28, 2026 13:50
@github-actions

Copy link
Copy Markdown

1 actionable issue found.


Review Suggestions

relay/kusama/src/lib.rs:810-817

The new dynamic parameter AhClient::MinimumValidatorSetSize is added, but the #[cfg(feature = "runtime-benchmarks")] impl Default for RuntimeParameters was not updated to provide a default value for it. That means pallet-parameters benchmarking/support code will not have a successful default parameter case for the new variant, unlike the Polkadot runtime. This can break runtime-benchmark behavior for the new pallet parameter and leaves Kusama inconsistent with the new wiring. Add an AhClient default variant here, or otherwise extend the benchmark-only default selection so the new parameter is covered.

Comment thread CHANGELOG.md Outdated
Comment thread relay/kusama/src/lib.rs
@kianenigma kianenigma changed the title Flexible validator set size limit on rc Flexible minimum validator set size on RCs Jun 1, 2026
@kianenigma

Copy link
Copy Markdown
Contributor Author

@muharem @ggwpez PR description updated for more transparency, ready for review.

Comment thread CHANGELOG.md Outdated
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

No issues found

@ggwpez

ggwpez commented Jun 2, 2026

Copy link
Copy Markdown
Member

/merge

@fellowship-merge-bot fellowship-merge-bot Bot merged commit 9cb93b7 into main Jun 2, 2026
126 of 128 checks passed
@fellowship-merge-bot

Copy link
Copy Markdown
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@github-project-automation github-project-automation Bot moved this from Todo to Done in Runtime releases Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants