-
Notifications
You must be signed in to change notification settings - Fork 803
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
[WIP] Implementation of ah-client
and rc-client
staking pallets
#7357
base: kiz-multi-block-eletion
Are you sure you want to change the base?
Conversation
origin: OriginFor<T>, | ||
new_validator_set: Vec<(T::AccountId, Exposure<T::AccountId, BalanceOf<T>>)>, | ||
) -> DispatchResult { | ||
// TODO: origin? |
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.
Should be a permissioned origin that can only be called by XCM. I think from the pallet you can use EnsureOrigin
and configure it in the runtime.
Look into the coretime stuff, it uses the same mechanism.
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.
Good start, but not much to add for now.
I suggest following these steps next to make it more concrete:
- Get the XCM transfer going and working. This is isolated work, and a 100% useful primitive.
- Once the transfer layer is in place, do these two:
- receive some validator set "at some point" in
rc-client
, and you forward it toah-client
. - Forward session updates in the reverse way.
All GitHub workflows were cancelled due to failure one of the required jobs. |
Thanks for the advice @kianenigma. Indeed the PR is just a boilerplate code so far. Before diving into the XCM I wanted to 'plug' the new Two questions so far.
|
sp-staking = { features = ["serde"], workspace = true } | ||
pallet-authorship = { workspace = true } | ||
pallet-session = { features = [ "historical",], workspace = true } | ||
pallet-staking = { workspace = true} # todo: probably not a good idea to depend on the whole staking pallet |
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.
Is it a bad idea to depend on the whole pallet-staking
just to use ExposureOf
?
Yea I'd commit those changes and also remove the migrated pallets from the relay while you're there, as that will expose any missing trait boundaries etc that the pallet needs to satisfy.
Yes. You can see the pallets which are added to AH-next here, which also should be a 1to1 mapping of what is being moved off the relay chain. I'd stick to the staking-related ones for now for what you're doing, as the gov ones will take some untangling |
This PR is work in progress.
Related issues: #6167 and #6166
@Ank4n @kianenigma I'm opening this PR to discuss the new staking pallets, stay up to date on the implementation and last but not least - to ask questions.
TODOs: