Skip to content

Conversation

kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Oct 19, 2025

TLDR: Thanks to a number of reports from Kusama validator, we have been investigating an issue where the self stake of some validators is not present in ErasStakersPaged and ErasStakersOverview, and consequently not earning staking rewards.

After investigation, it was clear that the polkadot-staking-miner is doing the right thing, and the self-stake is indeed submitted to the chain as a part of the staking election result.

The root cause in how pallet-staking-async ingests the staking election result. This code made a (wrong) assumption that self-stake is only present in the first page of a multi-page election. This PR fixes this issue.


@kianenigma kianenigma added 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 Oct 19, 2025
@kianenigma
Copy link
Contributor Author

/cmd prdoc --bump patch

@kianenigma kianenigma marked this pull request as ready for review October 19, 2025 16:06
@kianenigma kianenigma requested a review from a team as a code owner October 19, 2025 16:06
Copy link
Contributor

@sigurpol sigurpol left a comment

Choose a reason for hiding this comment

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

Don’t have my laptop with me so I did look only at code diff on mobile , changes sound proper but it’s definitely not an accurate review as I would love to have at this stage and time pre PAHM. Hopefully unlike me, @Ank4n can double check everything properly.

Also the current bug is maybe something we would like to add to the checklist of the long running staking test we are deploying for AHM

Copy link
Contributor

@seadanda seadanda left a comment

Choose a reason for hiding this comment

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

Upgrading Ankan's review. Also passed sanity check, but I'm missing some context

@kianenigma kianenigma added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
Copy link
Contributor

@franciscoaguirre franciscoaguirre left a comment

Choose a reason for hiding this comment

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

For what it's worth, looks good overall

@kianenigma kianenigma added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
@kianenigma kianenigma enabled auto-merge October 20, 2025 14:13
@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/18654825072
Failed job name: quick-benchmarks-omni

@kianenigma kianenigma added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
@kianenigma kianenigma added this pull request to the merge queue Oct 20, 2025
Merged via the queue into master with commit 56e4b10 Oct 20, 2025
242 of 244 checks passed
@kianenigma kianenigma deleted the kiz-fix-exposure-own-collection branch October 20, 2025 19:47
@paritytech-release-backport-bot

Successfully created backport PR for unstable2507:

paritytech-release-backport-bot bot pushed a commit that referenced this pull request Oct 20, 2025
TLDR: Thanks to a number of reports from Kusama validator, we have been
investigating an issue where the self stake of some validators is not
present in `ErasStakersPaged` and `ErasStakersOverview`, and
consequently not earning staking rewards.

After investigation, it was clear that the `polkadot-staking-miner` is
doing the right thing, and the self-stake is indeed submitted to the
chain as a part of the staking election result.

The root cause in how `pallet-staking-async` ingests the staking
election result. This code **made a (wrong) assumption that self-stake
is only present in the first page of a multi-page election. This PR
fixes this issue.**

---

- [x] (nice to have) revisit try-state checks of the pallet,
`ErasStakersPaged`, `ErasStakersOverview` and `ErasTotalStake` are
triple checked for correctness
- [ ] (nice to have) fix related displays in PJS:
polkadot-js/apps#11930
- [ ] backport to 2507 and 2509
- Westend
- [ ] Find a similar issue in westend for monitoring
(paritytech/devops#4402)
  - [ ] Upgrade westend to a branch/release containing this fix
- [ ] Upgrade westend with this fix, observe test examples are resolved
- [ ] Bump backported version in `fellowship/runtimes`
- [ ] Release 1.9.3 for Kusama with this fix
- [ ] Ensure known test cases are fixed
- One example: `F2WyUUFXLYnBg6acv7t2KFzH6D7CyNcvC4mRCwUdsHTUB4t` (in
election round 46, likely repeating in subsequent ones too)
- This PR will be part of Polkadot release 2.0.0, the Polkadot AHM.
- [ ] Forum post with further explanation once PR is merged.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 56e4b10)
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Oct 20, 2025
TLDR: Thanks to a number of reports from Kusama validator, we have been
investigating an issue where the self stake of some validators is not
present in `ErasStakersPaged` and `ErasStakersOverview`, and
consequently not earning staking rewards.

After investigation, it was clear that the `polkadot-staking-miner` is
doing the right thing, and the self-stake is indeed submitted to the
chain as a part of the staking election result.

The root cause in how `pallet-staking-async` ingests the staking
election result. This code **made a (wrong) assumption that self-stake
is only present in the first page of a multi-page election. This PR
fixes this issue.**

---

- [x] (nice to have) revisit try-state checks of the pallet,
`ErasStakersPaged`, `ErasStakersOverview` and `ErasTotalStake` are
triple checked for correctness
- [ ] (nice to have) fix related displays in PJS:
polkadot-js/apps#11930
- [ ] backport to 2507 and 2509
- Westend
- [ ] Find a similar issue in westend for monitoring
(paritytech/devops#4402)
  - [ ] Upgrade westend to a branch/release containing this fix
- [ ] Upgrade westend with this fix, observe test examples are resolved
- [ ] Bump backported version in `fellowship/runtimes`
- [ ] Release 1.9.3 for Kusama with this fix
- [ ] Ensure known test cases are fixed
- One example: `F2WyUUFXLYnBg6acv7t2KFzH6D7CyNcvC4mRCwUdsHTUB4t` (in
election round 46, likely repeating in subsequent ones too)
- This PR will be part of Polkadot release 2.0.0, the Polkadot AHM.
- [ ] Forum post with further explanation once PR is merged.

---------

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

Successfully created backport PR for stable2509:

kianenigma added a commit that referenced this pull request Oct 20, 2025
Backport #10051 into `unstable2507` from kianenigma.

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: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kianenigma added a commit that referenced this pull request Oct 20, 2025
Backport #10051 into `stable2509` from kianenigma.

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: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants