diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 3b9f440c1e5d1..84e6a3542457d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -1407,9 +1407,11 @@ impl_runtime_apis! { bp_messages::LegacyLaneId, u128, >::rewards_account(reward_kind); - Self::deposit_account(rewards_account, reward); + Self::deposit_account(rewards_account.clone(), reward); - None + Some(bridge_common_config::BridgeRewardBeneficiaries::LocalAccount( + rewards_account, + )) } fn deposit_account(account: AccountId, balance: Balance) { diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/pallet_bridge_relayers.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/pallet_bridge_relayers.rs index 4600700cef7af..dc9e7398c76c9 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/pallet_bridge_relayers.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/pallet_bridge_relayers.rs @@ -16,25 +16,32 @@ //! Autogenerated weights for `pallet_bridge_relayers` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2026-01-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `d3b41be4aae8`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `MacBook-Pro-4.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: -// frame-omni-bencher +// ./target/release/frame-omni-bencher // v1 // benchmark // pallet -// --extrinsic=* -// --runtime=target/production/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.wasm -// --pallet=pallet_bridge_relayers -// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt -// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights -// --wasm-execution=compiled -// --steps=50 -// --repeat=20 -// --heap-pages=4096 +// --runtime +// target/release/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.wasm +// -p +// pallet_bridge_relayers +// -e +// * +// --output +// ./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/pallet_bridge_relayers.rs +// --header +// ./cumulus/file_header.txt +// -s +// 50 +// -r +// 20 +// --heap-pages +// 4096 // --no-storage-info // --no-min-squares // --no-median-slopes @@ -50,84 +57,52 @@ use core::marker::PhantomData; /// Weight functions for `pallet_bridge_relayers`. pub struct WeightInfo(PhantomData); impl pallet_bridge_relayers::WeightInfo for WeightInfo { - /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) - /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_rewards() -> Weight { // Proof Size summary in bytes: // Measured: `245` - // Estimated: `3593` - // Minimum execution time: 53_074_000 picoseconds. - Weight::from_parts(54_759_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Estimated: `0` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(40_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `Benchmark::Override` (r:0 w:0) - /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_rewards_to() -> Weight { // Proof Size summary in bytes: - // Measured: `0` + // Measured: `297` // Estimated: `0` - // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. - Weight::from_parts(18_446_744_073_709_551_000, 0) + // Minimum execution time: 40_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) - /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) - /// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) - /// Storage: `Balances::Reserves` (r:1 w:1) - /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: // Measured: `97` - // Estimated: `4714` - // Minimum execution time: 28_995_000 picoseconds. - Weight::from_parts(29_546_000, 0) - .saturating_add(Weight::from_parts(0, 4714)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) + // Estimated: `0` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) - /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) - /// Storage: `Balances::Reserves` (r:1 w:1) - /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) fn deregister() -> Weight { // Proof Size summary in bytes: // Measured: `197` - // Estimated: `4714` - // Minimum execution time: 29_628_000 picoseconds. - Weight::from_parts(30_523_000, 0) - .saturating_add(Weight::from_parts(0, 4714)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Estimated: `0` + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) - /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) - /// Storage: `Balances::Reserves` (r:1 w:1) - /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) fn slash_and_deregister() -> Weight { // Proof Size summary in bytes: // Measured: `197` - // Estimated: `4714` - // Minimum execution time: 23_510_000 picoseconds. - Weight::from_parts(24_095_000, 0) - .saturating_add(Weight::from_parts(0, 4714)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Estimated: `0` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) - /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`) fn register_relayer_reward() -> Weight { // Proof Size summary in bytes: // Measured: `42` - // Estimated: `3539` - // Minimum execution time: 7_212_000 picoseconds. - Weight::from_parts(7_552_000, 0) - .saturating_add(Weight::from_parts(0, 3539)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/prdoc/pr_10952.prdoc b/prdoc/pr_10952.prdoc new file mode 100644 index 0000000000000..23efba91c4063 --- /dev/null +++ b/prdoc/pr_10952.prdoc @@ -0,0 +1,11 @@ +title: 'Fix `claim_rewards_to` benchmark to enable Snowbridge reward claims' +doc: +- audience: Runtime Dev + description: |- + The `prepare_rewards_account` benchmark helper was returning `None`, causing `claim_rewards_to` + to be assigned `Weight::MAX` and effectively disabling the extrinsic in production. This fix + returns a valid beneficiary account, enabling Snowbridge relayers to claim rewards to AssetHub + as intended. +crates: +- name: bridge-hub-westend-runtime + bump: patch