-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Companion for Store voters in unsorted bags to get good stake iteration properties #3413
Conversation
/benchmark runtime polkadot pallet_staking |
/benchmark runtime polkadot pallet_staking |
Benchmark Runtime Polkadot Pallet for branch "prgn-companion-for-9081" with command cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ Results
|
note: The benchmarking numbers are fake. |
Co-authored-by: Andronik Ordian <[email protected]> Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: radupopa2010 <[email protected]> Co-authored-by: CI system <> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: André Silva <[email protected]> Co-authored-by: thiolliere <[email protected]> Co-authored-by: André Silva <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Bernhard Schuster <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Robert Habermeier <[email protected]> Co-authored-by: Robert Klotzner <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Lldenaurois <[email protected]> Co-authored-by: Qinxuan Chen <[email protected]> Co-authored-by: Seun Lanlege <[email protected]> Co-authored-by: Denis Pisarev <[email protected]> Co-authored-by: Andreas Doerr <[email protected]> Co-authored-by: Chevdor <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Denis Tsai <[email protected]> Co-authored-by: Pierre Besson <[email protected]> Co-authored-by: kianenigma <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Xiliang Chen <[email protected]> Co-authored-by: Hernando Castano <[email protected]> Co-authored-by: ferrell-code <[email protected]> Co-authored-by: Shaun W <[email protected]>
utils/voter-bags/Cargo.toml
Outdated
edition = "2018" | ||
|
||
[dependencies] | ||
generate-bags = { git = "https://github.com/paritytech/substrate", branch = "zeke-voter-bags-module" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: this and all the bags-list stuff needs to get changed to the master branch before merging into master
runtime/kusama/src/lib.rs
Outdated
/// Whilst `UseNominatorsAndUpdateBagsList` or `UseNominatorsMap` is in use, this can still be a | ||
/// very large value. Once the `BagsList` is in full motion, staking might open its door to many | ||
/// more nominators, and this value should instead be what is a "safe" number (e.g. 22500). | ||
pub const VoterSnapshotPerBlock: u32 = u32::MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kianenigma why not put a safe number to start with?
Sounds easy to forget about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I @emostov recommended the same, sure it can already be 22500
@emostov apply this: diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs
index 655a38fe1..9a0fce4d6 100644
--- a/frame/executive/src/lib.rs
+++ b/frame/executive/src/lib.rs
@@ -229,7 +229,7 @@ where
(frame_system::Pallet::<System>, COnRuntimeUpgrade, AllPallets)
as
OnRuntimeUpgrade
- >::pre_upgrade()?;
+ >::pre_upgrade().unwrap();
let weight = Self::execute_on_runtime_upgrade();
@@ -237,7 +237,7 @@ where
(frame_system::Pallet::<System>, COnRuntimeUpgrade, AllPallets)
as
OnRuntimeUpgrade
- >::post_upgrade()?;
+ >::post_upgrade().unwrap();
Ok(weight)
}
It seems like if you actually return an error in any of the functions, it is silently dropped. I will fix this in paritytech/substrate#9788. The error that you had was:
|
This reverts commit 3608c46.
Waiting for commit status. |
Merge aborted: Checks failed for 225fdbf |
bot merge force |
Trying merge. |
* master: weights: pallet-staking & pallet-bags-list (#3872) Re-enable metadata compare CI check (#3895) Bump `parity-util-mem` to 0.10.2 (#3897) Revert "remove connected disconnected state only (#3868)" (#3896) Companion for Generate storage info for pallet im_online #9654 (#3744) Gather memory usage statistics through `parity-util-mem` (#3893) ci: cache seed in fuzzer job (#3885) Add benchmarking for parachain runtime configuration pallet (#3862) Run fmt (#3887) remove connected disconnected state only (#3868) Dispute distribution improvements (#3853) Companion for Store voters in unsorted bags to get good stake iteration properties (#3413) Add info logging to dispute activation (#3870) update Rococo.json (#3871) Companion for #9764 (Force Unreserve) (#3840)
Companion to paritytech/substrate#9507
SortedListProvider
configuration:UseNominatorsMap
-> no-op for all list updates; iter withNominatorsMap
UseNominatorsAndUpdateBagsList
-> updates bags list; iter withNominatorsMap
UseNominatorsAndUpdateBagsList
-> updates bags list; iter withNominatorsMap