From 50b53fcac39a0980896590bfd65773a85dd3da2d Mon Sep 17 00:00:00 2001
From: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Date: Tue, 30 May 2023 18:27:12 +0200
Subject: [PATCH] pallet-para-config: Remove remnant WeightInfo functions
 (#7308)

* pallet-para-config: Remove remnant WeightInfo functions

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

* set_config_with_weight begone

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

* ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev runtime_parachains::configuration

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
---
 .../runtime_parachains_configuration.rs       | 80 ++++++++-----------
 .../runtime/parachains/src/configuration.rs   |  4 -
 .../runtime_parachains_configuration.rs       | 19 +----
 .../runtime_parachains_configuration.rs       | 19 +----
 .../runtime_parachains_configuration.rs       | 17 +---
 5 files changed, 36 insertions(+), 103 deletions(-)

diff --git a/polkadot/runtime/kusama/src/weights/runtime_parachains_configuration.rs b/polkadot/runtime/kusama/src/weights/runtime_parachains_configuration.rs
index 109cbcce1a8..8fa5b6e3339 100644
--- a/polkadot/runtime/kusama/src/weights/runtime_parachains_configuration.rs
+++ b/polkadot/runtime/kusama/src/weights/runtime_parachains_configuration.rs
@@ -17,24 +17,26 @@
 //! Autogenerated weights for `runtime_parachains::configuration`
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-04-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2023-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
 //! WORST CASE MAP SIZE: `1000000`
-//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
+//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
 //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
 
 // Executed Command:
-// ./target/production/polkadot
+// target/production/polkadot
 // benchmark
 // pallet
-// --chain=kusama-dev
 // --steps=50
 // --repeat=20
-// --pallet=runtime_parachains::configuration
 // --extrinsic=*
 // --execution=wasm
 // --wasm-execution=compiled
+// --heap-pages=4096
+// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/polkadot/.git/.artifacts/bench.json
+// --pallet=runtime_parachains::configuration
+// --chain=kusama-dev
 // --header=./file_header.txt
-// --output=./runtime/kusama/src/weights/runtime_parachains_configuration.rs
+// --output=./runtime/kusama/src/weights/
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
@@ -55,11 +57,11 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
 	fn set_config_with_block_number() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 9_482_000 picoseconds.
-		Weight::from_parts(9_845_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
+		//  Measured:  `127`
+		//  Estimated: `1612`
+		// Minimum execution time: 9_471_000 picoseconds.
+		Weight::from_parts(9_872_000, 0)
+			.saturating_add(Weight::from_parts(0, 1612))
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
@@ -71,11 +73,11 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
 	fn set_config_with_u32() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 9_689_000 picoseconds.
-		Weight::from_parts(9_960_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
+		//  Measured:  `127`
+		//  Estimated: `1612`
+		// Minimum execution time: 9_555_000 picoseconds.
+		Weight::from_parts(9_800_000, 0)
+			.saturating_add(Weight::from_parts(0, 1612))
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
@@ -87,27 +89,11 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
 	fn set_config_with_option_u32() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 9_523_000 picoseconds.
-		Weight::from_parts(9_736_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
-			.saturating_add(T::DbWeight::get().reads(3))
-			.saturating_add(T::DbWeight::get().writes(1))
-	}
-	/// Storage: Configuration PendingConfigs (r:1 w:1)
-	/// Proof Skipped: Configuration PendingConfigs (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration BypassConsistencyCheck (r:1 w:0)
-	/// Proof Skipped: Configuration BypassConsistencyCheck (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
-	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
-	fn set_config_with_weight() -> Weight {
-		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 9_443_000 picoseconds.
-		Weight::from_parts(9_679_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
+		//  Measured:  `127`
+		//  Estimated: `1612`
+		// Minimum execution time: 9_623_000 picoseconds.
+		Weight::from_parts(9_832_000, 0)
+			.saturating_add(Weight::from_parts(0, 1612))
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
@@ -129,11 +115,11 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
 	fn set_config_with_balance() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 9_460_000 picoseconds.
-		Weight::from_parts(9_716_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
+		//  Measured:  `127`
+		//  Estimated: `1612`
+		// Minimum execution time: 9_482_000 picoseconds.
+		Weight::from_parts(9_797_000, 0)
+			.saturating_add(Weight::from_parts(0, 1612))
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
@@ -145,11 +131,11 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
 	fn set_config_with_executor_params() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 10_279_000 picoseconds.
-		Weight::from_parts(10_615_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
+		//  Measured:  `127`
+		//  Estimated: `1612`
+		// Minimum execution time: 10_753_000 picoseconds.
+		Weight::from_parts(11_009_000, 0)
+			.saturating_add(Weight::from_parts(0, 1612))
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
diff --git a/polkadot/runtime/parachains/src/configuration.rs b/polkadot/runtime/parachains/src/configuration.rs
index 386a06d92d5..dd0fcd67e5d 100644
--- a/polkadot/runtime/parachains/src/configuration.rs
+++ b/polkadot/runtime/parachains/src/configuration.rs
@@ -438,7 +438,6 @@ pub trait WeightInfo {
 	fn set_config_with_block_number() -> Weight;
 	fn set_config_with_u32() -> Weight;
 	fn set_config_with_option_u32() -> Weight;
-	fn set_config_with_weight() -> Weight;
 	fn set_config_with_balance() -> Weight;
 	fn set_hrmp_open_request_ttl() -> Weight;
 	fn set_config_with_executor_params() -> Weight;
@@ -455,9 +454,6 @@ impl WeightInfo for TestWeightInfo {
 	fn set_config_with_option_u32() -> Weight {
 		Weight::MAX
 	}
-	fn set_config_with_weight() -> Weight {
-		Weight::MAX
-	}
 	fn set_config_with_balance() -> Weight {
 		Weight::MAX
 	}
diff --git a/polkadot/runtime/polkadot/src/weights/runtime_parachains_configuration.rs b/polkadot/runtime/polkadot/src/weights/runtime_parachains_configuration.rs
index f1ae7bbad4e..292b8916dad 100644
--- a/polkadot/runtime/polkadot/src/weights/runtime_parachains_configuration.rs
+++ b/polkadot/runtime/polkadot/src/weights/runtime_parachains_configuration.rs
@@ -101,24 +101,7 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 			.saturating_add(T::DbWeight::get().reads(4))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
-	/// Storage: Configuration PendingConfigs (r:1 w:1)
-	/// Proof Skipped: Configuration PendingConfigs (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration ActiveConfig (r:1 w:0)
-	/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration BypassConsistencyCheck (r:1 w:0)
-	/// Proof Skipped: Configuration BypassConsistencyCheck (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
-	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
-	fn set_config_with_weight() -> Weight {
-		// Proof Size summary in bytes:
-		//  Measured:  `393`
-		//  Estimated: `1878`
-		// Minimum execution time: 12_999_000 picoseconds.
-		Weight::from_parts(13_465_000, 0)
-			.saturating_add(Weight::from_parts(0, 1878))
-			.saturating_add(T::DbWeight::get().reads(4))
-			.saturating_add(T::DbWeight::get().writes(1))
-	}
+
 	/// Storage: Benchmark Override (r:0 w:0)
 	/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
 	fn set_hrmp_open_request_ttl() -> Weight {
diff --git a/polkadot/runtime/rococo/src/weights/runtime_parachains_configuration.rs b/polkadot/runtime/rococo/src/weights/runtime_parachains_configuration.rs
index fcc8ed4840c..11effbc4e63 100644
--- a/polkadot/runtime/rococo/src/weights/runtime_parachains_configuration.rs
+++ b/polkadot/runtime/rococo/src/weights/runtime_parachains_configuration.rs
@@ -101,24 +101,7 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 			.saturating_add(T::DbWeight::get().reads(4))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
-	/// Storage: Configuration PendingConfigs (r:1 w:1)
-	/// Proof Skipped: Configuration PendingConfigs (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration ActiveConfig (r:1 w:0)
-	/// Proof Skipped: Configuration ActiveConfig (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration BypassConsistencyCheck (r:1 w:0)
-	/// Proof Skipped: Configuration BypassConsistencyCheck (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
-	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
-	fn set_config_with_weight() -> Weight {
-		// Proof Size summary in bytes:
-		//  Measured:  `397`
-		//  Estimated: `1882`
-		// Minimum execution time: 12_914_000 picoseconds.
-		Weight::from_parts(13_395_000, 0)
-			.saturating_add(Weight::from_parts(0, 1882))
-			.saturating_add(T::DbWeight::get().reads(4))
-			.saturating_add(T::DbWeight::get().writes(1))
-	}
+
 	/// Storage: Benchmark Override (r:0 w:0)
 	/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
 	fn set_hrmp_open_request_ttl() -> Weight {
diff --git a/polkadot/runtime/westend/src/weights/runtime_parachains_configuration.rs b/polkadot/runtime/westend/src/weights/runtime_parachains_configuration.rs
index aaa7536bdd3..ec769bb2fa1 100644
--- a/polkadot/runtime/westend/src/weights/runtime_parachains_configuration.rs
+++ b/polkadot/runtime/westend/src/weights/runtime_parachains_configuration.rs
@@ -95,22 +95,7 @@ impl<T: frame_system::Config> runtime_parachains::configuration::WeightInfo for
 			.saturating_add(T::DbWeight::get().reads(3))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
-	/// Storage: Configuration PendingConfigs (r:1 w:1)
-	/// Proof Skipped: Configuration PendingConfigs (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: Configuration BypassConsistencyCheck (r:1 w:0)
-	/// Proof Skipped: Configuration BypassConsistencyCheck (max_values: Some(1), max_size: None, mode: Measured)
-	/// Storage: ParasShared CurrentSessionIndex (r:1 w:0)
-	/// Proof Skipped: ParasShared CurrentSessionIndex (max_values: Some(1), max_size: None, mode: Measured)
-	fn set_config_with_weight() -> Weight {
-		// Proof Size summary in bytes:
-		//  Measured:  `90`
-		//  Estimated: `1575`
-		// Minimum execution time: 10_293_000 picoseconds.
-		Weight::from_parts(10_619_000, 0)
-			.saturating_add(Weight::from_parts(0, 1575))
-			.saturating_add(T::DbWeight::get().reads(3))
-			.saturating_add(T::DbWeight::get().writes(1))
-	}
+
 	/// Storage: Benchmark Override (r:0 w:0)
 	/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
 	fn set_hrmp_open_request_ttl() -> Weight {
-- 
GitLab