Skip to content

Conversation

sigurpol
Copy link
Contributor

@sigurpol sigurpol commented Sep 12, 2025

Fix the issue where registering a nominator or validator while the bags list is locked would completely ignore the account, making it unreachable for on_idle rebagging.

Changes:

  • Add PendingRebag storage to queue accounts that fail insertion during lock.
  • Modify on_idle to process pending accounts with priority before regular accounts.
  • Add cleanup logic for non-staking pending accounts.

Related issue: https://github.com/paritytech-secops/srlabs_findings/issues/567

- Add PendingRebag storage to queue accounts that fail insertion during lock.
- Modify on_idle to process pending accounts with priority before regular
accounts.
- Add cleanup logic for non-staking pending accounts.
@sigurpol sigurpol requested a review from a team as a code owner September 12, 2025 08:52
@sigurpol sigurpol added T2-pallets This PR/Issue is related to a particular pallet. A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch A4-backport-stable2509 Pull request must be backported to the stable2509 release branch labels Sep 12, 2025
@sigurpol
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

@sigurpol sigurpol requested review from Ank4n, kianenigma, nkpar and seadanda and removed request for a team and Ank4n September 12, 2025 08:52
@sigurpol
Copy link
Contributor Author

/cmd bench --pallet pallet_bags_list --runtime asset-hub-westend

@sigurpol
Copy link
Contributor Author

/cmd bench --pallet pallet_bags_list --runtime dev

Copy link
Contributor

Command "bench --pallet pallet_bags_list --runtime asset-hub-westend" has started 🚀 See logs here

Copy link
Contributor

Command "bench --pallet pallet_bags_list --runtime dev" has started 🚀 See logs here

@sigurpol sigurpol removed the A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch label Sep 12, 2025
Copy link
Contributor

Command "bench --pallet pallet_bags_list --runtime asset-hub-westend" has finished ✅ See logs here

Subweight results:
File Extrinsic Old New Change [%]
cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_bags_list.rs on_idle 8.54ms 9.22ms +7.97
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- asset-hub-westend: ['pallet_bags_list']

Copy link
Contributor

Command "bench --pallet pallet_bags_list --runtime dev" has finished ✅ See logs here

Subweight results:
File Extrinsic Old New Change [%]
substrate/frame/bags-list/src/weights.rs on_idle 8.17ms 8.85ms +8.37
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- dev: ['pallet_bags_list']

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/18388624717
Failed job name: test-linux-stable

@sigurpol sigurpol enabled auto-merge October 10, 2025 09:14
@sigurpol sigurpol added this pull request to the merge queue Oct 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2025
@sigurpol sigurpol added this pull request to the merge queue Oct 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2025
@sigurpol sigurpol added this pull request to the merge queue Oct 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 10, 2025
Fix the issue where registering a nominator or validator while the bags
list is locked would completely ignore the account, making it
unreachable for on_idle rebagging.

Changes:
- Add PendingRebag storage to queue accounts that fail insertion during
lock.
- Modify on_idle to process pending accounts with priority before
regular accounts.
- Add cleanup logic for non-staking pending accounts.

Related issue:
paritytech-secops/srlabs_findings#567

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kian Paimani <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2025
@sigurpol sigurpol added this pull request to the merge queue Oct 10, 2025
Merged via the queue into master with commit 5c63e5e Oct 10, 2025
244 of 245 checks passed
@sigurpol sigurpol deleted the sigurpol-srlabs-bags-list-fixes branch October 10, 2025 16:22
@paritytech-release-backport-bot

Created backport PR for stable2509:

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

git fetch origin backport-9725-to-stable2509
git worktree add --checkout .worktree/backport-9725-to-stable2509 backport-9725-to-stable2509
cd .worktree/backport-9725-to-stable2509
git reset --hard HEAD^
git cherry-pick -x 5c63e5e3c9b96e4177572b00672942fdbc65433e
git push --force-with-lease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants