forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fast Unstake Pallet (paritytech#12129)
* add failing test for itamar * an ugly example of fast unstake * Revert "add failing test for itamar" This reverts commit bdd1399. * fast unstake wip * clean it up a bit * some comments * on_idle logic * fix * comment * new working version, checks all pass, looking good * some notes * add mock boilerplate * more boilerplate * simplify the weight stuff * ExtBuilder for pools * fmt * rm bags-list, simplify setup_works * mock + tests boilerplate * make some benchmarks work * mock boilerplate * tests boilerplate * run_to_block works * add Error enums * add test * note * make UnstakeRequest fields pub * some tests * fix origin * fmt * add fast_unstake_events_since_last_call * text * rewrite some benchmes and fix them -- the outcome is still strange * Fix weights * cleanup * Update frame/election-provider-support/solution-type/src/single_page.rs * fix build * Fix pools tests * iterate teset + mock * test unfinished * cleanup and add some tests * add test successful_multi_queue * comment * rm Head check * add TODO * complete successful_multi_queue * + test early_exit * fix a lot of things above the beautiful atlantic ocean 🌊 * seemingly it is finished now * Fix build * ".git/.scripts/fmt.sh" 1 * Fix slashing amount as well * better docs * abstract types * rm use * import * Update frame/nomination-pools/benchmarking/src/lib.rs Co-authored-by: Nitwit <[email protected]> * Update frame/fast-unstake/src/types.rs Co-authored-by: Nitwit <[email protected]> * Fix build * fmt * Update frame/fast-unstake/src/lib.rs Co-authored-by: Keith Yeung <[email protected]> * make bounded * feedback from code review with Ankan * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/lib.rs Co-authored-by: Roman Useinov <[email protected]> * Update frame/fast-unstake/src/mock.rs * update to master * some final review comments * fmt * fix clippy * remove unused * ".git/.scripts/fmt.sh" 1 * make it all build again * fmt * undo fishy change Co-authored-by: Ross Bulat <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Nitwit <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Roman Useinov <[email protected]>
- Loading branch information
Showing
21 changed files
with
2,650 additions
and
29 deletions.
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 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 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 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 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 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 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 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 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,70 @@ | ||
[package] | ||
name = "pallet-fast-unstake" | ||
version = "4.0.0-dev" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2021" | ||
license = "Unlicense" | ||
homepage = "https://substrate.io" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "FRAME fast unstake pallet" | ||
readme = "README.md" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } | ||
log = { version = "0.4.17", default-features = false } | ||
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } | ||
|
||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" } | ||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" } | ||
|
||
sp-io = { version = "6.0.0", default-features = false, path = "../../primitives/io" } | ||
sp-runtime = { version = "6.0.0", default-features = false, path = "../../primitives/runtime" } | ||
sp-std = { version = "4.0.0", default-features = false, path = "../../primitives/std" } | ||
sp-staking = { default-features = false, path = "../../primitives/staking" } | ||
|
||
pallet-balances = { default-features = false, path = "../balances" } | ||
pallet-timestamp = { default-features = false, path = "../timestamp" } | ||
pallet-staking = { default-features = false, path = "../staking" } | ||
pallet-nomination-pools = { default-features = false, path = "../nomination-pools" } | ||
frame-election-provider-support = { default-features = false, path = "../election-provider-support" } | ||
|
||
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" } | ||
|
||
[dev-dependencies] | ||
pallet-staking-reward-curve = { version = "4.0.0-dev", path = "../staking/reward-curve" } | ||
sp-core = { version = "6.0.0", default-features = false, path = "../../primitives/core" } | ||
substrate-test-utils = { version = "4.0.0-dev", path = "../../test-utils" } | ||
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"codec/std", | ||
"log/std", | ||
"scale-info/std", | ||
|
||
"frame-support/std", | ||
"frame-system/std", | ||
|
||
"sp-io/std", | ||
"sp-staking/std", | ||
"sp-runtime/std", | ||
"sp-std/std", | ||
|
||
"pallet-staking/std", | ||
"pallet-nomination-pools/std", | ||
"pallet-balances/std", | ||
"pallet-timestamp/std", | ||
"frame-election-provider-support/std", | ||
|
||
"frame-benchmarking/std", | ||
] | ||
runtime-benchmarks = [ | ||
"frame-benchmarking/runtime-benchmarks", | ||
"frame-system/runtime-benchmarks", | ||
"pallet-staking/runtime-benchmarks", | ||
] | ||
try-runtime = ["frame-support/try-runtime"] |
Oops, something went wrong.