Merged
Conversation
…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)
Contributor
|
This pull request is amending an existing release. Please proceed with extreme caution,
Emergency Bypass
If you really need to bypass this check: add |
sigurpol
approved these changes
Sep 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #9619 into
stable2509from 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.