Skip to content

Weight update for 1.6#769

Merged
fellowship-merge-bot[bot] merged 26 commits into
mainfrom
oty-weights
Jun 19, 2025
Merged

Weight update for 1.6#769
fellowship-merge-bot[bot] merged 26 commits into
mainfrom
oty-weights

Conversation

@ggwpez

@ggwpez ggwpez commented Jun 16, 2025

Copy link
Copy Markdown
Member

Updated on ref hw. subweight weight compare link (will 404 once this is merged).

TODOs from @bkontur:

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet frame_benchmarking::baseline frame_system frame_system_extensions

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet pallet_asset_rate pallet_bags_list pallet_balances pallet_beefy_mmr pallet_bounties pallet_child_bounties pallet_fast_unstake pallet_indices pallet_message_queue pallet_multisig pallet_nis

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet pallet_offences pallet_parameters pallet_preimage pallet_proxy pallet_recovery pallet_referenda pallet_scheduler pallet_session pallet_society pallet_staking pallet_timestamp pallet_transaction_payment pallet_treasury pallet_utility pallet_vesting pallet_whitelist pallet_xcm pallet_xcm_benchmarks::fungible pallet_xcm_benchmarks::generic

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet pallet_ranked_collective pallet_nomination_pools frame_election_provider_support pallet_conviction_voting pallet_election_provider_multi_phase

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet polkadot_runtime_common::auctions polkadot_runtime_common::claims polkadot_runtime_common::crowdloan polkadot_runtime_common::paras_registrar polkadot_runtime_common::slots

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet runtime_parachains::configuration runtime_parachains::coretime runtime_parachains::disputes runtime_parachains::disputes::slashing runtime_parachains::hrmp runtime_parachains::initializer

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet runtime_parachains::on_demand runtime_parachains::paras

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet runtime_parachains::inclusion

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd --runtime kusama --pallet runtime_parachains::paras_inherent

@ggwpez ggwpez marked this pull request as ready for review June 16, 2025 14:42
@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet frame_benchmarking::baseline frame_system frame_system_extensions" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet frame_benchmarking::baseline frame_system frame_system_extensions" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_asset_rate pallet_bags_list pallet_balances pallet_beefy_mmr pallet_bounties pallet_child_bounties pallet_fast_unstake pallet_indices pallet_message_queue pallet_multisig pallet_nis" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_asset_rate pallet_bags_list pallet_balances pallet_beefy_mmr pallet_bounties pallet_child_bounties pallet_fast_unstake pallet_indices pallet_message_queue pallet_multisig pallet_nis" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_offences pallet_parameters pallet_preimage pallet_proxy pallet_recovery pallet_referenda pallet_scheduler pallet_session pallet_society pallet_staking pallet_timestamp pallet_transaction_payment pallet_treasury pallet_utility pallet_vesting pallet_whitelist pallet_xcm pallet_xcm_benchmarks::fungible pallet_xcm_benchmarks::generic" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_ranked_collective pallet_nomination_pools frame_election_provider_support pallet_conviction_voting pallet_election_provider_multi_phase" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_offences pallet_parameters pallet_preimage pallet_proxy pallet_recovery pallet_referenda pallet_scheduler pallet_session pallet_society pallet_staking pallet_timestamp pallet_transaction_payment pallet_treasury pallet_utility pallet_vesting pallet_whitelist pallet_xcm pallet_xcm_benchmarks::fungible pallet_xcm_benchmarks::generic" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet pallet_ranked_collective pallet_nomination_pools frame_election_provider_support pallet_conviction_voting pallet_election_provider_multi_phase" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::configuration runtime_parachains::coretime runtime_parachains::disputes runtime_parachains::disputes::slashing runtime_parachains::hrmp runtime_parachains::initializer" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::configuration runtime_parachains::coretime runtime_parachains::disputes runtime_parachains::disputes::slashing runtime_parachains::hrmp runtime_parachains::initializer" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet polkadot_runtime_common::auctions polkadot_runtime_common::claims polkadot_runtime_common::crowdloan polkadot_runtime_common::paras_registrar polkadot_runtime_common::slots" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::on_demand runtime_parachains::paras" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet polkadot_runtime_common::auctions polkadot_runtime_common::claims polkadot_runtime_common::crowdloan polkadot_runtime_common::paras_registrar polkadot_runtime_common::slots" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::on_demand runtime_parachains::paras" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::inclusion" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::inclusion" has failed ❌! See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::paras_inherent" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "--runtime kusama --pallet runtime_parachains::paras_inherent" has failed ❌! See logs here

@bkontur

bkontur commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

/cmd bench --runtime kusama --pallet frame_benchmarking::baseline frame_system frame_system_extensions

@ggwpez

ggwpez commented Jun 17, 2025

Copy link
Copy Markdown
Member Author

/cmd clean

Comment on lines +869 to +885
/// Storage: `Staking::SlashingSpans` (r:513 w:513)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::SpanSlash` (r:513 w:513)
/// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Staking::NominatorSlashInEra` (r:512 w:512)
/// Proof: `Staking::NominatorSlashInEra` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Staking::UnappliedSlashes` (r:1 w:1)
/// Proof: `Staking::UnappliedSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn manual_slash() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `4175`
// Minimum execution time: 30_000_000 picoseconds.
Weight::from_parts(33_000_000, 4175)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
// Measured: `20713`
// Estimated: `1309653`
// Minimum execution time: 7_768_872_000 picoseconds.
Weight::from_parts(7_843_282_000, 0)
.saturating_add(Weight::from_parts(0, 1309653))
.saturating_add(T::DbWeight::get().reads(1549))
.saturating_add(T::DbWeight::get().writes(1540))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.5k reads and writes looks.. wrong.
it probably won't allow a single such extrinsic into a block

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, it's not that bad, "only" ~200ms

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this benchmark use for example l: Linear<1 .. 10> for nominators count or something? Or nominators counts does not affect this?

#[benchmark]
	fn manual_slash() -> Result<(), BenchmarkError> {
		// Create a validator with nominators
		// This will add exposure for our validator in the current era.
		let (validator_stash, _nominators) = create_validator_with_nominators::<T>(
#[test]
fn create_validator_with_nominators_works() {
		ExtBuilder::default().build_and_execute(|| {
			let n = 10;

			let (validator_stash, nominators) = create_validator_with_nominators::<Test>(
				n,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this benchmark use for example l: Linear<1 .. 10> for nominators count or something? Or nominators counts does not affect this?

We should assume the worst case scenario when slashing a validator that it has maximally allowed number of nominators. I think the problem is that offence processing code is linear in the number of nominators - this should be fixed with AHM and staking-async pallet since PoV size is limited.

Comment on lines +873 to 890
/// Storage: `Staking::SlashingSpans` (r:513 w:513)
/// Proof: `Staking::SlashingSpans` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Staking::SpanSlash` (r:513 w:513)
/// Proof: `Staking::SpanSlash` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `Staking::NominatorSlashInEra` (r:512 w:512)
/// Proof: `Staking::NominatorSlashInEra` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Staking::UnappliedSlashes` (r:1 w:1)
/// Proof: `Staking::UnappliedSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn manual_slash() -> Weight {
// Proof Size summary in bytes:
// Measured: `514`
// Estimated: `4175`
// Minimum execution time: 30_000_000 picoseconds.
Weight::from_parts(33_000_000, 4175)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
// Measured: `20200`
// Estimated: `1309653`
// Minimum execution time: 9_108_355_000 picoseconds.
Weight::from_parts(9_700_684_000, 0)
.saturating_add(Weight::from_parts(0, 1309653))
.saturating_add(T::DbWeight::get().reads(1549))
.saturating_add(T::DbWeight::get().writes(1540))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@ordian ordian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relay/{polkadot,kusama}/src/weights looks sane except for manual_slash, but that should not be a blocker - would be nice to autocheck for other anomalies like that

@ggwpez

ggwpez commented Jun 17, 2025

Copy link
Copy Markdown
Member Author

Screenshot 2025-06-17 at 15 01 31
@ordian the PoV weight here is quite high, but I assume that it does not matter on the relay anyway.

@ordian

ordian commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

ah, yeah, it might produce an annoying warning though, which is fixed in paritytech/polkadot-sdk#8861

(that number looks ridiculuosly high though haha)

@github-actions

Copy link
Copy Markdown

Command "clean" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "clean" has failed ❌! See logs here

bkontur and others added 2 commits June 17, 2025 16:10
This is leftover from bump stable2412 where we added Aliasers but not
changed weights:
#606
for AssetHub weights were fixed here
#700 but not for other
chains

- [X] Does not require a CHANGELOG entry
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez moved this from Todo to In Progress in Runtime releases Jun 18, 2025

@acatangiu acatangiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the site/UI for seeing weight diffs ❤️

@ggwpez

ggwpez commented Jun 19, 2025

Copy link
Copy Markdown
Member Author

/merge

@fellowship-merge-bot fellowship-merge-bot Bot merged commit f23cdc0 into main Jun 19, 2025
61 checks passed
@fellowship-merge-bot

Copy link
Copy Markdown
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

@github-project-automation github-project-automation Bot moved this from In Progress to Done in Runtime releases Jun 19, 2025
@acatangiu

Copy link
Copy Markdown
Contributor

/merge

looks like the bot merges even if CI is still running (15 of 61 checks passed)

@ggwpez

ggwpez commented Jun 19, 2025

Copy link
Copy Markdown
Member Author

Uh yea. Looks like they are not required. Will check again for CI in #761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants