-
Notifications
You must be signed in to change notification settings - Fork 829
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
Design and implement pallet-staking-rc-client
#6166
Labels
T2-pallets
This PR/Issue is related to a particular pallet.
Comments
Being worked at https://github.com/paritytech/polkadot-sdk/compare/gpestana/staking-rc-client EDIT: PR open #6259 |
I was thinking we could have only one pallet for both chains, this (AH) and RC since they need to work well together. Then both can be configured to act as |
1 task
1 task
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 18, 2025
Recreation of #7357 on top of master. The old PR messes up the git history too much so I am recreating it from scratch. This PR is work in progress. It's purpose is to commit initial structure of `pallet-staking-ah-client` and `pallet-staking-rc-client` to master. The changes will be polished by a follow up PRs which will be backported. Related issues: #6167 and #6166 This PR introduces the initial structure for `pallet-ah-client` and `pallet-rc-client`. These pallets will reside on the relay chain and AssetHub, respectively, and will manage the interaction between `pallet-session` on the relay chain and `pallet-staking` on AssetHub. Both pallets are experimental and not intended for production use. TODOs: - [ ] Probably handle #6344 here. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ankan <[email protected]>
clangenb
pushed a commit
to clangenb/polkadot-sdk
that referenced
this issue
Feb 19, 2025
…#7582) Recreation of paritytech#7357 on top of master. The old PR messes up the git history too much so I am recreating it from scratch. This PR is work in progress. It's purpose is to commit initial structure of `pallet-staking-ah-client` and `pallet-staking-rc-client` to master. The changes will be polished by a follow up PRs which will be backported. Related issues: paritytech#6167 and paritytech#6166 This PR introduces the initial structure for `pallet-ah-client` and `pallet-rc-client`. These pallets will reside on the relay chain and AssetHub, respectively, and will manage the interaction between `pallet-session` on the relay chain and `pallet-staking` on AssetHub. Both pallets are experimental and not intended for production use. TODOs: - [ ] Probably handle paritytech#6344 here. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ankan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Design and implement the relay-chain client pallet (i.e. deployed in the staking parachain) that handles i/o from the relay chain, most notably:
New pallet being worked at https://github.com/paritytech/polkadot-sdk/compare/gpestana/staking-rc-client. Opening a PR asap.
Counter-part pallet of
pallet-staking-client
(#6167).Tasks
The relay chain and AH staking need to interact with each other over an era in different phases of an election. The communication must be done through XCM and each of functions have different requirements and time/space constraints.
Era rotation and new validator set
The relay-chain does not have the concept of "era". Staking and EPM-MB will run the elections in AH and once a new set of validators is ready, it notifies the relay-chain to change the validator set through XCM. This means that if no election happens within the expected time, the current validator set will remain active in the relay-chain.
new_validator_set
XCM message passing (pallet-staking-rc-client
-> relay-chain) with message batchingRegister/unregister validator keys
Currently, the session pallet in the relay-chain exposes
Call::set_keys
andCall::purge_keys
for wannabe validators to set/unset their session keys. With AH staking, these extrinsics should be exposed in thepallet-staking-rc-client
(or in thepallet-staking
). This information should be propagated through XCM to thepallet-staking-client
in the relay chain with a similar behaviour as currently (i.e.set_keys
will be placed in theNextKeys
storage, etc).set_keys
/purge_keys
extrinsic ad XCM message passing (pallet-staking-rc-client
-> relay-chain)NextKeys
in relay-chain is in sync with the new session/era expected by AH?Block producing era points
Currently, the staking pallet implements the
pallet_authorship::EventHandler
to receive the era points of a block author for the current session. As similar interface must be implemented with XCM as i/o instead.Given the potential delays in calling and propagating
EventHandler::reward_by_ids
between rc and AH, the reward payout may be done only after era+1 ("era" being the active era of the validator).(session, validator)
tuple?Offences
There are 2 types of offence reports currently, implicit and explicit. The implicit offences are generated in the relay chain and should be propagated to AH staking for slashing. The explicit (i.e. signed offences) are reported by signed origins through an extrinsic. This extrinsic should be implemented in the
pallet-staking-rc-client
(i.e. in AH) and relayed to the relay chain with XCM.The relay chain should implement a thin disablement layer to ensure that the implicit offences result in a timely validator disablement in the relay-chain without having to wait for the RC -> AH -> RC XCM message passing.
report_offence
) extrinsic and XCM message passing (pallet-staking-rc-client
-> relay-chain)pallet-staking-client
(in relay-chain). Related to Design and implementpallet-staking-client
#6167The text was updated successfully, but these errors were encountered: