-
Notifications
You must be signed in to change notification settings - Fork 823
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
Implementation of ah-client and rc-client staking pallets #7582
Conversation
#[pallet::storage] | ||
pub type ValidatorSet<T: Config> = StorageValue< | ||
_, | ||
Option<Vec<(T::AccountId, Exposure<T::AccountId, BalanceOf<T>>)>>, |
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.
A comment from @kianenigma
Also exposures will not be stored anywhere in RC anymore, so they should not be in this storage?
RC will only know the list of validators.
@Ank4n rasied the same point. He removed Exposure
in his PR but since we are working in parallel I can't use its work here.
I'm leaving this as is for now and will remove it in the next PRs.
} | ||
} | ||
|
||
fn start_session(session_index: u32) { |
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.
From @Ank4n (old comment)
What we do need to send is the block timestamp (unless @kianenigma thought of a better approach) when this pallet provides a new validator set to the session—essentially the timestamp marking an era change. This will help AH calculate staking rewards for validators in that era.
|
||
/// Keeps track of the session points for each block author in the current session. | ||
#[pallet::storage] | ||
pub type BlockAuthors<T: Config> = StorageMap<_, Twox64Concat, AccountId32, u32, ValueQuery>; |
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.
TODO:
Also, I just realized that other than block authorship, the parachains protocol also adds points for parachain work.
<pallet_staking::Pallet<C>>::reward_by_ids(rewards);
…-staking` which is published
All GitHub workflows were cancelled due to failure one of the required jobs. |
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
andpallet-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
andpallet-rc-client
. These pallets will reside on the relay chain and AssetHub, respectively, and will manage the interaction betweenpallet-session
on the relay chain andpallet-staking
on AssetHub.Both pallets are experimental and not intended for production use.
TODOs: