-
Notifications
You must be signed in to change notification settings - Fork 1.1k
staking-async: allow session keys handling on AssetHub #10666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sigurpol
wants to merge
26
commits into
master
Choose a base branch
from
sigurpol-session-keys-asset-hub
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dc9400a
session/staking/westend AH and RC: allow to set/purge session keys vi…
sigurpol 0955884
ah-client: proper weight for set_keys_from_ah, purge_keys_from_ah
sigurpol 3e86054
staking-async/rc-client: improve documentation
sigurpol 1c09588
staking-async-rc-client: only validators are allowed to set/purge keys
sigurpol 9b76270
fix prdoc
sigurpol 4dd074b
staking-async-rc-client: session keys as raw bytes
sigurpol 45a7526
staking-async-rc-client: improve documentation
sigurpol d36a42c
improve prdoc
sigurpol 5064a6c
staking-async/ah: add unit testss
sigurpol 619ec8a
staking-async/rc: add unit tests
sigurpol 668f7a3
staking-async/ah: add e2e test
sigurpol e5b2ef8
staking-async/ah: more tests
sigurpol fe233b0
session keys and ownership proof fully validated on AH
sigurpol 5fd5a0c
Merge branch 'master' into sigurpol-session-keys-asset-hub
sigurpol d4c3f2f
Updated ownership_proof_is_valid call to use the new 2 arg signature
sigurpol 96a5e00
more tests
sigurpol bcd7664
Merge branch 'master' into sigurpol-session-keys-asset-hub
sigurpol e4af53f
staking-async: fix CI
sigurpol 0a13bb5
asset-hub-westend: add support for staking proxy
sigurpol 294704e
staking-async: tests around staking proxy
sigurpol b28ced4
asset-hub-westend: test keys match between AH and RC
sigurpol a498cbb
staking-async/rc: add benchmarks for set/purge_keys
sigurpol 3519aef
Merge branch 'master' into sigurpol-session-keys-asset-hub
sigurpol fa76173
staking-async/rc: bounded vec for set_keys
sigurpol be0cd04
Update from github-actions[bot] running command 'bench --pallet palle…
github-actions[bot] 23f49e5
Cleanup
sigurpol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| title: 'staking-async: allow session keys handling on AssetHub' | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: |- | ||
| - Added session keys handling on AssetHub for staking-async: validators can now call set_keys and purge_keys on AssetHub, which forwards the request to the RelayChain via XCM. | ||
| - Validators are still allowed to call `set_keys` and `purge_keys` via relay-chain pallet-session's related extrinsics. This option will be deprecated in the future. | ||
| - No key deposit is set on AssetHub yet. | ||
| crates: | ||
| - name: asset-hub-westend-runtime | ||
| bump: major | ||
| - name: westend-runtime | ||
| bump: major | ||
| - name: pallet-session | ||
| bump: minor | ||
| - name: pallet-staking-async-ah-client | ||
| bump: major | ||
| - name: pallet-staking-async-rc-client | ||
| bump: major | ||
| - name: pallet-staking-async | ||
| bump: major |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't we directly xcm::transact session pallet call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding - which might be wrong - is that if we use xcm::transact directly to call pallet_session::set_keys, then RC has no way to know that the transaction was signed by validator X, the origin would be just the XCM origin (Parachain(1000) or something) and pallet_session::set_keys requires ensure_signed(origin) so it would need the account of X. so ensure_origin would fail because it would find AH as origin and not X.
ah-client solves the issues :
Note that RC relies on AH to have verified that the transaction is signed by X
Does it make sense?