mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 01:41:03 +00:00
Decouple Staking and Election - Part 2 Unsigned Phase (#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 <gui.thiolliere@gmail.com> * 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 <gui.thiolliere@gmail.com> * 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 <shawntabrizi@gmail.com> Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -17,6 +17,7 @@ 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"] }
|
||||
sp-std = { version = "3.0.0", default-features = false, path = "../../primitives/std" }
|
||||
# TWO_PHASE_NOTE:: ideally we should be able to get rid of this.
|
||||
sp-npos-elections = { version = "3.0.0", default-features = false, path = "../../primitives/npos-elections" }
|
||||
sp-io ={ version = "3.0.0", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "3.0.0", default-features = false, path = "../../primitives/runtime" }
|
||||
@@ -26,20 +27,22 @@ frame-system = { version = "3.0.0", default-features = false, path = "../system"
|
||||
pallet-session = { version = "3.0.0", default-features = false, features = ["historical"], path = "../session" }
|
||||
pallet-authorship = { version = "3.0.0", default-features = false, path = "../authorship" }
|
||||
sp-application-crypto = { version = "3.0.0", default-features = false, path = "../../primitives/application-crypto" }
|
||||
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_chacha = { version = "0.2", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { version = "3.0.0", path = "../../primitives/core" }
|
||||
sp-storage = { version = "3.0.0", path = "../../primitives/storage" }
|
||||
sp-tracing = { version = "3.0.0", path = "../../primitives/tracing" }
|
||||
sp-core = { version = "3.0.0", path = "../../primitives/core" }
|
||||
pallet-balances = { version = "3.0.0", path = "../balances" }
|
||||
pallet-timestamp = { version = "3.0.0", path = "../timestamp" }
|
||||
pallet-staking-reward-curve = { version = "3.0.0", path = "../staking/reward-curve" }
|
||||
substrate-test-utils = { version = "3.0.0", path = "../../test-utils" }
|
||||
frame-benchmarking = { version = "3.0.0", path = "../benchmarking" }
|
||||
sp-election-providers = { version = "3.0.0", features = ["runtime-benchmarks"], path = "../../primitives/election-providers" }
|
||||
rand_chacha = { version = "0.2" }
|
||||
parking_lot = "0.11.1"
|
||||
hex = "0.4"
|
||||
@@ -59,8 +62,10 @@ std = [
|
||||
"frame-system/std",
|
||||
"pallet-authorship/std",
|
||||
"sp-application-crypto/std",
|
||||
"sp-election-providers/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
"sp-election-providers/runtime-benchmarks",
|
||||
"rand_chacha",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user