Skip to content

Add MinSetKeysBond check in rc_client::set_keys#11168

Merged
sigurpol merged 5 commits into
masterfrom
sigurpol-check-bond-set-keys-ah
Feb 25, 2026
Merged

Add MinSetKeysBond check in rc_client::set_keys#11168
sigurpol merged 5 commits into
masterfrom
sigurpol-check-bond-set-keys-ah

Conversation

@sigurpol
Copy link
Copy Markdown
Contributor

@sigurpol sigurpol commented Feb 25, 2026

Add a configurable MinSetKeysBond threshold that rejects set_keys when active bond is insufficient.

…n storage spam

With minValidatorBond = 0, an attacker can bond ED then loop
validate → set_keys → chill to store unlimited session keys on the relay
chain at negligible cost. Add a configurable MinSetKeysBond threshold
(hardcoded to 10k DOT/WND on asset-hub-westend) that rejects set_keys when
active bond is insufficient.
Set to 0 to disable (useful e.g. for asset-hub-kusama).
@sigurpol sigurpol requested a review from a team as a code owner February 25, 2026 09:28
@sigurpol sigurpol added T2-pallets This PR/Issue is related to a particular pallet. A4-backport-stable2512 Pull request must be backported to the stable2512 release branch A4-backport-stable2603 Pull request must be backported to the stable2603 release branch labels Feb 25, 2026
@sigurpol
Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience runtime_dev --bump major

Comment thread cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs Outdated
Comment thread substrate/frame/staking-async/rc-client/src/lib.rs Outdated
Comment thread prdoc/pr_11168.prdoc Outdated
Copy link
Copy Markdown
Contributor

@Ank4n Ank4n left a comment

Choose a reason for hiding this comment

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

🚀

@sigurpol sigurpol changed the title Add MinSetKeysBond check in rc_client::set_keys to prevent relay chain storage spam Add MinSetKeysBond check in rc_client::set_keys Feb 25, 2026
@sigurpol sigurpol enabled auto-merge February 25, 2026 10:08
@sigurpol sigurpol added this pull request to the merge queue Feb 25, 2026
Merged via the queue into master with commit 79bc8a9 Feb 25, 2026
270 of 272 checks passed
@sigurpol sigurpol deleted the sigurpol-check-bond-set-keys-ah branch February 25, 2026 11:37
@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for stable2512:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-11168-to-stable2512
git worktree add --checkout .worktree/backport-11168-to-stable2512 backport-11168-to-stable2512
cd .worktree/backport-11168-to-stable2512
git reset --hard HEAD^
git cherry-pick -x 79bc8a968a2eda1ae127740ee1a20ff10e375950
git push --force-with-lease

paritytech-release-backport-bot Bot pushed a commit that referenced this pull request Feb 25, 2026
Add a configurable MinSetKeysBond threshold that rejects set_keys when
active bond is insufficient.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 79bc8a9)
@paritytech-release-backport-bot
Copy link
Copy Markdown

Successfully created backport PR for stable2603:

sigurpol added a commit that referenced this pull request Feb 25, 2026
Backport #11168 into `stable2512` from sigurpol.

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: Paolo La Camera <paolo@parity.io>
sigurpol added a commit that referenced this pull request Feb 25, 2026
Backport #11168 into `stable2603` from sigurpol.

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: Paolo La Camera <paolo@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fellowship-merge-bot Bot pushed a commit to polkadot-fellows/runtimes that referenced this pull request Feb 26, 2026
- Bump election provider multiblock to include [SDK
PR#11156](paritytech/polkadot-sdk#11156) :
reduce overclaimed proof_size during Signed phase
- Bump staking pallets to include [SDK
PR#11168](paritytech/polkadot-sdk#11168): add a
configurable MinSetKeysBond threshold that rejects set_keys when active
bond is insufficient.
arturgontijo pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Apr 1, 2026
Backport paritytech#11168 into `stable2512` from sigurpol.

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: Paolo La Camera <paolo@parity.io>
arturgontijo pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2512 Pull request must be backported to the stable2512 release branch A4-backport-stable2603 Pull request must be backported to the stable2603 release branch T2-pallets This PR/Issue is related to a particular pallet.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants