staking-async: allow session keys handling on AssetHub#10666
Merged
staking-async: allow session keys handling on AssetHub#10666
Conversation
Contributor
Author
|
/cmd prdoc --audience runtime_dev --bump major |
4f19e9b to
06c4e0e
Compare
…a AH - Allow setting or purging keys via AH -> XCM -> RC. - Maintain the option to set or purge keys via RC for backward compatibility. - We do not yet enforce or handle deposits on AH; this will be addressed once RC extrinsics are fully deprecated. - Updated Westend RC to set the deposit to 0, aligning it with the current Polkadot/Kusama RC, and modified Westend AH to support setting or purging keys. TODO: - Tests - Benchmarking
06c4e0e to
dc9400a
Compare
Ank4n
reviewed
Dec 18, 2025
Ank4n
reviewed
Dec 18, 2025
Ank4n
reviewed
Dec 18, 2025
Contributor
Author
|
Main outcome of discussion with @Ank4n :
|
sigurpol
commented
Dec 18, 2025
kianenigma
approved these changes
Jan 22, 2026
muharem
approved these changes
Jan 26, 2026
| /// AssetHub validates both keys and ownership proof before sending. | ||
| /// RC trusts AH's validation and does not re-validate. | ||
| #[pallet::call_index(3)] | ||
| #[pallet::weight(T::SessionInterface::set_keys_weight())] |
Contributor
There was a problem hiding this comment.
I think its better to be able to benchmark calls, even if its proxy call. But not a blocker.
Contributor
Author
There was a problem hiding this comment.
agreed - I will add as followup PR
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-10666-to-stable2512
git worktree add --checkout .worktree/backport-10666-to-stable2512 backport-10666-to-stable2512
cd .worktree/backport-10666-to-stable2512
git reset --hard HEAD^
git cherry-pick -x f154a3464ff17a7c3239b02f41230a0c3f3f90da
git push --force-with-lease |
sigurpol
added a commit
that referenced
this pull request
Jan 27, 2026
Backport #10666 into `stable2512` from sigurpol. **NOTE**: PR #1739 (ownership proof validation) has not been backported to stable2512. While backporting #10666 - which fully integrates with proof of ownership - we need to make few changes: - remove proof parameter from extrinsic and Config trait - remove proof validation tests - fix session keys generation and related tests and benchmarking - update papi-test to remove proof from set_keys API call We also remove poll_operations module and related cleanup from ahm-test since APIs like NextPollWeight, PagedElectionOutOfWeight etc are not in stable2512. 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>
sigurpol
added a commit
that referenced
this pull request
Mar 4, 2026
Add `proof: Vec<u8>` to the `set_keys` extrinsic for forward compatibility with PR #1739, which introduces real ownership proof validation. Proof validation is a no-op until we backport PR #1739. Note: I have added `validate:false` for pallet-staking-async-rc-client. The `set_keys` extrinsic has never been deployed on Polkadot/Kusama AH yet, it will be deployed just with release `2.1.0` the first time so it's a brand new API release-wise introduced with the backport of #10666. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
arturgontijo
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this pull request
Apr 1, 2026
Backport paritytech#10666 into `stable2512` from sigurpol. **NOTE**: PR paritytech#1739 (ownership proof validation) has not been backported to stable2512. While backporting paritytech#10666 - which fully integrates with proof of ownership - we need to make few changes: - remove proof parameter from extrinsic and Config trait - remove proof validation tests - fix session keys generation and related tests and benchmarking - update papi-test to remove proof from set_keys API call We also remove poll_operations module and related cleanup from ahm-test since APIs like NextPollWeight, PagedElectionOutOfWeight etc are not in stable2512. 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>
arturgontijo
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this pull request
Apr 1, 2026
…11255) Add `proof: Vec<u8>` to the `set_keys` extrinsic for forward compatibility with PR paritytech#1739, which introduces real ownership proof validation. Proof validation is a no-op until we backport PR paritytech#1739. Note: I have added `validate:false` for pallet-staking-async-rc-client. The `set_keys` extrinsic has never been deployed on Polkadot/Kusama AH yet, it will be deployed just with release `2.1.0` the first time so it's a brand new API release-wise introduced with the backport of paritytech#10666. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Key Points :
Flow: User calls set_keys on AH → AH validates keys/proof → AH sends XCM to RC → RC calls set_keys_from_ah → RC sets keys via SessionInterface
Fee model: Total fee = delivery fee + execution cost, all charged on AH upfront; RC uses UnpaidExecution
Validation split:
Access control:
Notes:
set_keysandpurge_keyson behalf of validators. TheProxyType::Stakingfilter on runtime has been updated to include these calls.set_keysandpurge_keysvia relay-chain pallet-session's extrinsics. This option will be deprecated in the future.(bond -> set_keys -> validate), users on Asset Hub MUST call bond and validate BEFORE calling set_keys. Attempting to set keys before declaring intent to validate will fail with NotValidator.Close #8806.