paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Adds `stake-tracker` pallet #14620

Open gpestana opened 1 year ago

gpestana commented 1 year ago

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

Related and step towards https://github.com/paritytech/polkadot-sdk/issues/443

gpestana commented 1 year ago

bot rebase

paritytech-processbot[bot] commented 1 year ago

Rebased

gpestana commented 1 year ago

bot fmt

command-bot[bot] commented 1 year ago

@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[bot] commented 1 year ago

@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 commented 1 year ago

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