This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Adds stake-tracker
pallet
#14620
Open
gpestana
wants to merge
11
commits into
master
Choose a base branch
from
gpestana/stake-tracker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adds stake-tracker
pallet
#14620
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
497c836
Adds scaffolding for stake-tracker pallet
gpestana 1707606
Adds first iteration of the stake-tracker pallet
gpestana e59b7aa
Finishes slashing logic; finish tests
gpestana d8030a5
generalizes update score in the list; adds more rust docs
gpestana 47d44e7
Merge remote-tracking branch 'origin/master' into gpestana/stake-tracker
91afc5c
Fix logic; Improve documentation
gpestana aada381
improves test coverage
gpestana a1ca713
Complete staking interface impl
gpestana 76c9bff
Fix
gpestana ab6f7a6
Makes slash a noop
gpestana 763e83d
".git/.scripts/commands/fmt/fmt.sh"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[package] | ||
name = "pallet-stake-tracker" | ||
version = "0.1.0" | ||
description = "FRAME stake tracker pallet" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
homepage = "https://substrate.io" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/paritytech/substrate" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive"] } | ||
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } | ||
|
||
sp-runtime = { version = "24.0.0", default-features = false, path = "../../primitives/runtime", features = ["serde"] } | ||
sp-staking = { version = "4.0.0-dev", default-features = false, path = "../../primitives/staking", features = ["serde"] } | ||
sp-std = { version = "8.0.0", default-features = false, path = "../../primitives/std" } | ||
|
||
sp-npos-elections = { version = "4.0.0-dev", path = "../../primitives/npos-elections" } | ||
frame-election-provider-support = { version = "4.0.0-dev", default-features = false, path = "../election-provider-support" } | ||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" } | ||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support"} | ||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" } | ||
|
||
[dev-dependencies] | ||
sp-std = { version = "8.0.0", default-features = false, path = "../../primitives/std" } | ||
sp-core = { version = "21.0.0", path = "../../primitives/core" } | ||
sp-io = { version = "23.0.0", default-features = false, path = "../../primitives/io" } | ||
sp-runtime = { version = "24.0.0", default-features = false, path = "../../primitives/runtime", features = ["serde"] } | ||
sp-tracing = { version = "10.0.0", path = "../../primitives/tracing" } | ||
pallet-bags-list = { version = "4.0.0-dev", path = "../bags-list" } | ||
pallet-balances = { version = "4.0.0-dev", path = "../balances" } | ||
|
||
[features] | ||
default = ["std"] | ||
|
||
std = [ | ||
"codec/std", | ||
"frame-benchmarking?/std", | ||
"frame-support/std", | ||
"frame-system/std", | ||
"scale-info/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
] | ||
|
||
runtime-benchmarks = [ | ||
"frame-benchmarking/runtime-benchmarks", | ||
"frame-support/runtime-benchmarks", | ||
"frame-system/runtime-benchmarks", | ||
"sp-runtime/runtime-benchmarks", | ||
] | ||
|
||
try-runtime = [ | ||
"frame-support/try-runtime", | ||
"frame-system/try-runtime", | ||
"sp-runtime/try-runtime", | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Pallet `stake-tracker` | ||
|
||
The stake-tracker pallet is listens to staking events through implemeting the | ||
[`OnStakingUpdate`] trait and forwards those events to one or multiple types (e.g. pallets) that | ||
must be kept up to date with certain updates in staking. The pallet does not expose any | ||
callables and acts as a multiplexer of staking events. | ||
|
||
Currently, the stake tracker pallet is used to update the semi-sorted target and voter lists | ||
implemented through bags lists. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.