Implements a mechanism to lock/unlock the SortedListProvider and bags-list iter (v2)#6520
Closed
Implements a mechanism to lock/unlock the SortedListProvider and bags-list iter (v2)#6520
Conversation
4 tasks
Contributor
Author
|
bot fmt |
Contributor
Author
|
bot clean |
Ank4n
reviewed
Nov 20, 2024
…tana/bags-list_lock_relaxed
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
3 tasks
26 tasks
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 <g6pestana@gmail.com> Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: command-bot <> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Giuseppe Re <giuseppe.re@parity.io> 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
## 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 <g6pestana@gmail.com> Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com> Co-authored-by: command-bot <> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Giuseppe Re <giuseppe.re@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Note: to check how to use this mechanism in the context of the EPM-MB, refer to #6610 which merges this branch and refactors the multi-block snapshot creation with the sorted list preserve order logic.
This PR refactors the bags list pallet to support a mode which preserves the order of the elements in the list.
While the implementor of a new bags-list's config type
Config::PreserveOrderreturnstrue, no rebags or moves within a bag are allowed. Which in practice means that:Pallet::rebag,Pallet::put_in_front_ofandPallet::put_in_front_of_otherwill return an error.SortedListProvider::on_updateis a noop (to avoid rebags).The Staking pallet implements the preserve order getter, which should be set while a multi-block snapshot is progressing. For now, it returns always
falsebut the implementation should map the state of the snapshot progress in the multi-block staking (#6034).Closes #6328