Skip to content

[stable2509] Backport #9619#9697

Merged
sigurpol merged 1 commit intostable2509from
backport-9619-to-stable2509
Sep 10, 2025
Merged

[stable2509] Backport #9619#9697
sigurpol merged 1 commit intostable2509from
backport-9619-to-stable2509

Conversation

@paritytech-release-backport-bot
Copy link
Copy Markdown

@paritytech-release-backport-bot paritytech-release-backport-bot bot commented Sep 10, 2025

Backport #9619 into stable2509 from kianenigma.

See the documentation on how to use this bot.

NOTE: this PR introduces major changes in the staking-async pallet, needed to address critical issues related to Staking vs VMP. They are needed to improve robustness and resilience of the staking machinery (paginated offences, retry mechanism for session report and validator set), this is why we are backporting it.

…et (#9619)

* Please see the full design do
[here](https://docs.google.com/document/d/1l2COWct1f-gC8nM0tq7Xs8pBWeAP6pX0LociWC6enUg/edit?tab=t.0)
* closes https://github.com/paritytech-secops/srlabs_findings/issues/520

This PR makes the following changes:

#### Common

* `SendToRelayChain` and `SendToAssetHub` traits now return a result,
allowing the caller to know if the underlying XCM was sent or not.
* Adds a number of testing facilities to `pallet-root-offences`, and
`staking-async/papi-tests`. Both of which can be ignored in the review.

#### Offences

* `SendToAssetHub::relay_new_offence` is removed. Instead, we use the
new `relay_new_offence_paged` which is a vector of self-contained
offences, not requiring us to group offences per session in each
message.
* Offences are not sent immediately anymore.
* Instead, they are stored in a paginated `OffenceSendQueue`.
* `on-init`, we grab one page of this storage map, and sent it.

#### Session Report
* Session reports now also have a retry mechanism.
* Upon each failure, we emit an `UnexpectedEvent`
* If our retries run out and we still can't send the session report, we
will emit a different `UnexpectedEvent`. We also retore the validator
points that we meant to send, and merge them back, so that they are sent
in the next session report.

#### Validator Set
* Similar to offences, they are not sent immediately anymore.
* Instead, they are stored in a storage item, and are sent on subsequent
on-inits.
* A maximum retry count is added.

### Review notes

As noted above, ignore all changes in
* `staking-async/runtimes`
* `staking-async/runtimes/papi-tests`
* `root-offences`

As they are only related to testing.

---------

Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit f7b0396)
@paritytech-release-backport-bot paritytech-release-backport-bot bot requested a review from a team as a code owner September 10, 2025 07:57
@github-actions github-actions bot added the A3-backport Pull request is already reviewed well in another branch. label Sep 10, 2025
@github-actions github-actions bot requested a review from kianenigma September 10, 2025 07:58
@github-actions
Copy link
Copy Markdown
Contributor

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@sigurpol sigurpol merged commit 89e0fc1 into stable2509 Sep 10, 2025
248 of 250 checks passed
@sigurpol sigurpol deleted the backport-9619-to-stable2509 branch September 10, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants