[DNM] Implementation of ah-client and rc-client staking pallets (the old one)#7357
Closed
[DNM] Implementation of ah-client and rc-client staking pallets (the old one)#7357
ah-client and rc-client staking pallets (the old one)#7357Conversation
kianenigma
reviewed
Feb 15, 2025
kianenigma
reviewed
Feb 15, 2025
| // A session with the given index has ended. The block authors with their corresponding | ||
| // session points are provided. | ||
| #[codec(index = 1)] | ||
| RelayChainSessionEnd(SessionIndex, Vec<(AccountId32, u32)>), |
Contributor
There was a problem hiding this comment.
Kusama: 32 + 4 * 1000 ~ 4K bytes
Polkadot: 32 + 4 * 500 ~ 2K bytes
kianenigma
reviewed
Feb 15, 2025
| pub struct Pallet<T>(_); | ||
|
|
||
| // TODO: should contain some initial state, otherwise starting from genesis won't work | ||
| #[pallet::storage] |
Contributor
There was a problem hiding this comment.
For testing you can use #[pallet::genesis].
For AHM, I think it can remain empty and soon enough a new election result will come form AH.
kianenigma
reviewed
Feb 15, 2025
kianenigma
reviewed
Feb 15, 2025
|
|
||
| /// 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>; |
Contributor
There was a problem hiding this comment.
You might want to call this ValidatorPoints.
Also, I just realized that other than block authorship, the parachains protocol also adds points for parachain work.
Contributor
There was a problem hiding this comment.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 15, 2025
## Multi Block Election Pallet This PR adds the first iteration of the multi-block staking pallet. From this point onwards, the staking and its election provider pallets are being customized to work in AssetHub. While usage in solo-chains is still possible, it is not longer the main focus of this pallet. For a safer usage, please fork and user an older version of this pallet. --- ## Replaces - [x] #6034 - [x] #5272 ## Related PRs: - [x] #7483 - [ ] #7357 - [ ] #7424 - [ ] paritytech/polkadot-staking-miner#955 This branch can be periodically merged into #7358 -> #6996 ## TODOs: - [x] rebase to master - Benchmarking for staking critical path - [x] snapshot - [x] election result - Benchmarking for EPMB critical path - [x] snapshot - [x] verification - [x] submission - [x] unsigned submission - [ ] election results fetching - [ ] Fix deletion weights. Either of - [ ] Garbage collector + lazy removal of all paged storage items - [ ] Confirm that deletion is small PoV footprint. - [ ] Move election prediction to be push based. @tdimitrov - [ ] integrity checks for bounds - [ ] Properly benchmark this as a part of CI -- for now I will remove them as they are too slow - [x] add try-state to all pallets - [x] Staking to allow genesis dev accounts to be created internally - [x] Decouple miner config so @niklasad1 can work on the miner 72841b7 - [x] duplicate snapshot page reported by @niklasad1 - [ ] #6520 or equivalent -- during snapshot, `VoterList` must be locked - [ ] Move target snapshot to a separate block --------- Co-authored-by: Gonçalo Pestana <[email protected]> Co-authored-by: Ankan <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ah-client and rc-client staking palletsah-client and rc-client staking pallets [OLD ONE]
1 task
ah-client and rc-client staking pallets [OLD ONE]ah-client and rc-client staking pallets (the old one)
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
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 pull request
Feb 19, 2025
## Multi Block Election Pallet This PR adds the first iteration of the multi-block staking pallet. From this point onwards, the staking and its election provider pallets are being customized to work in AssetHub. While usage in solo-chains is still possible, it is not longer the main focus of this pallet. For a safer usage, please fork and user an older version of this pallet. --- ## Replaces - [x] paritytech#6034 - [x] paritytech#5272 ## Related PRs: - [x] paritytech#7483 - [ ] paritytech#7357 - [ ] paritytech#7424 - [ ] paritytech/polkadot-staking-miner#955 This branch can be periodically merged into paritytech#7358 -> paritytech#6996 ## TODOs: - [x] rebase to master - Benchmarking for staking critical path - [x] snapshot - [x] election result - Benchmarking for EPMB critical path - [x] snapshot - [x] verification - [x] submission - [x] unsigned submission - [ ] election results fetching - [ ] Fix deletion weights. Either of - [ ] Garbage collector + lazy removal of all paged storage items - [ ] Confirm that deletion is small PoV footprint. - [ ] Move election prediction to be push based. @tdimitrov - [ ] integrity checks for bounds - [ ] Properly benchmark this as a part of CI -- for now I will remove them as they are too slow - [x] add try-state to all pallets - [x] Staking to allow genesis dev accounts to be created internally - [x] Decouple miner config so @niklasad1 can work on the miner 72841b7 - [x] duplicate snapshot page reported by @niklasad1 - [ ] paritytech#6520 or equivalent -- during snapshot, `VoterList` must be locked - [ ] Move target snapshot to a separate block --------- Co-authored-by: Gonçalo Pestana <[email protected]> Co-authored-by: Ankan <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
clangenb
pushed a commit
to clangenb/polkadot-sdk
that referenced
this pull request
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]>
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.
This PR is work in progress.
Related issues: #6167 and #6166
This PR introduces the initial structure for
pallet-ah-clientandpallet-rc-client. These pallets will reside on the relay chain and AssetHub, respectively, and will manage the interaction betweenpallet-sessionon the relay chain andpallet-stakingon AssetHub.Both pallets are experimental and not intended for production use.
TODOs: