From bc9491d23078efce52c0b78bb1b1e3186817b4c1 Mon Sep 17 00:00:00 2001 From: Clara van Staden Date: Mon, 25 Mar 2024 21:56:42 +0200 Subject: [PATCH] Snowbridge - Fix benchmarks, add fee multipler and move config to Ethereum module (#252) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Snowbridge Inbound Queue pallet benchmarks are failing: ``` 2024-03-21 13:50:40 Running benchmark: snowbridge_pallet_ethereum_client.submit_execution_header(0 args) 1/1 1/1 Running benchmarks for snowbridge_pallet_inbound_queue to ./bridge-hub-kusama-weights/ 2024-03-21 13:50:41 Starting benchmark: snowbridge_pallet_inbound_queue::submit 2024-03-21 13:50:41 💫 Verifying message with block hash 0x3921…3a3f 2024-03-21 13:50:41 💫 Receipt verification successful for 0x3921…3a3f 2024-03-21 13:50:41 panicked at /home/bparity/.cargo/registry/src/index.crates.io-6f17d22bba15001f/snowbridge-pallet-inbound-queue-0.1.0/src/benchmarking/mod.rs:43:13: Expected Ok(_). Got Err( Module( ModuleError { index: 80, error: [ 0, 0, 0, 0, ], message: Some( "InvalidGateway", ), }, ), ) Error: 0: Invalid input: Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed WASM backtrace: error while executing at wasm backtrace: 0: 0x436fa6 - !rust_begin_unwind 1: 0x2969 - !core::panicking::panic_fmt::hbb0c5dd9c7ebab99 2: 0x329f54 - !core::ops::function::FnOnce::call_once{{vtable.shim}}::h0374b352d74ea114 3: 0x300e24 - !,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,bridge_hub_kusama_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender,frame_system::extensions::check_spec_version::CheckSpecVersion,frame_system::extensions::check_tx_version::CheckTxVersion,frame_system::extensions::check_genesis::CheckGenesis,frame_system::extensions::check_mortality::CheckMortality,frame_system::extensions::check_nonce::CheckNonce,frame_system::extensions::check_weight::CheckWeight,pallet_transaction_payment::ChargeTransactionPayment,bridge_hub_kusama_runtime::BridgeRejectObsoleteHeadersAndMessages,bridge_runtime_common::refund_relayer_extension::RefundSignedExtensionAdapter,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund,bridge_hub_kusama_runtime::bridge_to_polkadot_config::PriorityBoostPerMessage,bridge_hub_kusama_runtime::bridge_to_polkadot_config::StrRefundBridgeHubPolkadotMessages>>)>>>>::dispatch_benchmark::h500c8f48422e47bd 4: 0x3c0b6a - !Benchmark_dispatch_benchmark ``` This PR fixes the error (the Ethereum gateway contract address should be set in the benchmarks since it is verified in the inbound queue when a message is submitted) and moves the benchmark config into `bridge_to_ethereum_config.rs`. - [x] Does not require a CHANGELOG entry --------- Co-authored-by: claravanstaden Co-authored-by: Vincent Geddes Co-authored-by: Branislav Kontur Co-authored-by: Adrian Catangiu Co-authored-by: Vincent Geddes <117534+vgeddes@users.noreply.github.com> --- Cargo.lock | 28 +- .../src/system_parachains_specs.rs | 10 + integration-tests/emulated/helpers/Cargo.toml | 2 +- .../tests/assets/asset-hub-kusama/Cargo.toml | 2 +- .../assets/asset-hub-polkadot/Cargo.toml | 2 +- .../bridges/bridge-hub-kusama/Cargo.toml | 8 +- .../bridge-hub-kusama/src/tests/snowbridge.rs | 31 +- .../bridges/bridge-hub-polkadot/Cargo.toml | 8 +- .../src/tests/snowbridge.rs | 31 +- .../collectives-polkadot/Cargo.toml | 2 +- relay/kusama/Cargo.toml | 2 +- relay/polkadot/Cargo.toml | 2 +- .../asset-hubs/asset-hub-kusama/Cargo.toml | 2 +- .../asset-hubs/asset-hub-polkadot/Cargo.toml | 2 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 14 +- .../bridge-hub-kusama/primitives/Cargo.toml | 2 +- .../bridge-hub-kusama/primitives/src/lib.rs | 4 +- .../src/bridge_to_ethereum_config.rs | 206 ++++++++- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 192 +-------- .../snowbridge_pallet_ethereum_client.rs | 181 ++++---- .../snowbridge_pallet_inbound_queue.rs | 66 +-- .../snowbridge_pallet_outbound_queue.rs | 96 +++-- .../src/weights/snowbridge_pallet_system.rs | 397 +++++++++--------- .../bridge-hub-kusama/src/xcm_config.rs | 8 +- .../bridge-hub-kusama/tests/snowbridge.rs | 8 +- .../bridge-hub-polkadot/Cargo.toml | 14 +- .../bridge-hub-polkadot/primitives/Cargo.toml | 2 +- .../bridge-hub-polkadot/primitives/src/lib.rs | 4 +- .../src/bridge_to_ethereum_config.rs | 206 ++++++++- .../bridge-hub-polkadot/src/lib.rs | 192 +-------- .../snowbridge_pallet_ethereum_client.rs | 183 ++++---- .../snowbridge_pallet_inbound_queue.rs | 66 +-- .../snowbridge_pallet_outbound_queue.rs | 100 +++-- .../src/weights/snowbridge_pallet_system.rs | 397 +++++++++--------- .../bridge-hub-polkadot/src/xcm_config.rs | 8 +- .../bridge-hub-polkadot/tests/snowbridge.rs | 8 +- .../collectives-polkadot/Cargo.toml | 2 +- system-parachains/encointer/Cargo.toml | 2 +- .../people/people-kusama/Cargo.toml | 2 +- 39 files changed, 1318 insertions(+), 1174 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08d7f3d28c..544ba96eb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8425,9 +8425,9 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "8.0.3" +version = "8.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0493c09d29fefc62579284b596618fcceb68fdb3dd38de79fe3c922a19916249" +checksum = "c13f5c598737e84294880333170d1df3868a11ad7ee79d0b1d1af37365e1c277" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -12960,9 +12960,9 @@ dependencies = [ [[package]] name = "snowbridge-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3615664be8525d6f23e42dce1c314abc7f961a7f862b74012444e16d5dde5c" +checksum = "6a3e2e3b94bfcfc8f363e21a6c5a1d3c67eb4592ada672c868a3236ad1dd563b" dependencies = [ "ethabi-decode", "frame-support", @@ -13034,9 +13034,9 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4933810488df1660cf60f53a7952ce1dff6aaef72d9fc740e1274e937136444e" +checksum = "1c822746dcdf13b2e98d5474b2257d86f04362435a6b9355abeaecd8bca6c2d9" dependencies = [ "frame-support", "parity-scale-codec", @@ -13050,9 +13050,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0fd437cd5db8b7d16cdd4da110d674d245532afa31df10108a11858a07844a6" +checksum = "cb89a9f375672031669fef4b2f4037cdf84dc1624ebd204c5cea839a0844bcdd" dependencies = [ "bp-runtime", "byte-slice-cast", @@ -13097,9 +13097,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c1fbfd32dbba082a9312c02c3ef35de929741f78f48e88b7668909350ef9e2" +checksum = "08f9709398848997157335598e46a16c357bcec29e1a0db0917bbfe8aa64f45b" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -13146,9 +13146,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-outbound-queue" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7498ba5bc2b15e1d032b3e44659cd117cad24eab457a40dc5e17acfaac0aff" +checksum = "3467d4c9f2eea9ef1b9a86e0ee811727bd373140b01a35216b5a02d54dd9108f" dependencies = [ "bridge-hub-common", "ethabi-decode", @@ -13171,9 +13171,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a410d9312bdcc3ba5944abb7d21f6b25065b32c7f8b39b9c7a4b0bd0dacfb4" +checksum = "514249487076bff142a2a5b5ddc7bd2f51826247af39ef1a0e48ca0db48ccfc3" dependencies = [ "ethabi-decode", "frame-benchmarking", diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 3376f54bc4..3c2f0c40d2 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -399,6 +399,11 @@ fn bridge_hub_polkadot_genesis( "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, + "ethereumSystem": bridge_hub_polkadot_runtime::EthereumSystemConfig { + para_id: id, + asset_hub_para_id: polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(), + ..Default::default() + }, // no need to pass anything to aura, in fact it will panic if we do. Session will take care // of this. `aura: Default::default()` }) @@ -472,6 +477,11 @@ fn bridge_hub_kusama_genesis( "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, + "ethereumSystem": bridge_hub_kusama_runtime::EthereumSystemConfig { + para_id: id, + asset_hub_para_id: kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(), + ..Default::default() + }, // no need to pass anything to aura, in fact it will panic if we do. Session will take care // of this. `aura: Default::default()` }) diff --git a/integration-tests/emulated/helpers/Cargo.toml b/integration-tests/emulated/helpers/Cargo.toml index a9947dc1d7..6cb3a28af8 100644 --- a/integration-tests/emulated/helpers/Cargo.toml +++ b/integration-tests/emulated/helpers/Cargo.toml @@ -16,7 +16,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.1" } -pallet-xcm = { version = "8.0.3" } +pallet-xcm = { version = "8.0.4" } # Cumulus xcm-emulator = { version = "0.6.0" } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml index 32719c27a1..6df1f4b235 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml @@ -24,7 +24,7 @@ pallet-utility = { version = "29.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.1" } xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "8.0.1" } -pallet-xcm = { version = "8.0.3" } +pallet-xcm = { version = "8.0.4" } runtime-common = { package = "polkadot-runtime-common", default-features = false, version = "8.0.1" } # Cumulus diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml index 7741edf09c..673192c552 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot polkadot-runtime-common = { version = "8.0.1" } xcm = { package = "staging-xcm", version = "8.0.1" } -pallet-xcm = { version = "8.0.3" } +pallet-xcm = { version = "8.0.4" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml index b4a9ae2cb7..21da9fe624 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/Cargo.toml @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.1" } -pallet-xcm = { version = "8.0.3" } +pallet-xcm = { version = "8.0.4" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus @@ -46,8 +46,8 @@ system-parachains-constants = { path = "../../../../../system-parachains/constan # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } -snowbridge-core = { version = "0.1.0" } +snowbridge-core = { version = "0.1.1" } snowbridge-router-primitives = { version = "0.1.0" } -snowbridge-pallet-system = { version = "0.1.0" } -snowbridge-pallet-outbound-queue = { version = "0.1.0" } +snowbridge-pallet-system = { version = "0.1.1" } +snowbridge-pallet-outbound-queue = { version = "0.1.1" } snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 1e55bcc7bb..4001733b9a 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -13,12 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; -use asset_hub_kusama_runtime::xcm_config::bridging::to_ethereum::{ - BridgeHubEthereumBaseFee, EthereumNetwork, +use asset_hub_kusama_runtime::xcm_config::{ + bridging::to_ethereum::{BridgeHubEthereumBaseFee, EthereumNetwork}, + RelayTreasuryPalletAccount, }; use bp_bridge_hub_kusama::snowbridge::CreateAssetCall; use bridge_hub_kusama_runtime::{ - EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, + bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue, + Runtime, RuntimeOrigin, }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -50,8 +52,6 @@ use system_parachains_constants::kusama::currency::UNITS; const INITIAL_FUND: u128 = 5_000_000_000 * KUSAMA_ED; const CHAIN_ID: u64 = 1; -const TREASURY_ACCOUNT: [u8; 32] = - hex!("da5026b2e34b876343bd6becae58eb5af71ec727633bfb972641fa7a89ff4988"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); @@ -439,7 +439,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { BridgeHubKusama::fund_accounts(vec![ (assethub_sovereign.clone(), INITIAL_FUND), - (TREASURY_ACCOUNT.into(), INITIAL_FUND), + (RelayTreasuryPalletAccount::get(), INITIAL_FUND), ]); AssetHubKusama::fund_accounts(vec![ (AssetHubPolkadotReceiver::get(), INITIAL_FUND), @@ -469,6 +469,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { local: (1 * UNITS / 100).into(), // 0.01 KSM remote: meth(1), }, + multiplier: FixedU128::from_rational(1, 1), } ) ); @@ -501,6 +502,11 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); }); + // check treasury account balance on BH before + let treasury_account_before = BridgeHubKusama::execute_with(|| { + <::Balances as frame_support::traits::fungible::Inspect<_>>::balance(&RelayTreasuryPalletAccount::get()) + }); + AssetHubKusama::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; type RuntimeOrigin = ::RuntimeOrigin; @@ -564,22 +570,27 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {}, ] ); + + // check treasury account balance on BH after (should receive some fees) + let treasury_account_after = <::Balances as frame_support::traits::fungible::Inspect<_>>::balance(&RelayTreasuryPalletAccount::get()); + let local_fee = treasury_account_after - treasury_account_before; + let events = BridgeHubKusama::events(); // Check that the local fee was credited to the Snowbridge sovereign account assert!( events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == TREASURY_ACCOUNT.into() && *amount == 169033333 + if *who == RelayTreasuryPalletAccount::get() && *amount == local_fee )), "Snowbridge sovereign takes local fee." ); - // Check that the remote fee was credited to the AssetHub sovereign account + // Check that the remote delivery fee was credited to the AssetHub sovereign account assert!( events.iter().any(|event| matches!( event, - RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == assethub_sovereign && *amount == 502500000000, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) + if *who == assethub_sovereign, )), "AssetHub sovereign takes remote fee." ); diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml index d7fa7a7aa8..09c49ccb11 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/Cargo.toml @@ -23,7 +23,7 @@ pallet-message-queue = { version = "32.0.0" } # Polkadot xcm = { package = "staging-xcm", version = "8.0.1" } -pallet-xcm = { version = "8.0.3" } +pallet-xcm = { version = "8.0.4" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus @@ -46,8 +46,8 @@ system-parachains-constants = { path = "../../../../../system-parachains/constan # Snowbridge snowbridge-beacon-primitives = { version = "0.1.0" } -snowbridge-core = { version = "0.1.0" } +snowbridge-core = { version = "0.1.1" } snowbridge-router-primitives = { version = "0.1.0" } -snowbridge-pallet-system = { version = "0.1.0" } -snowbridge-pallet-outbound-queue = { version = "0.1.0" } +snowbridge-pallet-system = { version = "0.1.1" } +snowbridge-pallet-outbound-queue = { version = "0.1.1" } snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index 3cbeadf3f7..8bfebf9327 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -13,12 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. use crate::*; -use asset_hub_polkadot_runtime::xcm_config::bridging::to_ethereum::{ - BridgeHubEthereumBaseFee, EthereumNetwork, +use asset_hub_polkadot_runtime::xcm_config::{ + bridging::to_ethereum::{BridgeHubEthereumBaseFee, EthereumNetwork}, + RelayTreasuryPalletAccount, }; use bp_bridge_hub_polkadot::snowbridge::CreateAssetCall; use bridge_hub_polkadot_runtime::{ - EthereumBeaconClient, EthereumGatewayAddress, EthereumInboundQueue, Runtime, RuntimeOrigin, + bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue, + Runtime, RuntimeOrigin, }; use codec::{Decode, Encode}; use emulated_integration_tests_common::xcm_emulator::ConvertLocation; @@ -50,8 +52,6 @@ use system_parachains_constants::polkadot::currency::UNITS; const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const CHAIN_ID: u64 = 1; -const TREASURY_ACCOUNT: [u8; 32] = - hex!("af3e7da28608e13e4399cc7d14a57bdb154dde5f3d546f5f293994ef36ef7f11"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); @@ -439,7 +439,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { BridgeHubPolkadot::fund_accounts(vec![ (assethub_sovereign.clone(), INITIAL_FUND), - (TREASURY_ACCOUNT.into(), INITIAL_FUND), + (RelayTreasuryPalletAccount::get(), INITIAL_FUND), ]); AssetHubPolkadot::fund_accounts(vec![ (AssetHubPolkadotReceiver::get(), INITIAL_FUND), @@ -469,6 +469,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { local: (1 * UNITS / 100).into(), // 0.01 DOT remote: meth(1), }, + multiplier: FixedU128::from_rational(1, 1), } ) ); @@ -501,6 +502,11 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); }); + // check treasury account balance on BH before + let treasury_account_before = BridgeHubPolkadot::execute_with(|| { + <::Balances as frame_support::traits::fungible::Inspect<_>>::balance(&RelayTreasuryPalletAccount::get()) + }); + AssetHubPolkadot::execute_with(|| { type RuntimeEvent = ::RuntimeEvent; type RuntimeOrigin = ::RuntimeOrigin; @@ -568,22 +574,27 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {}, ] ); + + // check treasury account balance on BH after (should receive some fees) + let treasury_account_after = <::Balances as frame_support::traits::fungible::Inspect<_>>::balance(&RelayTreasuryPalletAccount::get()); + let local_fee = treasury_account_after - treasury_account_before; + let events = BridgeHubPolkadot::events(); // Check that the local fee was credited to the Snowbridge sovereign account assert!( events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == TREASURY_ACCOUNT.into() && *amount == 50710000 + if *who == RelayTreasuryPalletAccount::get() && *amount == local_fee )), "Snowbridge sovereign takes local fee." ); - // Check that the remote fee was credited to the AssetHub sovereign account + // Check that the remote delivery fee was credited to the AssetHub sovereign account assert!( events.iter().any(|event| matches!( event, - RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) - if *who == assethub_sovereign && *amount == 5025000000, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) + if *who == assethub_sovereign, )), "AssetHub sovereign takes remote fee." ); diff --git a/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml b/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml index ee15b60abe..a36ca00f15 100644 --- a/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml @@ -24,7 +24,7 @@ pallet-utility = { version = "29.0.0" } # Polkadot polkadot-runtime-common = { version = "8.0.1" } xcm = { package = "staging-xcm", version = "8.0.1" } -pallet-xcm = { version = "8.0.2" } +pallet-xcm = { version = "8.0.4" } xcm-executor = { package = "staging-xcm-executor", version = "8.0.1" } # Cumulus diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index b4f759f9f6..9455aa81ce 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -80,7 +80,7 @@ pallet-treasury = { default-features = false , version = "28.0.0" } pallet-utility = { default-features = false , version = "29.0.0" } pallet-vesting = { default-features = false , version = "29.0.0" } pallet-whitelist = { default-features = false , version = "28.0.0" } -pallet-xcm = { default-features = false , version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } frame-election-provider-support = { default-features = false , version = "29.0.0" } diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index 9bf1a95d91..ae4654a22a 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -79,7 +79,7 @@ pallet-whitelist = { default-features = false , version = "28.0.0" } pallet-vesting = { default-features = false , version = "29.0.0" } pallet-utility = { default-features = false , version = "29.0.0" } frame-election-provider-support = { default-features = false , version = "29.0.0" } -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } frame-benchmarking = { default-features = false, optional = true , version = "29.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index 6c1bf63ddf..44b5663396 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -67,7 +67,7 @@ sp-weights = { default-features = false, version = "28.0.0" } primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 2a4bbcacf3..03c60e7cfa 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -67,7 +67,7 @@ sp-weights = { default-features = false, version = "28.0.0" } primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 02ced15d47..1e74f5a9c2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -60,7 +60,7 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } @@ -103,13 +103,13 @@ pallet-xcm-bridge-hub = { default-features = false , version = "0.3.0" } # Ethereum Bridge (Snowbridge) snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } -snowbridge-pallet-system = { default-features = false , version = "0.1.0" } +snowbridge-pallet-system = { default-features = false , version = "0.1.1" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } -snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } -snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } -snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } -snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.1" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.1" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.1" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.1" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.1" } snowbridge-router-primitives = { default-features = false , version = "0.1.0" } snowbridge-runtime-common = { default-features = false, version = "0.1.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml index fbef882772..55e4342a9c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/Cargo.toml @@ -18,7 +18,7 @@ system-parachains-constants = { path = "../../../constants", default-features = bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } bp-runtime = { default-features = false , version = "0.8.0" } bp-messages = { default-features = false , version = "0.8.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.1" } # Substrate Based Dependencies frame-support = { default-features = false, version = "29.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 4b2b294ac5..36ae75ff32 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -185,7 +185,9 @@ pub mod snowbridge { local: 1, // Reward for submitting a message to the Gateway contract on Ethereum remote: U256::one(), - } + }, + // Safety factor to cover unfavourable fluctuations in the ETH/DOT exchange rate. + multiplier: FixedU128::from_rational(1, 1), }; /// Network and location for the Ethereum chain. On Kusama, the Ethereum chain bridged /// to is the Ethereum Main network, with chain ID 1. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs index dc940f797c..4358dee1ac 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_ethereum_config.rs @@ -14,9 +14,23 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{xcm_config::UniversalLocation, Runtime}; +use crate::{ + xcm_config, + xcm_config::{RelayTreasuryPalletAccount, UniversalLocation}, + Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, + RuntimeEvent, TransactionByteFee, +}; pub use bp_bridge_hub_kusama::snowbridge::EthereumNetwork; -use snowbridge_router_primitives::outbound::EthereumBlobExporter; +use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; +use frame_support::{parameter_types, weights::ConstantMultiplier}; +use pallet_xcm::EnsureXcm; +use parachains_common::{AccountId, Balance}; +use snowbridge_beacon_primitives::{Fork, ForkVersions}; +use snowbridge_core::AllowSiblingsOnly; +use snowbridge_router_primitives::{inbound::MessageToXcm, outbound::EthereumBlobExporter}; +use sp_core::H160; +use sp_runtime::traits::{ConstU32, ConstU8, Keccak256}; +use system_parachains_constants::kusama::fee::WeightToFee; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< @@ -25,3 +39,191 @@ pub type SnowbridgeExporter = EthereumBlobExporter< snowbridge_pallet_outbound_queue::Pallet, snowbridge_core::AgentIdOf, >; + +parameter_types! { + // The gateway address is set by governance. + pub storage EthereumGatewayAddress: H160 = H160::zero(); +} + +impl snowbridge_pallet_inbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Verifier = snowbridge_pallet_ethereum_client::Pallet; + type Token = Balances; + #[cfg(not(feature = "runtime-benchmarks"))] + type XcmSender = xcm_config::XcmRouter; + #[cfg(feature = "runtime-benchmarks")] + type XcmSender = benchmark_helpers::DoNothingRouter; + type ChannelLookup = EthereumSystem; + type GatewayAddress = EthereumGatewayAddress; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type MessageConverter = MessageToXcm< + CreateAssetCall, + bp_asset_hub_kusama::CreateForeignAssetDeposit, + InboundQueuePalletInstance, + AccountId, + Balance, + >; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type MaxMessageSize = ConstU32<2048>; + type WeightInfo = crate::weights::snowbridge_pallet_inbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type AssetTransactor = ::AssetTransactor; +} + +impl snowbridge_pallet_outbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Hashing = Keccak256; + type MessageQueue = MessageQueue; + type Decimals = ConstU8<12>; + type MaxMessagePayloadSize = ConstU32<2048>; + type MaxMessagesPerBlock = ConstU32<32>; + type GasMeter = snowbridge_core::outbound::ConstantGasMeter; + type Balance = Balance; + type WeightToFee = WeightToFee; + type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type Channels = EthereumSystem; +} + +#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, + }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 269568, + }, + }; +} + +#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 0, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 0, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 0, + }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 0, + } + }; +} + +parameter_types! { + // On Ethereum, a sync committee period spans 8192 slots, approximately 27 hours (or 256 epochs). + // We retain headers for 20 sync committee periods, equating to about 3 weeks. Headers older + // than this period are pruned. + pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; +} + +impl snowbridge_pallet_ethereum_client::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ForkVersions = ChainForkVersions; + type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; + type WeightInfo = crate::weights::snowbridge_pallet_ethereum_client::WeightInfo; +} + +impl snowbridge_pallet_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OutboundQueue = EthereumOutboundQueue; + type SiblingOrigin = EnsureXcm; + type AgentIdOf = snowbridge_core::AgentIdOf; + type TreasuryAccount = RelayTreasuryPalletAccount; + type Token = Balances; + type WeightInfo = crate::weights::snowbridge_pallet_system::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type DefaultPricingParameters = Parameters; + type InboundDeliveryCost = EthereumInboundQueue; +} + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmark_helpers { + use super::{EthereumGatewayAddress, RelayTreasuryPalletAccount, Runtime}; + use crate::{Balances, EthereumBeaconClient, ExistentialDeposit, RuntimeOrigin}; + use codec::Encode; + use frame_support::traits::fungible; + use hex_literal::hex; + use snowbridge_beacon_primitives::CompactExecutionHeader; + use snowbridge_pallet_inbound_queue::BenchmarkHelper; + use sp_core::H256; + use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()); + EthereumGatewayAddress::set(&hex!["EDa338E4dC46038493b885327842fD3E301CaB39"].into()); + } + } + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = Xcm<()>; + + fn validate( + _dest: &mut Option, + xcm: &mut Option>, + ) -> SendResult { + Ok((xcm.clone().unwrap(), Assets::new())) + } + fn deliver(xcm: Xcm<()>) -> Result { + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + Ok(hash) + } + } + + impl snowbridge_pallet_system::BenchmarkHelper for Runtime { + fn make_xcm_origin(location: Location) -> RuntimeOrigin { + // Drip ED to the `TreasuryAccount` + >::set_balance( + &RelayTreasuryPalletAccount::get(), + ExistentialDeposit::get(), + ); + + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn bridge_hub_inbound_queue_pallet_index_is_correct() { + assert_eq!( + InboundQueuePalletInstance::get(), + ::index() as u8 + ); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 9c835b7f83..d85f4616d4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -27,20 +27,21 @@ pub mod bridge_to_polkadot_config; mod weights; pub mod xcm_config; -use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::ParaId; -use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; -use snowbridge_router_primitives::inbound::MessageToXcm; +use snowbridge_core::{ + outbound::{Command, Fee}, + AgentId, PricingParameters, +}; + use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -68,9 +69,7 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{ - FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, -}; +use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -499,169 +498,6 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } -// Ethereum Bridge -parameter_types! { - // The gateway address is set by governance. - pub storage EthereumGatewayAddress: H160 = H160::zero(); -} - -#[cfg(feature = "runtime-benchmarks")] -pub mod benchmark_helpers { - use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; - use codec::Encode; - use snowbridge_beacon_primitives::CompactExecutionHeader; - use snowbridge_pallet_inbound_queue::BenchmarkHelper; - use sp_core::H256; - use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; - - impl BenchmarkHelper for Runtime { - fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { - EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()) - } - } - - pub struct DoNothingRouter; - impl SendXcm for DoNothingRouter { - type Ticket = Xcm<()>; - - fn validate( - _dest: &mut Option, - xcm: &mut Option>, - ) -> SendResult { - Ok((xcm.clone().unwrap(), Assets::new())) - } - fn deliver(xcm: Xcm<()>) -> Result { - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - Ok(hash) - } - } - - impl snowbridge_pallet_system::BenchmarkHelper for () { - fn make_xcm_origin(location: Location) -> RuntimeOrigin { - RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) - } - } -} - -impl snowbridge_pallet_inbound_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Verifier = snowbridge_pallet_ethereum_client::Pallet; - type Token = Balances; - #[cfg(not(feature = "runtime-benchmarks"))] - type XcmSender = xcm_config::XcmRouter; - #[cfg(feature = "runtime-benchmarks")] - type XcmSender = benchmark_helpers::DoNothingRouter; - type ChannelLookup = EthereumSystem; - type GatewayAddress = EthereumGatewayAddress; - #[cfg(feature = "runtime-benchmarks")] - type Helper = Runtime; - type MessageConverter = MessageToXcm< - CreateAssetCall, - bp_asset_hub_kusama::CreateForeignAssetDeposit, - InboundQueuePalletInstance, - AccountId, - Balance, - >; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type MaxMessageSize = ConstU32<2048>; - type WeightInfo = weights::snowbridge_pallet_inbound_queue::WeightInfo; - type PricingParameters = EthereumSystem; - type AssetTransactor = ::AssetTransactor; -} - -impl snowbridge_pallet_outbound_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Hashing = Keccak256; - type MessageQueue = MessageQueue; - type Decimals = ConstU8<12>; - type MaxMessagePayloadSize = ConstU32<2048>; - type MaxMessagesPerBlock = ConstU32<32>; - type GasMeter = snowbridge_core::outbound::ConstantGasMeter; - type Balance = Balance; - type WeightToFee = WeightToFee; - type WeightInfo = weights::snowbridge_pallet_outbound_queue::WeightInfo; - type PricingParameters = EthereumSystem; - type Channels = EthereumSystem; -} - -#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] -parameter_types! { - pub const ChainForkVersions: ForkVersions = ForkVersions { - genesis: Fork { - version: [0, 0, 0, 0], // 0x00000000 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 0, 0], // 0x01000000 - epoch: 0, - }, - bellatrix: Fork { - version: [2, 0, 0, 0], // 0x02000000 - epoch: 0, - }, - capella: Fork { - version: [3, 0, 0, 0], // 0x03000000 - epoch: 0, - }, - deneb: Fork { - version: [4, 0, 0, 0], // 0x04000000 - epoch: 0, - } - }; -} - -#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] -parameter_types! { - pub const ChainForkVersions: ForkVersions = ForkVersions { - genesis: Fork { - version: [0, 0, 0, 0], // 0x00000000 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 0, 0], // 0x01000000 - epoch: 74240, - }, - bellatrix: Fork { - version: [2, 0, 0, 0], // 0x02000000 - epoch: 144896, - }, - capella: Fork { - version: [3, 0, 0, 0], // 0x03000000 - epoch: 194048, - }, - deneb: Fork { - version: [4, 0, 0, 0], // 0x04000000 - epoch: 269568, - }, - }; -} - -parameter_types! { - pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; -} - -impl snowbridge_pallet_ethereum_client::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ForkVersions = ChainForkVersions; - type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; - type WeightInfo = weights::snowbridge_pallet_ethereum_client::WeightInfo; -} - -impl snowbridge_pallet_system::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OutboundQueue = EthereumOutboundQueue; - type SiblingOrigin = EnsureXcm; - type AgentIdOf = snowbridge_core::AgentIdOf; - type TreasuryAccount = TreasuryAccount; - type Token = Balances; - type WeightInfo = weights::snowbridge_pallet_system::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type Helper = (); - type DefaultPricingParameters = Parameters; - type InboundDeliveryCost = EthereumInboundQueue; -} - // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -961,8 +797,8 @@ impl_runtime_apis! { snowbridge_pallet_outbound_queue::api::prove_message::(leaf_index) } - fn calculate_fee(message: Message) -> Option { - snowbridge_pallet_outbound_queue::api::calculate_fee::(message) + fn calculate_fee(command: Command, parameters: Option>) -> Fee { + snowbridge_pallet_outbound_queue::api::calculate_fee::(command, parameters) } } @@ -1362,14 +1198,6 @@ cumulus_pallet_parachain_system::register_validate_block! { mod tests { use super::*; - #[test] - fn bridge_hub_inbound_queue_pallet_index_is_correct() { - assert_eq!( - InboundQueuePalletInstance::get(), - ::index() as u8 - ); - } - #[test] fn test_transasction_byte_fee_is_one_tenth_of_relay() { let relay_tbf = kusama_runtime_constants::fee::TRANSACTION_BYTE_FEE; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs index 0d5f29c6ff..5154e1f679 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_ethereum_client.rs @@ -1,43 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - //! Autogenerated weights for `snowbridge_pallet_ethereum_client` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --base-path -// /mnt/scratch/benchmark -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_ethereum_beacon_client +// --chain=./bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_ethereum_client // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,102 +46,103 @@ use core::marker::PhantomData; /// Weight functions for `snowbridge_pallet_ethereum_client`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_ethereum_client::WeightInfo for WeightInfo { - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) - /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::FinalizedBeaconStateIndex` (r:1 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconStateIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconStateMapping` (r:1 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconStateMapping` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:0 w:1) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::InitialCheckpointRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::InitialCheckpointRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:0 w:1) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:0 w:1) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:0 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_checkpoint() -> Weight { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3501` - // Minimum execution time: 97_185_781_000 picoseconds. - Weight::from_parts(97_263_571_000, 0) + // Minimum execution time: 104_613_642_000 picoseconds. + Weight::from_parts(104_853_038_000, 0) .saturating_add(Weight::from_parts(0, 3501)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(9)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: - // Measured: `92753` + // Measured: `92715` // Estimated: `93857` - // Minimum execution time: 25_999_968_000 picoseconds. - Weight::from_parts(26_051_019_000, 0) + // Minimum execution time: 25_994_917_000 picoseconds. + Weight::from_parts(26_043_912_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:1) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn submit_with_sync_committee() -> Weight { // Proof Size summary in bytes: - // Measured: `92717` + // Measured: `92715` // Estimated: `93857` - // Minimum execution time: 122_354_917_000 picoseconds. - Weight::from_parts(122_461_312_000, 0) + // Minimum execution time: 130_917_835_000 picoseconds. + Weight::from_parts(131_033_271_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:1) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaderIndex` (r:1 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaderIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaderMapping` (r:1 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaderMapping` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:0 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) fn submit_execution_header() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `346` // Estimated: `3537` - // Minimum execution time: 108_761_000 picoseconds. - Weight::from_parts(113_158_000, 0) + // Minimum execution time: 84_396_000 picoseconds. + Weight::from_parts(88_683_000, 0) .saturating_add(Weight::from_parts(0, 3537)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs index faf404f90c..11561a092b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_inbound_queue.rs @@ -1,41 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - //! Autogenerated weights for `snowbridge_pallet_inbound_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_inbound_queue +// --chain=./bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_inbound_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,22 +46,28 @@ use core::marker::PhantomData; /// Weight functions for `snowbridge_pallet_inbound_queue`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - /// Storage: EthereumInboundQueue Nonce (r:1 w:1) - /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `EthereumInboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumInboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumInboundQueue::Nonce` (r:1 w:1) + /// Proof: `EthereumInboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `3601` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) - .saturating_add(Weight::from_parts(0, 3601)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `743` + // Estimated: `4208` + // Minimum execution time: 102_623_000 picoseconds. + Weight::from_parts(106_279_000, 0) + .saturating_add(Weight::from_parts(0, 4208)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs index 8adcef076e..f0f033caae 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_outbound_queue.rs @@ -1,37 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -//! Autogenerated weights for `snowbridge_outbound_queue` +//! Autogenerated weights for `snowbridge_pallet_outbound_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `192.168.1.13`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_outbound_queue +// --chain=./bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_outbound_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --output -// ../parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_outbound_queue.rs +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,47 +43,53 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_outbound_queue`. +/// Weight functions for `snowbridge_pallet_outbound_queue`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_outbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) - /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) - /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Messages (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthereumOutboundQueue::Nonce` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::Messages` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn do_process_message() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3485` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 3485) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `117` + // Estimated: `3513` + // Minimum execution time: 28_906_000 picoseconds. + Weight::from_parts(29_566_000, 0) + .saturating_add(Weight::from_parts(0, 3513)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Digest (r:1 w:1) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn commit() -> Weight { // Proof Size summary in bytes: // Measured: `1094` // Estimated: `2579` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 2579) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Minimum execution time: 28_306_000 picoseconds. + Weight::from_parts(28_826_000, 0) + .saturating_add(Weight::from_parts(0, 2579)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn commit_single() -> Weight { // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 1586) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `101` + // Estimated: `1586` + // Minimum execution time: 8_435_000 picoseconds. + Weight::from_parts(9_127_000, 0) + .saturating_add(Weight::from_parts(0, 1586)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs index c6c188e323..d6f4364c8d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/snowbridge_pallet_system.rs @@ -1,38 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -//! Autogenerated weights for `snowbridge_system` +//! Autogenerated weights for `snowbridge_pallet_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `crake.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain -// bridge-hub-rococo-dev +// --chain=./bridge-hub-kusama-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=snowbridge_pallet_system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --output -// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_pallet_system.rs +// --heap-pages=4096 +// --output=./bridge-hub-kusama-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -42,215 +43,229 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_system`. +/// Weight functions for `snowbridge_pallet_system`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_system::WeightInfo for WeightInfo { - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(47_000_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 32_350_000 picoseconds. + Weight::from_parts(32_886_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: EthereumSystem Agents (r:1 w:1) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 24_485_000 picoseconds. + Weight::from_parts(25_102_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:0 w:1) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 28_966_000 picoseconds. + Weight::from_parts(29_583_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `EthereumSystem::Agents` (r:1 w:1) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn create_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `187` + // Measured: `521` // Estimated: `6196` - // Minimum execution time: 87_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) + // Minimum execution time: 64_420_000 picoseconds. + Weight::from_parts(65_684_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumSystem Channels (r:1 w:1) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:2 w:1) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn create_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `602` - // Estimated: `69050` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) - .saturating_add(Weight::from_parts(0, 69050)) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `966` + // Estimated: `69078` + // Minimum execution time: 77_855_000 picoseconds. + Weight::from_parts(79_653_000, 0) + .saturating_add(Weight::from_parts(0, 69078)) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn update_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `752` + // Estimated: `6212` + // Minimum execution time: 71_879_000 picoseconds. + Weight::from_parts(73_752_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:2 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn force_update_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `548` + // Estimated: `6212` + // Minimum execution time: 37_237_000 picoseconds. + Weight::from_parts(37_679_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_operating_mode() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn transfer_native_from_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `851` + // Estimated: `6212` + // Minimum execution time: 78_361_000 picoseconds. + Weight::from_parts(79_626_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn force_transfer_native_from_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `570` + // Estimated: `6212` + // Minimum execution time: 41_021_000 picoseconds. + Weight::from_parts(42_200_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn set_token_transfer_fees() -> Weight { // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_pricing_parameters() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 26_505_000 picoseconds. + Weight::from_parts(27_327_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index ab2e43e3a4..c8cbf6d6db 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -15,13 +15,13 @@ // along with Cumulus. If not, see . use super::{ - bridge_to_ethereum_config::EthereumNetwork, + bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_polkadot_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubPolkadotHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, - ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ parameter_types, diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 160ccbb27c..594bf05f85 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -18,12 +18,11 @@ use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ - bridge_to_ethereum_config::EthereumNetwork, + bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, - MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, - UncheckedExtrinsic, + BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, + RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; @@ -253,6 +252,7 @@ pub fn send_transfer_token_message_failure( local: (1 * UNITS / 100).into(), // 0.01 KSM remote: meth(1), }, + multiplier: FixedU128::from_rational(1, 1), } }, }); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 2533ea4ed3..2f630f6508 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -60,7 +60,7 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } @@ -103,13 +103,13 @@ pallet-xcm-bridge-hub = { default-features = false , version = "0.3.0" } # Ethereum Bridge (Snowbridge) snowbridge-beacon-primitives = { default-features = false , version = "0.1.0" } -snowbridge-pallet-system = { default-features = false , version = "0.1.0" } +snowbridge-pallet-system = { default-features = false , version = "0.1.1" } snowbridge-system-runtime-api = { default-features = false , version = "0.1.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } -snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.0" } -snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.0" } -snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.0" } -snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.1" } +snowbridge-pallet-ethereum-client = { default-features = false , version = "0.1.1" } +snowbridge-pallet-inbound-queue = { default-features = false , version = "0.1.1" } +snowbridge-pallet-outbound-queue = { default-features = false , version = "0.1.1" } +snowbridge-outbound-queue-runtime-api = { default-features = false , version = "0.1.1" } snowbridge-router-primitives = { default-features = false , version = "0.1.0" } snowbridge-runtime-common = { default-features = false, version = "0.1.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 6787337771..98be0473d5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -18,7 +18,7 @@ system-parachains-constants = { path = "../../../constants", default-features = bp-bridge-hub-cumulus = { default-features = false , version = "0.8.0" } bp-runtime = { default-features = false , version = "0.8.0" } bp-messages = { default-features = false , version = "0.8.0" } -snowbridge-core = { default-features = false , version = "0.1.0" } +snowbridge-core = { default-features = false , version = "0.1.1" } # Substrate Based Dependencies frame-support = { default-features = false, version = "29.0.0" } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 94e392174f..8cfe7b494c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -176,7 +176,9 @@ pub mod snowbridge { local: 1, // Reward for submitting a message to the Gateway contract on Ethereum remote: U256::one(), - } + }, + // Safety factor to cover unfavourable fluctuations in the ETH/DOT exchange rate. + multiplier: FixedU128::from_rational(1, 1), }; /// Network and location for the Ethereum chain. On Polkadot, the Ethereum chain bridged /// to is the Ethereum Main network, with chain ID 1. diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs index 5803366ef1..25aaa8f5b0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -14,9 +14,23 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{xcm_config::UniversalLocation, Runtime}; +use crate::{ + xcm_config, + xcm_config::{RelayTreasuryPalletAccount, UniversalLocation}, + Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, + RuntimeEvent, TransactionByteFee, +}; pub use bp_bridge_hub_polkadot::snowbridge::EthereumNetwork; -use snowbridge_router_primitives::outbound::EthereumBlobExporter; +use bp_bridge_hub_polkadot::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; +use frame_support::{parameter_types, weights::ConstantMultiplier}; +use pallet_xcm::EnsureXcm; +use parachains_common::{AccountId, Balance}; +use snowbridge_beacon_primitives::{Fork, ForkVersions}; +use snowbridge_core::AllowSiblingsOnly; +use snowbridge_router_primitives::{inbound::MessageToXcm, outbound::EthereumBlobExporter}; +use sp_core::H160; +use sp_runtime::traits::{ConstU32, ConstU8, Keccak256}; +use system_parachains_constants::polkadot::fee::WeightToFee; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< @@ -25,3 +39,191 @@ pub type SnowbridgeExporter = EthereumBlobExporter< snowbridge_pallet_outbound_queue::Pallet, snowbridge_core::AgentIdOf, >; + +parameter_types! { + // The gateway address is set by governance. + pub storage EthereumGatewayAddress: H160 = H160::zero(); +} + +impl snowbridge_pallet_inbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Verifier = snowbridge_pallet_ethereum_client::Pallet; + type Token = Balances; + #[cfg(not(feature = "runtime-benchmarks"))] + type XcmSender = xcm_config::XcmRouter; + #[cfg(feature = "runtime-benchmarks")] + type XcmSender = benchmark_helpers::DoNothingRouter; + type ChannelLookup = EthereumSystem; + type GatewayAddress = EthereumGatewayAddress; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type MessageConverter = MessageToXcm< + CreateAssetCall, + bp_asset_hub_polkadot::CreateForeignAssetDeposit, + InboundQueuePalletInstance, + AccountId, + Balance, + >; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type MaxMessageSize = ConstU32<2048>; + type WeightInfo = crate::weights::snowbridge_pallet_inbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type AssetTransactor = ::AssetTransactor; +} + +impl snowbridge_pallet_outbound_queue::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Hashing = Keccak256; + type MessageQueue = MessageQueue; + type Decimals = ConstU8<10>; + type MaxMessagePayloadSize = ConstU32<2048>; + type MaxMessagesPerBlock = ConstU32<32>; + type GasMeter = snowbridge_core::outbound::ConstantGasMeter; + type Balance = Balance; + type WeightToFee = WeightToFee; + type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue::WeightInfo; + type PricingParameters = EthereumSystem; + type Channels = EthereumSystem; +} + +#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, + }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 269568, + }, + }; +} + +#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] +parameter_types! { + pub const ChainForkVersions: ForkVersions = ForkVersions { + genesis: Fork { + version: [0, 0, 0, 0], // 0x00000000 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 0, 0], // 0x01000000 + epoch: 0, + }, + bellatrix: Fork { + version: [2, 0, 0, 0], // 0x02000000 + epoch: 0, + }, + capella: Fork { + version: [3, 0, 0, 0], // 0x03000000 + epoch: 0, + }, + deneb: Fork { + version: [4, 0, 0, 0], // 0x04000000 + epoch: 0, + } + }; +} + +parameter_types! { + // On Ethereum, a sync committee period spans 8192 slots, approximately 27 hours (or 256 epochs). + // We retain headers for 20 sync committee periods, equating to about 3 weeks. Headers older + // than this period are pruned. + pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; +} + +impl snowbridge_pallet_ethereum_client::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ForkVersions = ChainForkVersions; + type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; + type WeightInfo = crate::weights::snowbridge_pallet_ethereum_client::WeightInfo; +} + +impl snowbridge_pallet_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type OutboundQueue = EthereumOutboundQueue; + type SiblingOrigin = EnsureXcm; + type AgentIdOf = snowbridge_core::AgentIdOf; + type TreasuryAccount = RelayTreasuryPalletAccount; + type Token = Balances; + type WeightInfo = crate::weights::snowbridge_pallet_system::WeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type Helper = Runtime; + type DefaultPricingParameters = Parameters; + type InboundDeliveryCost = EthereumInboundQueue; +} + +#[cfg(feature = "runtime-benchmarks")] +pub mod benchmark_helpers { + use super::{EthereumGatewayAddress, RelayTreasuryPalletAccount, Runtime}; + use crate::{Balances, EthereumBeaconClient, ExistentialDeposit, RuntimeOrigin}; + use codec::Encode; + use frame_support::traits::fungible; + use hex_literal::hex; + use snowbridge_beacon_primitives::CompactExecutionHeader; + use snowbridge_pallet_inbound_queue::BenchmarkHelper; + use sp_core::H256; + use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; + + impl BenchmarkHelper for Runtime { + fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { + EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()); + EthereumGatewayAddress::set(&hex!["EDa338E4dC46038493b885327842fD3E301CaB39"].into()); + } + } + + pub struct DoNothingRouter; + impl SendXcm for DoNothingRouter { + type Ticket = Xcm<()>; + + fn validate( + _dest: &mut Option, + xcm: &mut Option>, + ) -> SendResult { + Ok((xcm.clone().unwrap(), Assets::new())) + } + fn deliver(xcm: Xcm<()>) -> Result { + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + Ok(hash) + } + } + + impl snowbridge_pallet_system::BenchmarkHelper for Runtime { + fn make_xcm_origin(location: Location) -> RuntimeOrigin { + // Drip ED to the `TreasuryAccount` + >::set_balance( + &RelayTreasuryPalletAccount::get(), + ExistentialDeposit::get(), + ); + + RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn bridge_hub_inbound_queue_pallet_index_is_correct() { + assert_eq!( + InboundQueuePalletInstance::get(), + ::index() as u8 + ); + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 3b60af9b18..7ffdb0ca3e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -27,20 +27,21 @@ pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; -use bp_bridge_hub_kusama::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; use bridge_hub_common::message_queue::{ AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::ParaId; -use snowbridge_beacon_primitives::{Fork, ForkVersions}; -use snowbridge_core::{outbound::Message, AgentId, AllowSiblingsOnly}; -use snowbridge_router_primitives::inbound::MessageToXcm; +use snowbridge_core::{ + outbound::{Command, Fee}, + AgentId, PricingParameters, +}; + use sp_api::impl_runtime_apis; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H160}; +use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Keccak256}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -68,9 +69,7 @@ use frame_system::{ use pallet_xcm::{EnsureXcm, IsVoiceOfBody}; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -use xcm_config::{ - FellowshipLocation, GovernanceLocation, TreasuryAccount, XcmOriginToTransactDispatchOrigin, -}; +use xcm_config::{FellowshipLocation, GovernanceLocation, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -500,169 +499,6 @@ impl pallet_utility::Config for Runtime { type WeightInfo = weights::pallet_utility::WeightInfo; } -// Ethereum Bridge -parameter_types! { - // The gateway address is set by governance. - pub storage EthereumGatewayAddress: H160 = H160::zero(); -} - -#[cfg(feature = "runtime-benchmarks")] -pub mod benchmark_helpers { - use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin}; - use codec::Encode; - use snowbridge_beacon_primitives::CompactExecutionHeader; - use snowbridge_pallet_inbound_queue::BenchmarkHelper; - use sp_core::H256; - use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash}; - - impl BenchmarkHelper for Runtime { - fn initialize_storage(block_hash: H256, header: CompactExecutionHeader) { - EthereumBeaconClient::store_execution_header(block_hash, header, 0, H256::default()) - } - } - - pub struct DoNothingRouter; - impl SendXcm for DoNothingRouter { - type Ticket = Xcm<()>; - - fn validate( - _dest: &mut Option, - xcm: &mut Option>, - ) -> SendResult { - Ok((xcm.clone().unwrap(), Assets::new())) - } - fn deliver(xcm: Xcm<()>) -> Result { - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - Ok(hash) - } - } - - impl snowbridge_pallet_system::BenchmarkHelper for () { - fn make_xcm_origin(location: Location) -> RuntimeOrigin { - RuntimeOrigin::from(pallet_xcm::Origin::Xcm(location)) - } - } -} - -impl snowbridge_pallet_inbound_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Verifier = snowbridge_pallet_ethereum_client::Pallet; - type Token = Balances; - #[cfg(not(feature = "runtime-benchmarks"))] - type XcmSender = xcm_config::XcmRouter; - #[cfg(feature = "runtime-benchmarks")] - type XcmSender = benchmark_helpers::DoNothingRouter; - type ChannelLookup = EthereumSystem; - type GatewayAddress = EthereumGatewayAddress; - #[cfg(feature = "runtime-benchmarks")] - type Helper = Runtime; - type MessageConverter = MessageToXcm< - CreateAssetCall, - bp_asset_hub_polkadot::CreateForeignAssetDeposit, - InboundQueuePalletInstance, - AccountId, - Balance, - >; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type MaxMessageSize = ConstU32<2048>; - type WeightInfo = weights::snowbridge_pallet_inbound_queue::WeightInfo; - type PricingParameters = EthereumSystem; - type AssetTransactor = ::AssetTransactor; -} - -impl snowbridge_pallet_outbound_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Hashing = Keccak256; - type MessageQueue = MessageQueue; - type Decimals = ConstU8<10>; - type MaxMessagePayloadSize = ConstU32<2048>; - type MaxMessagesPerBlock = ConstU32<32>; - type GasMeter = snowbridge_core::outbound::ConstantGasMeter; - type Balance = Balance; - type WeightToFee = WeightToFee; - type WeightInfo = weights::snowbridge_pallet_outbound_queue::WeightInfo; - type PricingParameters = EthereumSystem; - type Channels = EthereumSystem; -} - -#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] -parameter_types! { - pub const ChainForkVersions: ForkVersions = ForkVersions { - genesis: Fork { - version: [0, 0, 0, 0], // 0x00000000 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 0, 0], // 0x01000000 - epoch: 0, - }, - bellatrix: Fork { - version: [2, 0, 0, 0], // 0x02000000 - epoch: 0, - }, - capella: Fork { - version: [3, 0, 0, 0], // 0x03000000 - epoch: 0, - }, - deneb: Fork { - version: [4, 0, 0, 0], // 0x04000000 - epoch: 0, - } - }; -} - -#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))] -parameter_types! { - pub const ChainForkVersions: ForkVersions = ForkVersions { - genesis: Fork { - version: [0, 0, 0, 0], // 0x00000000 - epoch: 0, - }, - altair: Fork { - version: [1, 0, 0, 0], // 0x01000000 - epoch: 74240, - }, - bellatrix: Fork { - version: [2, 0, 0, 0], // 0x02000000 - epoch: 144896, - }, - capella: Fork { - version: [3, 0, 0, 0], // 0x03000000 - epoch: 194048, - }, - deneb: Fork { - version: [4, 0, 0, 0], // 0x04000000 - epoch: 269568, - }, - }; -} - -parameter_types! { - pub const MaxExecutionHeadersToKeep: u32 = 8192 * 20; -} - -impl snowbridge_pallet_ethereum_client::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ForkVersions = ChainForkVersions; - type MaxExecutionHeadersToKeep = MaxExecutionHeadersToKeep; - type WeightInfo = weights::snowbridge_pallet_ethereum_client::WeightInfo; -} - -impl snowbridge_pallet_system::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OutboundQueue = EthereumOutboundQueue; - type SiblingOrigin = EnsureXcm; - type AgentIdOf = snowbridge_core::AgentIdOf; - type TreasuryAccount = TreasuryAccount; - type Token = Balances; - type WeightInfo = weights::snowbridge_pallet_system::WeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type Helper = (); - type DefaultPricingParameters = Parameters; - type InboundDeliveryCost = EthereumInboundQueue; -} - // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime @@ -962,8 +798,8 @@ impl_runtime_apis! { snowbridge_pallet_outbound_queue::api::prove_message::(leaf_index) } - fn calculate_fee(message: Message) -> Option { - snowbridge_pallet_outbound_queue::api::calculate_fee::(message) + fn calculate_fee(command: Command, parameters: Option>) -> Fee { + snowbridge_pallet_outbound_queue::api::calculate_fee::(command, parameters) } } @@ -1363,14 +1199,6 @@ cumulus_pallet_parachain_system::register_validate_block! { mod tests { use super::*; - #[test] - fn bridge_hub_inbound_queue_pallet_index_is_correct() { - assert_eq!( - InboundQueuePalletInstance::get(), - ::index() as u8 - ); - } - #[test] fn test_transasction_byte_fee_is_one_tenth_of_relay() { let relay_tbf = polkadot_runtime_constants::fee::TRANSACTION_BYTE_FEE; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs index 0d5f29c6ff..5e00a852be 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs @@ -1,43 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - //! Autogenerated weights for `snowbridge_pallet_ethereum_client` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --base-path -// /mnt/scratch/benchmark -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_ethereum_beacon_client +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_ethereum_client // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,102 +46,103 @@ use core::marker::PhantomData; /// Weight functions for `snowbridge_pallet_ethereum_client`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_ethereum_client::WeightInfo for WeightInfo { - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient InitialCheckpointRoot (r:0 w:1) - /// Proof: EthereumBeaconClient InitialCheckpointRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:0 w:1) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:0 w:1) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:0 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::FinalizedBeaconStateIndex` (r:1 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconStateIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconStateMapping` (r:1 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconStateMapping` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:0 w:1) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::InitialCheckpointRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::InitialCheckpointRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:0 w:1) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:0 w:1) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:0 w:1) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:0 w:1) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) fn force_checkpoint() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `114` // Estimated: `3501` - // Minimum execution time: 97_185_781_000 picoseconds. - Weight::from_parts(97_263_571_000, 0) + // Minimum execution time: 101_311_912_000 picoseconds. + Weight::from_parts(101_492_831_000, 0) .saturating_add(Weight::from_parts(0, 3501)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(9)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateIndex (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconStateMapping (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconStateMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: - // Measured: `92753` + // Measured: `92787` // Estimated: `93857` - // Minimum execution time: 25_999_968_000 picoseconds. - Weight::from_parts(26_051_019_000, 0) + // Minimum execution time: 25_164_795_000 picoseconds. + Weight::from_parts(25_229_383_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient NextSyncCommittee (r:1 w:1) - /// Proof: EthereumBeaconClient NextSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient CurrentSyncCommittee (r:1 w:0) - /// Proof: EthereumBeaconClient CurrentSyncCommittee (max_values: Some(1), max_size: Some(92372), added: 92867, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:1) + /// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0) + /// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) fn submit_with_sync_committee() -> Weight { // Proof Size summary in bytes: - // Measured: `92717` + // Measured: `92787` // Estimated: `93857` - // Minimum execution time: 122_354_917_000 picoseconds. - Weight::from_parts(122_461_312_000, 0) + // Minimum execution time: 126_786_733_000 picoseconds. + Weight::from_parts(126_936_460_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: EthereumBeaconClient LatestFinalizedBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedBlockRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconState (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconState (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestExecutionState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderIndex (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderIndex (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaderMapping (r:1 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaderMapping (max_values: None, max_size: Some(36), added: 2511, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) + /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) + /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0) + /// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0) + /// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::LatestExecutionState` (r:1 w:1) + /// Proof: `EthereumBeaconClient::LatestExecutionState` (`max_values`: Some(1), `max_size`: Some(80), added: 575, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaderIndex` (r:1 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaderIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaderMapping` (r:1 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaderMapping` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:0 w:1) + /// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) fn submit_execution_header() -> Weight { // Proof Size summary in bytes: - // Measured: `386` + // Measured: `418` // Estimated: `3537` - // Minimum execution time: 108_761_000 picoseconds. - Weight::from_parts(113_158_000, 0) + // Minimum execution time: 88_695_000 picoseconds. + Weight::from_parts(92_638_000, 0) .saturating_add(Weight::from_parts(0, 3537)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs index faf404f90c..f912397030 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_inbound_queue.rs @@ -1,41 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - //! Autogenerated weights for `snowbridge_pallet_inbound_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_inbound_queue +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_inbound_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --steps -// 50 -// --repeat -// 20 -// --output -// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -48,22 +46,28 @@ use core::marker::PhantomData; /// Weight functions for `snowbridge_pallet_inbound_queue`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen) - /// Storage: EthereumInboundQueue Nonce (r:1 w:1) - /// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: `EthereumInboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumInboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:1 w:0) + /// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumInboundQueue::Nonce` (r:1 w:1) + /// Proof: `EthereumInboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `3601` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(70_000_000, 0) - .saturating_add(Weight::from_parts(0, 3601)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `815` + // Estimated: `4280` + // Minimum execution time: 104_849_000 picoseconds. + Weight::from_parts(107_855_000, 0) + .saturating_add(Weight::from_parts(0, 4280)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs index 8adcef076e..0f554e6e8f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_outbound_queue.rs @@ -1,37 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -//! Autogenerated weights for `snowbridge_outbound_queue` +//! Autogenerated weights for `snowbridge_pallet_outbound_queue` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-20, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `192.168.1.13`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ../target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain=bridge-hub-rococo-dev -// --pallet=snowbridge_outbound_queue +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=snowbridge_pallet_outbound_queue // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --output -// ../parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_outbound_queue.rs +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -41,47 +43,53 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_outbound_queue`. +/// Weight functions for `snowbridge_pallet_outbound_queue`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_outbound_queue::WeightInfo for WeightInfo { - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: EthereumOutboundQueue PendingHighPriorityMessageCount (r:1 w:1) - /// Proof: EthereumOutboundQueue PendingHighPriorityMessageCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Nonce (r:1 w:1) - /// Proof: EthereumOutboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue Messages (r:1 w:1) - /// Proof Skipped: EthereumOutboundQueue Messages (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `EthereumOutboundQueue::Nonce` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::Messages` (r:1 w:1) + /// Proof: `EthereumOutboundQueue::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn do_process_message() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `3485` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 3485) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(4_u64)) + // Measured: `81` + // Estimated: `3513` + // Minimum execution time: 28_111_000 picoseconds. + Weight::from_parts(28_570_000, 0) + .saturating_add(Weight::from_parts(0, 3513)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: EthereumOutboundQueue MessageLeaves (r:1 w:0) - /// Proof Skipped: EthereumOutboundQueue MessageLeaves (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: System Digest (r:1 w:1) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn commit() -> Weight { // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 2579) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `1057` + // Estimated: `2542` + // Minimum execution time: 27_193_000 picoseconds. + Weight::from_parts(27_384_000, 0) + .saturating_add(Weight::from_parts(0, 2542)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn commit_single() -> Weight { // Proof Size summary in bytes: - // Measured: `1094` - // Estimated: `2579` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(9_000_000, 1586) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `64` + // Estimated: `1549` + // Minimum execution time: 7_062_000 picoseconds. + Weight::from_parts(7_331_000, 0) + .saturating_add(Weight::from_parts(0, 1549)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs index c6c188e323..4db436fdde 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs @@ -1,38 +1,39 @@ -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -//! Autogenerated weights for `snowbridge_system` +//! Autogenerated weights for `snowbridge_pallet_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `crake.local`, CPU: `` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// target/release/polkadot-parachain +// ./target/production/polkadot // benchmark // pallet -// --chain -// bridge-hub-rococo-dev +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 // --pallet=snowbridge_pallet_system // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled -// --output -// parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_pallet_system.rs +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -42,215 +43,229 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `snowbridge_system`. +/// Weight functions for `snowbridge_pallet_system`. pub struct WeightInfo(PhantomData); impl snowbridge_pallet_system::WeightInfo for WeightInfo { - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(47_000_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 32_064_000 picoseconds. + Weight::from_parts(32_545_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: EthereumSystem Agents (r:1 w:1) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) + fn set_operating_mode() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 24_339_000 picoseconds. + Weight::from_parts(25_149_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:0 w:1) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + fn set_pricing_parameters() -> Weight { + // Proof Size summary in bytes: + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 29_237_000 picoseconds. + Weight::from_parts(29_824_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `EthereumSystem::Agents` (r:1 w:1) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn create_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `187` + // Measured: `485` // Estimated: `6196` - // Minimum execution time: 87_000_000 picoseconds. - Weight::from_parts(87_000_000, 0) + // Minimum execution time: 61_956_000 picoseconds. + Weight::from_parts(63_946_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) } - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumSystem Channels (r:1 w:1) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:1 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:2 w:1) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:1 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn create_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `602` - // Estimated: `69050` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(84_000_000, 0) - .saturating_add(Weight::from_parts(0, 69050)) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `930` + // Estimated: `69078` + // Minimum execution time: 73_087_000 picoseconds. + Weight::from_parts(75_308_000, 0) + .saturating_add(Weight::from_parts(0, 69078)) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn update_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `716` + // Estimated: `6212` + // Minimum execution time: 70_147_000 picoseconds. + Weight::from_parts(71_396_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Channels (r:1 w:0) - /// Proof: EthereumSystem Channels (max_values: None, max_size: Some(12), added: 2487, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:2 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn force_update_channel() -> Weight { // Proof Size summary in bytes: - // Measured: `256` - // Estimated: `6044` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(41_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `548` + // Estimated: `6212` + // Minimum execution time: 36_346_000 picoseconds. + Weight::from_parts(37_302_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_operating_mode() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) - .saturating_add(Weight::from_parts(0, 3517)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0) + /// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn transfer_native_from_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `815` + // Estimated: `6212` + // Minimum execution time: 73_833_000 picoseconds. + Weight::from_parts(75_407_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: EthereumSystem Agents (r:1 w:0) - /// Proof: EthereumSystem Agents (max_values: None, max_size: Some(40), added: 2515, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:2 w:2) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:0) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Agents` (r:1 w:0) + /// Proof: `EthereumSystem::Agents` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:2 w:2) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:0) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn force_transfer_native_from_agent() -> Weight { // Proof Size summary in bytes: - // Measured: `252` - // Estimated: `6044` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) - .saturating_add(Weight::from_parts(0, 6044)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `570` + // Estimated: `6212` + // Minimum execution time: 40_908_000 picoseconds. + Weight::from_parts(41_888_000, 0) + .saturating_add(Weight::from_parts(0, 6212)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `EthereumSystem::Channels` (r:1 w:0) + /// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`) + /// Storage: `EthereumSystem::PricingParameters` (r:1 w:0) + /// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::Pages` (r:0 w:1) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65613), added: 68088, mode: `MaxEncodedLen`) fn set_token_transfer_fees() -> Weight { // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) - } - - /// Storage: ParachainInfo ParachainId (r:1 w:0) - /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0) - /// Proof: EthereumOutboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: MessageQueue Pages (r:0 w:1) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) - fn set_pricing_parameters() -> Weight { - // Proof Size summary in bytes: - // Measured: `80` - // Estimated: `3517` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(42_000_000, 3517) - .saturating_add(T::DbWeight::get().reads(4_u64)) - .saturating_add(T::DbWeight::get().writes(3_u64)) + // Measured: `219` + // Estimated: `3601` + // Minimum execution time: 26_585_000 picoseconds. + Weight::from_parts(27_216_000, 0) + .saturating_add(Weight::from_parts(0, 3601)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 9be371b2aa..e912326f3a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -15,13 +15,13 @@ // along with Cumulus. If not, see . use super::{ - bridge_to_ethereum_config::EthereumNetwork, + bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_kusama_config::{ DeliveryRewardInBalance, RequiredStakeForStakeAndSlash, ToBridgeHubKusamaHaulBlobExporter, }, - AccountId, AllPalletsWithSystem, Balances, EthereumGatewayAddress, ParachainInfo, - ParachainSystem, PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ parameter_types, diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index 29f8ad5ad4..bde909648e 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -18,12 +18,11 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ - bridge_to_ethereum_config::EthereumNetwork, + bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, EthereumGatewayAddress, Executive, - MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, - UncheckedExtrinsic, + BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, + RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; @@ -253,6 +252,7 @@ pub fn send_transfer_token_message_failure( local: (1 * UNITS / 100).into(), // 0.01 DOT remote: meth(1), }, + multiplier: FixedU128::from_rational(1, 1), } }, }); diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index 577cd7bf57..7c0552b188 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -59,7 +59,7 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } polkadot-core-primitives = { default-features = false, version = "8.0.0" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.1" } diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 2275f57ae7..83f5cd6f40 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -80,7 +80,7 @@ sp-version = { default-features = false, version = "30.0.0" } sp-genesis-builder = { default-features = false, version = "0.8.0" } # Polkadot dependencies -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.1" } xcm = { package = "staging-xcm", default-features = false, version = "8.0.1" } diff --git a/system-parachains/people/people-kusama/Cargo.toml b/system-parachains/people/people-kusama/Cargo.toml index c2257634c4..7cfe0724a7 100644 --- a/system-parachains/people/people-kusama/Cargo.toml +++ b/system-parachains/people/people-kusama/Cargo.toml @@ -51,7 +51,7 @@ sp-transaction-pool = { default-features = false, version = "27.0.0" } sp-version = { default-features = false, version = "30.0.0" } # Polkadot -pallet-xcm = { default-features = false, version = "8.0.3" } +pallet-xcm = { default-features = false, version = "8.0.4" } pallet-xcm-benchmarks = { default-features = false, optional = true , version = "8.0.2" } polkadot-parachain-primitives = { default-features = false, version = "7.0.0" } polkadot-runtime-common = { default-features = false, version = "8.0.1" }