forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple Staking and Election - Part 2 Unsigned Phase (paritytech#7909)
* Base features and traits. * pallet and unsigned phase * Undo bad formattings. * some formatting cleanup. * Small self-cleanup. * Make it all build * self-review * Some doc tests. * Some changes from other PR * Fix session test * Update Cargo.lock * Update frame/election-provider-multi-phase/src/lib.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * Some review comments * Rename + make encode/decode * Do an assert as well, just in case. * Fix build * Update frame/election-provider-multi-phase/src/unsigned.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * Las comment * fix staking fuzzer. * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Add one last layer of feasibility check as well. * Last fixes to benchmarks * Some more docs. * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Some nits * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Fix doc * Mkae ci green Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Parity Benchmarking Bot <[email protected]>
- Loading branch information
1 parent
27e1f89
commit 1c434cd
Showing
34 changed files
with
4,092 additions
and
231 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,66 @@ | ||
[package] | ||
name = "pallet-election-provider-multi-phase" | ||
version = "3.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
description = "PALLET two phase election providers" | ||
readme = "README.md" | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[dependencies] | ||
static_assertions = "1.1.0" | ||
serde = { version = "1.0.101", optional = true } | ||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } | ||
|
||
frame-support = { version = "3.0.0", default-features = false, path = "../support" } | ||
frame-system = { version = "3.0.0", default-features = false, path = "../system" } | ||
|
||
sp-io ={ version = "3.0.0", default-features = false, path = "../../primitives/io" } | ||
sp-std = { version = "3.0.0", default-features = false, path = "../../primitives/std" } | ||
sp-runtime = { version = "3.0.0", default-features = false, path = "../../primitives/runtime" } | ||
sp-npos-elections = { version = "3.0.0", default-features = false, path = "../../primitives/npos-elections" } | ||
sp-arithmetic = { version = "3.0.0", default-features = false, path = "../../primitives/arithmetic" } | ||
sp-election-providers = { version = "3.0.0", default-features = false, path = "../../primitives/election-providers" } | ||
|
||
# Optional imports for benchmarking | ||
frame-benchmarking = { version = "3.0.0", default-features = false, path = "../benchmarking", optional = true } | ||
rand = { version = "0.7.3", default-features = false, optional = true, features = ["alloc", "small_rng"] } | ||
|
||
[dev-dependencies] | ||
paste = "1.0.3" | ||
parking_lot = "0.11.0" | ||
rand = { version = "0.7.3" } | ||
hex-literal = "0.3.1" | ||
substrate-test-utils = { version = "3.0.0", path = "../../test-utils" } | ||
sp-io = { version = "3.0.0", path = "../../primitives/io" } | ||
sp-core = { version = "3.0.0", path = "../../primitives/core" } | ||
sp-tracing = { version = "3.0.0", path = "../../primitives/tracing" } | ||
sp-election-providers = { version = "3.0.0", features = ["runtime-benchmarks"], path = "../../primitives/election-providers" } | ||
pallet-balances = { version = "3.0.0", path = "../balances" } | ||
frame-benchmarking = { path = "../benchmarking" } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
"serde", | ||
"codec/std", | ||
|
||
"frame-support/std", | ||
"frame-system/std", | ||
|
||
"sp-io/std", | ||
"sp-std/std", | ||
"sp-runtime/std", | ||
"sp-npos-elections/std", | ||
"sp-arithmetic/std", | ||
"sp-election-providers/std", | ||
] | ||
runtime-benchmarks = [ | ||
"frame-benchmarking", | ||
"rand", | ||
] |
Oops, something went wrong.