Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Adds stake-tracker pallet #14620

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Adds stake-tracker pallet #14620

wants to merge 11 commits into from

Conversation

gpestana
Copy link
Contributor

@gpestana gpestana commented Jul 24, 2023

This PR adds the stake-tracker pallet without integrating it with the staking and bags lists pallets.

The stake-tracker pallet implements the OnStakingUpdate trait to listen to staking events and multiplexes those events to one or multiple types (e.g. pallets). Initially, the stake tracker pallet is used as a degree of indirection to maintain the target and voter semi-sorted lists up to date.

The final goal is to achieve a design where the targets and voters lists are updated at each relevant staking event through the stake-tracker pallet. The list reads in staking are performed directly through the SortedListProvider.

image

To finalize

  • Improve test coverage
  • Consider a multi-block event processing to handle updates on slashes and rewards for both targets and voters (unconfirmed, perhaps on a follow-up PR).

Related and step towards paritytech/polkadot-sdk#443

@gpestana gpestana added A3-in_progress Pull request is in progress. No review needed at this stage. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T1-runtime This PR/Issue is related to the topic “runtime”. labels Jul 24, 2023
@gpestana gpestana self-assigned this Jul 24, 2023
@gpestana gpestana requested review from a team July 24, 2023 10:56
@gpestana gpestana marked this pull request as draft July 24, 2023 10:56
@gpestana gpestana marked this pull request as ready for review July 26, 2023 15:49
@gpestana gpestana added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Jul 26, 2023
@gpestana gpestana added A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels Aug 1, 2023
@gpestana
Copy link
Contributor Author

gpestana commented Aug 1, 2023

bot rebase

@paritytech-processbot
Copy link

Rebased

@gpestana gpestana added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Aug 1, 2023
@gpestana
Copy link
Contributor Author

gpestana commented Aug 3, 2023

bot fmt

@command-bot
Copy link

command-bot bot commented Aug 3, 2023

@gpestana https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3324898 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 3-72e4e84e-96c0-4fc7-bb0a-0d718f022a73 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Aug 3, 2023

@gpestana Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3324898 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3324898/artifacts/download.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3324915

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T1-runtime This PR/Issue is related to the topic “runtime”.
Projects
Status: ✂️ In progress.
Development

Successfully merging this pull request may close these issues.

4 participants