-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
/benchmark runtime pallet pallet_staking |
Finished benchmark for branch: kiz-remove-compact Benchmark: Runtime Benchmarks Pallet cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic "*" --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_staking ResultsPallet: "pallet_staking", Extrinsic: "bond", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
|
…/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_staking
…into kiz-remove-compact
The benchmarking happening above ^^ was actually done with |
/benchmark runtime pallet pallet_staking |
Finished benchmark for branch: kiz-remove-compact Benchmark: Runtime Benchmarks Pallet cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic "*" --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_staking ResultsPallet: "pallet_staking", Extrinsic: "bond", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
|
…/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_staking
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.
lgtm, I'm not super knowledgable about staking though.
I actually realised that this is not useful because currently we don't decoding time into account. |
Okay, leaving open to investigate integrating decode time in the benchmark tool @shawntabrizi @thiolliere |
For now, I will made a new PR to make the important change to polkadot, namely reducing the on_initialize a bit. I will leave this PR open for a playground of investigating encode/decode affect on weights. |
Not needed for now. Sometime soon and somehow we should consider measuring encode decode time in benchmarks. The approach of this PR is a good starting point. Nonetheless, closing to de-clutter my ever growing todo list. |
This PR introduces two changes that will be of help to polkadot with regards to nominators.
The companion will deduce the average on initialize weight to 2.5%, 1/4th of the current value and based on a sampling from @shawntabrizi the real value is around 0.35%, so we are still safe. This will leave more room for the npos solutions.
Remove the
#[compact]
attribute of the solution. This will increase the weight a wee bit, but should hopefully reduce the decoding time. We have to re-benchmark here and see what happens. Essentially, we disable: Custom Codec Implementation for NPoS Election #6720The regression on the length is as follows:
Both 25k and 38k solutions are way below limit, so we are cool.
polkadot companion: paritytech/polkadot#1827
#[compact]
or not) is encoded in the heart of pallet_staking.I could not agree more and my next PR on staking (Decouple Staking and Election #7319) should address this among many other issues.
type Call
was not used so I also removed that while we're at it.