From dd005c48e44053a84a5a5a7e63444064be49bf6e Mon Sep 17 00:00:00 2001
From: CrabGopher <vedhavyas.singareddi@gmail.com>
Date: Tue, 25 Feb 2025 16:36:07 +0530
Subject: [PATCH] Expose extension weights (#7637)

# Description
Seems like SubstrateWeights that used T::DBWeights was not public unlike
the frame_system's Call weights. PR just made those weights public

## Integration
Instead of using `()` impl which used RockDB weights, ExtensionWeights
can be used to to use the provided DBWeights to System config
---
 prdoc/pr_7637.prdoc               | 9 +++++++++
 substrate/frame/system/src/lib.rs | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 prdoc/pr_7637.prdoc

diff --git a/prdoc/pr_7637.prdoc b/prdoc/pr_7637.prdoc
new file mode 100644
index 00000000000..f61436b89c0
--- /dev/null
+++ b/prdoc/pr_7637.prdoc
@@ -0,0 +1,9 @@
+title: 'Expose extension weights from frame-system'
+
+doc:
+  - audience: Runtime Dev
+    description: This PR exposes the Extension weights from the `frame-system`
+
+crates:
+  - name: frame-system
+    bump: minor
diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs
index 9a21c659029..8e4cc71e9d4 100644
--- a/substrate/frame/system/src/lib.rs
+++ b/substrate/frame/system/src/lib.rs
@@ -172,7 +172,8 @@ pub use extensions::{
 	check_genesis::CheckGenesis, check_mortality::CheckMortality,
 	check_non_zero_sender::CheckNonZeroSender, check_nonce::CheckNonce,
 	check_spec_version::CheckSpecVersion, check_tx_version::CheckTxVersion,
-	check_weight::CheckWeight, weight_reclaim::WeightReclaim, WeightInfo as ExtensionsWeightInfo,
+	check_weight::CheckWeight, weight_reclaim::WeightReclaim,
+	weights::SubstrateWeight as SubstrateExtensionsWeight, WeightInfo as ExtensionsWeightInfo,
 };
 // Backward compatible re-export.
 pub use extensions::check_mortality::CheckMortality as CheckEra;
-- 
GitLab