diff --git a/Cargo.lock b/Cargo.lock index c29696c..118562c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -572,7 +572,9 @@ dependencies = [ "asset-test-utils", "assets-common", "bp-asset-hub-paseo", + "bp-bridge-hub-kusama", "bp-bridge-hub-paseo", + "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", @@ -644,7 +646,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] @@ -1061,14 +1063,31 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-asset-hub-kusama" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-std", + "staging-xcm", + "system-parachains-constants 1.0.0 (git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8)", +] + [[package]] name = "bp-asset-hub-paseo" version = "1.0.0" dependencies = [ + "bp-xcm-bridge-hub-router", "frame-support", + "parity-scale-codec", + "scale-info", "sp-std", "staging-xcm", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] @@ -1087,6 +1106,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-bridge-hub-kusama" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", + "snowbridge-core", + "sp-api", + "sp-runtime", + "sp-std", + "staging-xcm", + "system-parachains-constants 1.0.0 (git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8)", +] + [[package]] name = "bp-bridge-hub-paseo" version = "1.0.0" @@ -1095,13 +1133,33 @@ dependencies = [ "bp-messages", "bp-runtime", "frame-support", - "parity-scale-codec", - "scale-info", + "kusama-runtime-constants", + "paseo-runtime-constants", + "snowbridge-core", + "sp-api", + "sp-runtime", + "sp-std", + "staging-xcm", + "system-parachains-constants 1.0.0", +] + +[[package]] +name = "bp-bridge-hub-polkadot" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", "snowbridge-core", "sp-api", "sp-runtime", "sp-std", "staging-xcm", + "system-parachains-constants 1.0.0 (git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8)", ] [[package]] @@ -1122,6 +1180,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-kusama" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c37ed284f7648ca888de72da69873ead9672b56436b08eae2e196c11d0847626" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + [[package]] name = "bp-messages" version = "0.8.0" @@ -1333,16 +1405,20 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] name = "bridge-hub-paseo-runtime" version = "1.0.0" dependencies = [ + "bp-asset-hub-kusama", "bp-asset-hub-paseo", + "bp-bridge-hub-kusama", "bp-bridge-hub-paseo", + "bp-bridge-hub-polkadot", "bp-header-chain", + "bp-kusama", "bp-messages", "bp-parachains", "bp-polkadot", @@ -1369,6 +1445,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", + "kusama-runtime-constants", "log", "pallet-aura", "pallet-authorship", @@ -1430,7 +1507,7 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] @@ -1723,7 +1800,7 @@ dependencies = [ "sp-core", "sp-runtime", "staging-xcm", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] @@ -4146,7 +4223,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -4626,6 +4703,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" +[[package]] +name = "kusama-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", +] + [[package]] name = "kvdb" version = "0.13.0" @@ -6489,9 +6581,9 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "10.0.2" +version = "10.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d1157d9a4b7966040158a7b4f1fb29f0cefa8deb6eb9b3452df7ce4161a31c" +checksum = "a36858c4275b7d19671b321e95f545e07c9643f97dffed1b333774cb391a4456" dependencies = [ "frame-benchmarking", "frame-support", @@ -7299,9 +7391,9 @@ dependencies = [ [[package]] name = "parachains-common" -version = "8.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34aa00981a24a2b772afaa49e258f9bcd6bb372db060a05614becc1c74d4456" +checksum = "711a4c073e7c83aac7e414ba16c7c641d6d9e22e6d32f9775ff35b2464ffd7ff" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -7535,7 +7627,7 @@ dependencies = [ [[package]] name = "paseo-runtime" -version = "1.2.7" +version = "1.2.8" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -7827,7 +7919,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "system-parachains-constants", + "system-parachains-constants 1.0.0", ] [[package]] @@ -8817,6 +8909,21 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "polkadot-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", + "staging-xcm-builder", +] + [[package]] name = "polkadot-runtime-metrics" version = "8.0.0" @@ -11688,9 +11795,9 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a73ef707257064bc4ecce8323cdb7c30e8ecd1ce74aa89a6e82e81fa8b9970" +checksum = "5404af73550b39022e08e5500b30fba627e109a56407b7e80b08da2305b11bfe" dependencies = [ "byte-slice-cast", "frame-support", @@ -11713,9 +11820,9 @@ dependencies = [ [[package]] name = "snowbridge-core" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3e2e3b94bfcfc8f363e21a6c5a1d3c67eb4592ada672c868a3236ad1dd563b" +checksum = "aed4ebefed4c40b9c00e9adf5f02ab2760a7a2dad8bf05110c0013a7a59f4097" dependencies = [ "ethabi-decode", "frame-support", @@ -11803,9 +11910,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41b74c0509a263bec0b86a5892d3a5fbac0084fc7f7b2e5cc523119ed91c7e3" +checksum = "06b0cddcf36990abadb88f2b2e0ad70b0b054cb7b99d3fb8ebeb8b240a360dee" dependencies = [ "bp-runtime", "byte-slice-cast", @@ -11834,9 +11941,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client-fixtures" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d5b4b7e17eaadbc52ac3fc9fbcce63dfc60c05a1b19604cd009d6595c1175e" +checksum = "08ec8b51ade2efa43052b6674e1767eddc33881937c22ebe9de3989776ab2e3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -11850,9 +11957,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9709398848997157335598e46a16c357bcec29e1a0db0917bbfe8aa64f45b" +checksum = "bc432a9022892842137975172ecf448662659b6774d734fedd487344183a1297" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -11883,9 +11990,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d8fff63b0a64d1dd06571ad074e664594bd9392481cd3489edde36e1d2dcc96" +checksum = "1a807de65ca917735369a94d6d37390c325f29f6dabfbd738c0278e3db003829" dependencies = [ "frame-benchmarking", "frame-support", @@ -11989,9 +12096,9 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bce50af98162e76b5ae50a2beb215bcde2a199eb5ea579ba4752b91278e655b1" +checksum = "e01c27ca895778591488864880f4c6eb2ddbc1538c76bf688dbccaa4a5ca9316" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -13369,6 +13476,21 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "system-parachains-constants" +version = "1.0.0" +source = "git+https://github.com/polkadot-fellows/runtimes?tag=v1.2.8#40f849df87a8a1b79aba4cfb7ce762d868243dca" +dependencies = [ + "frame-support", + "kusama-runtime-constants", + "parachains-common", + "polkadot-core-primitives", + "polkadot-primitives", + "polkadot-runtime-constants", + "smallvec", + "sp-runtime", +] + [[package]] name = "tap" version = "1.0.1" @@ -14595,7 +14717,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core 0.51.1", + "windows-core", "windows-targets 0.48.5", ] @@ -14608,15 +14730,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - [[package]] name = "windows-sys" version = "0.45.0" diff --git a/Cargo.toml b/Cargo.toml index ce10f71..b648842 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,12 @@ repository = "https://github.com/paseo-network/runtimes.git" license = "GPL-3.0-only" [workspace.dependencies] +kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "kusama-runtime-constants", default-features = false } +bp-bridge-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-bridge-hub-kusama", default-features = false } +bp-bridge-hub-polkadot = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-bridge-hub-polkadot", default-features = false } + +bp-asset-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-asset-hub-kusama", default-features = false } + asset-hub-paseo-runtime = { path = "system-parachains/asset-hub-paseo", default-features = false } bridge-hub-paseo-runtime = { path = "system-parachains/bridge-hub-paseo", default-features = false } bp-bridge-hub-paseo = { path = "system-parachains/bridge-hub-paseo/primitives", default-features = false} @@ -18,14 +24,17 @@ bridge-hub-paseo-emulated-chain = { path = "integration-tests/emulated/chains/pa penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/testing/penpal"} paseo-emulated-chain = { path = "integration-tests/emulated/chains/relays/paseo"} assert_matches = { version = "1.5.0" } + asset-test-utils = { version = "8.0.1" } assets-common = { version = "0.8.0", default-features = false } authority-discovery-primitives = { version = "27.0.0", default-features = false, package = "sp-authority-discovery" } babe-primitives = { version = "0.33.0", default-features = false, package = "sp-consensus-babe" } beefy-primitives = { version = "14.0.0", default-features = false, package = "sp-consensus-beefy" } binary-merkle-tree = { version = "14.0.0", default-features = false } + bp-bridge-hub-cumulus = { version = "0.8.0", default-features = false } bp-header-chain = { version = "0.8.1", default-features = false } +bp-kusama = { version = "0.6.0", default-features = false } bp-messages = { version = "0.8.0", default-features = false } bp-parachains = { version = "0.8.0", default-features = false } bp-polkadot = { version = "0.6.0", default-features = false } @@ -153,17 +162,17 @@ separator = { version = "0.4.1" } serde = { version = "1.0.196" } serde_json = { version = "1.0.113" } smallvec = { version = "1.13.1" } -snowbridge-beacon-primitives = { version = "0.1.0", default-features = false } -snowbridge-core = { version = "0.1.1", default-features = false } +snowbridge-beacon-primitives = { version = "0.1.2", default-features = false } +snowbridge-core = { version = "0.1.3", default-features = false } snowbridge-outbound-queue-runtime-api = { version = "0.1.1", default-features = false } -snowbridge-pallet-ethereum-client = { version = "0.1.2", default-features = false } -snowbridge-pallet-inbound-queue = { version = "0.1.1", default-features = false } -snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" } +snowbridge-pallet-ethereum-client = { version = "0.1.3", default-features = false } +snowbridge-pallet-inbound-queue = { version = "0.1.3", default-features = false } +snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.1" } snowbridge-pallet-outbound-queue = { version = "0.1.1", default-features = false } snowbridge-pallet-system = { version = "0.1.1", default-features = false } snowbridge-router-primitives = { version = "0.1.0", default-features = false } snowbridge-runtime-common = { version = "0.1.0", default-features = false } -snowbridge-runtime-test-common = { version = "0.1.0" } +snowbridge-runtime-test-common = { version = "0.1.2" } snowbridge-system-runtime-api = { version = "0.1.0", default-features = false } sp-api = { version = "27.0.1", default-features = false } sp-application-crypto = { version = "31.0.0", default-features = false } diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 165409d..20b163e 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -68,15 +68,12 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result { - Ok(Box::new(PaseoChainSpec::from_json_file(path)?)) - }, - x if x.starts_with("asset-hub-paseo") => { - Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)) - }, - x if x.starts_with("bridge-hub-paseo") => { - Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)) - }, + x if x.starts_with("paseo") | x.starts_with("dot") => + Ok(Box::new(PaseoChainSpec::from_json_file(path)?)), + x if x.starts_with("asset-hub-paseo") => + Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)), + x if x.starts_with("bridge-hub-paseo") => + Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)), _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 34106b9..d4169f5 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -60,8 +60,7 @@ fn main() -> Result<(), String> { ), ( "people-paseo-local", - Box::new(|| system_parachains_specs::people_paseo_local_testnet_config()) - as Box<_>, + Box::new(|| system_parachains_specs::people_paseo_local_testnet_config()) as Box<_>, ), ]); @@ -70,7 +69,7 @@ fn main() -> Result<(), String> { print!("{chain_spec}"); Ok(()) } else { - let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { let extra = if n + 1 < supported_chains.len() { ", " } else { "" }; format!("{c}{k}{extra}") }); diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-paseo/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-paseo/src/genesis.rs index 542e3f1..9410b06 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-paseo/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-paseo/src/genesis.rs @@ -14,7 +14,7 @@ // limitations under the License. // Substrate -use sp_core::{storage::Storage}; +use sp_core::storage::Storage; // Cumulus use emulated_integration_tests_common::{ @@ -46,8 +46,8 @@ pub fn genesis() -> Storage { .into_iter() .map(|(acc, aura)| { ( - acc.clone(), // account id - acc, // validator id + acc.clone(), // account id + acc, // validator id bridge_hub_paseo_runtime::SessionKeys { aura }, // session keys ) }) @@ -67,7 +67,6 @@ pub fn genesis() -> Storage { build_genesis_storage( &genesis_config, - bridge_hub_paseo_runtime::WASM_BINARY - .expect("WASM binary was not built, please build it!"), + bridge_hub_paseo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"), ) } diff --git a/integration-tests/emulated/chains/relays/paseo/src/genesis.rs b/integration-tests/emulated/chains/relays/paseo/src/genesis.rs index f823070..c50d412 100644 --- a/integration-tests/emulated/chains/relays/paseo/src/genesis.rs +++ b/integration-tests/emulated/chains/relays/paseo/src/genesis.rs @@ -112,9 +112,7 @@ pub fn genesis() -> Storage { minimum_validator_count: 1, stakers: validators::initial_authorities() .iter() - .map(|x| { - (x.0.clone(), x.1.clone(), STASH, paseo_runtime::StakerStatus::Validator) - }) + .map(|x| (x.0.clone(), x.1.clone(), STASH, paseo_runtime::StakerStatus::Validator)) .collect(), invulnerables: validators::initial_authorities().iter().map(|x| x.0.clone()).collect(), force_era: pallet_staking::Forcing::ForceNone, diff --git a/integration-tests/emulated/networks/paseo-system/src/lib.rs b/integration-tests/emulated/networks/paseo-system/src/lib.rs index 31b657c..e6383cc 100644 --- a/integration-tests/emulated/networks/paseo-system/src/lib.rs +++ b/integration-tests/emulated/networks/paseo-system/src/lib.rs @@ -15,13 +15,13 @@ pub use asset_hub_paseo_emulated_chain; pub use bridge_hub_paseo_emulated_chain; -pub use penpal_emulated_chain; pub use paseo_emulated_chain; +pub use penpal_emulated_chain; use asset_hub_paseo_emulated_chain::AssetHubPaseo; use bridge_hub_paseo_emulated_chain::BridgeHubPaseo; -use penpal_emulated_chain::PenpalB; use paseo_emulated_chain::Paseo; +use penpal_emulated_chain::PenpalB; // Cumulus use emulated_integration_tests_common::{ diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/lib.rs index e0a74ab..cbd379f 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/lib.rs @@ -21,10 +21,7 @@ pub use sp_runtime::DispatchError; pub use xcm::{ latest::ParentThen, prelude::{AccountId32 as AccountId32Junction, *}, - v3::{ - self, Error, - NetworkId::{Polkadot as PolkadotId}, - }, + v3::{self, Error, NetworkId::Polkadot as PolkadotId}, }; // Bridges @@ -42,25 +39,20 @@ pub use emulated_integration_tests_common::{ PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; pub use integration_tests_helpers::test_sibling_is_trusted_teleporter; +pub use parachains_common::{AccountId, Balance}; pub use paseo_system_emulated_network::{ asset_hub_paseo_emulated_chain::{ genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPaseoParaPallet as AssetHubPaseoPallet, }, bridge_hub_paseo_emulated_chain::{ - genesis::ED as BRIDGE_HUB_POLKADOT_ED, - BridgeHubPaseoParaPallet as BridgeHubPaseoPallet, + genesis::ED as BRIDGE_HUB_POLKADOT_ED, BridgeHubPaseoParaPallet as BridgeHubPaseoPallet, }, paseo_emulated_chain::{genesis::ED as POLKADOT_ED, PaseoRelayPallet as PaseoPallet}, - AssetHubPaseoPara as AssetHubPaseo, - AssetHubPaseoParaReceiver as AssetHubPaseoReceiver, - AssetHubPaseoParaSender as AssetHubPaseoSender, - BridgeHubPaseoPara as BridgeHubPaseo, - BridgeHubPaseoParaSender as BridgeHubPaseoSender, PaseoRelay as Paseo, -}; -pub use parachains_common::{AccountId, Balance}; -pub use paseo_system_emulated_network::{ penpal_emulated_chain::PenpalBParaPallet as PenpalBPallet, - BridgeHubPaseoParaReceiver as BridgeHubPaseoReceiver, PenpalBPara as PenpalB, + AssetHubPaseoPara as AssetHubPaseo, AssetHubPaseoParaReceiver as AssetHubPaseoReceiver, + AssetHubPaseoParaSender as AssetHubPaseoSender, BridgeHubPaseoPara as BridgeHubPaseo, + BridgeHubPaseoParaReceiver as BridgeHubPaseoReceiver, + BridgeHubPaseoParaSender as BridgeHubPaseoSender, PaseoRelay as Paseo, PenpalBPara as PenpalB, PenpalBParaReceiver as PenpalBReceiver, PenpalBParaSender as PenpalBSender, }; diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/tests/snowbridge.rs index d9b918d..2105187 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-paseo/src/tests/snowbridge.rs @@ -30,18 +30,8 @@ use paseo_system_emulated_network::{ penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, BridgeHubPaseoParaSender as BridgeHubPaseoSender, }; -use snowbridge_beacon_primitives::CompactExecutionHeader; -use snowbridge_core::{ - gwei, - inbound::{Log, Message, Proof}, - meth, - outbound::OperatingMode, - Rewards, -}; -use snowbridge_pallet_inbound_queue_fixtures::{ - register_token_with_insufficient_fee::make_register_token_with_infufficient_fee_message, - InboundQueueFixture, -}; +use snowbridge_core::{gwei, inbound::InboundQueueFixture, meth, outbound::OperatingMode, Rewards}; +use snowbridge_pallet_inbound_queue_fixtures::register_token::make_register_token_message; use snowbridge_pallet_system::PricingParametersOf; use snowbridge_router_primitives::inbound::{ Command, Destination, GlobalConsensusEthereumConvertsFor, MessageV1, VersionedMessage, @@ -55,6 +45,9 @@ const CHAIN_ID: u64 = 11155111; const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ETHEREUM_DESTINATION_ADDRESS: [u8; 20] = hex!("44a57ee2f2FCcb85FDa2B0B18EBD0D8D2333700e"); const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301CaB39"); +const INSUFFICIENT_XCM_FEE: u128 = 1000; +const XCM_FEE: u128 = 4_000_000_000; +const WETH_AMOUNT: u128 = 1_000_000_000; #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum ControlCall { @@ -72,13 +65,11 @@ pub enum SnowbridgeControl { } pub fn send_inbound_message(fixture: InboundQueueFixture) -> DispatchResult { - EthereumBeaconClient::store_execution_header( - fixture.message.proof.block_hash, - fixture.execution_header, - 0, - H256::default(), - ); - + EthereumBeaconClient::store_finalized_header( + fixture.finalized_header, + fixture.block_roots_root, + ) + .unwrap(); EthereumInboundQueue::submit( RuntimeOrigin::signed(BridgeHubPaseoSender::get()), fixture.message, @@ -88,12 +79,13 @@ pub fn send_inbound_message(fixture: InboundQueueFixture) -> DispatchResult { /// Create an agent on Ethereum. An agent is a representation of an entity in the Paseo /// ecosystem (like a parachain) on Ethereum. #[test] -#[ignore] fn create_agent() { let origin_para: u32 = 1001; // Fund the origin parachain sovereign account so that it can pay execution fees. BridgeHubPaseo::fund_para_sovereign(origin_para.into(), INITIAL_FUND); - + // Fund Treasury account with ED so that when create agent fees are paid to treasury, + // the treasury account may exist. + BridgeHubPaseo::fund_accounts(vec![(RelayTreasuryPalletAccount::get(), INITIAL_FUND)]); let sudo_origin = ::RuntimeOrigin::root(); let destination = Paseo::child_location_of(BridgeHubPaseo::para_id()).into(); @@ -145,15 +137,15 @@ fn create_agent() { /// Create a channel for a consensus system. A channel is a bidirectional messaging channel /// between BridgeHub and Ethereum. #[test] -#[ignore] fn create_channel() { let origin_para: u32 = 1001; // Fund AssetHub sovereign account so that it can pay execution fees. BridgeHubPaseo::fund_para_sovereign(origin_para.into(), INITIAL_FUND); - + // Fund Treasury account with ED so that when create agent fees are paid to treasury, + // the treasury account may exist. + BridgeHubPaseo::fund_accounts(vec![(RelayTreasuryPalletAccount::get(), INITIAL_FUND)]); let sudo_origin = ::RuntimeOrigin::root(); - let destination: VersionedLocation = - Paseo::child_location_of(BridgeHubPaseo::para_id()).into(); + let destination: VersionedLocation = Paseo::child_location_of(BridgeHubPaseo::para_id()).into(); let create_agent_call = SnowbridgeControl::Control(ControlCall::CreateAgent {}); // Construct XCM to create an agent for para 1001 @@ -236,8 +228,15 @@ fn register_weth_token_from_ethereum_to_asset_hub() { vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], )); // Construct RegisterToken message and sent to inbound queue - let register_token_message = make_register_token_message(); - assert_ok!(send_inbound_message(register_token_message.clone())); + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::RegisterToken { token: WETH.into(), fee: XCM_FEE }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); assert_expected_events!( BridgeHubPaseo, @@ -307,9 +306,7 @@ fn send_token_from_ethereum_to_penpal() { 1000, )); - assert!(::ForeignAssets::asset_exists( - weth_asset_id - )); + assert!(::ForeignAssets::asset_exists(weth_asset_id)); }); BridgeHubPaseo::execute_with(|| { @@ -392,10 +389,37 @@ fn send_token_from_ethereum_to_asset_hub() { )); // Construct RegisterToken message and sent to inbound queue - assert_ok!(send_inbound_message(make_register_token_message())); + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::RegisterToken { token: WETH.into(), fee: XCM_FEE }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); + + assert_expected_events!( + BridgeHubPaseo, + vec![ + RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {}, + ] + ); // Construct SendToken message and sent to inbound queue - assert_ok!(send_inbound_message(make_send_token_message())); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendToken { + token: WETH.into(), + destination: Destination::AccountId32 { id: AssetHubPaseoReceiver::get().into() }, + amount: WETH_AMOUNT, + fee: XCM_FEE, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); // Check that the message was sent assert_expected_events!( @@ -480,7 +504,15 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { )); // Construct RegisterToken message and sent to inbound queue - assert_ok!(send_inbound_message(make_register_token_message())); + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::RegisterToken { token: WETH.into(), fee: XCM_FEE }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); // Check that the register token message was sent using xcm assert_expected_events!( @@ -491,7 +523,19 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Construct SendToken message and sent to inbound queue - assert_ok!(send_inbound_message(make_send_token_message())); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendToken { + token: WETH.into(), + destination: Destination::AccountId32 { id: AssetHubPaseoReceiver::get().into() }, + amount: WETH_AMOUNT, + fee: XCM_FEE, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); // Check that the send token message was sent using xcm assert_expected_events!( @@ -540,25 +584,24 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS }], )); - let free_balance_before = - ::Balances::free_balance( - AssetHubPaseoReceiver::get(), - ); + let free_balance_before = ::Balances::free_balance( + AssetHubPaseoReceiver::get(), + ); // Send the Weth back to Ethereum assert_ok!( - ::PolkadotXcm::reserve_transfer_assets( + ::PolkadotXcm::limited_reserve_transfer_assets( RuntimeOrigin::signed(AssetHubPaseoReceiver::get()), Box::new(destination), Box::new(beneficiary), Box::new(multi_assets), 0, + Unlimited, ) ); - let free_balance_after = - ::Balances::free_balance( - AssetHubPaseoReceiver::get(), - ); + let free_balance_after = ::Balances::free_balance( + AssetHubPaseoReceiver::get(), + ); // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender let free_balance_diff = free_balance_before - free_balance_after; assert!(free_balance_diff > base_fee); @@ -614,8 +657,15 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() { )); // Construct RegisterToken message and sent to inbound queue - let message = make_register_token_with_infufficient_fee_message(); - assert_ok!(send_inbound_message(message)); + let message_id: H256 = [1; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::RegisterToken { token: WETH.into(), fee: INSUFFICIENT_XCM_FEE }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPaseo::para_id()).unwrap(); assert_expected_events!( BridgeHubPaseo, @@ -683,65 +733,3 @@ fn ethereum_sovereign_account() -> AccountId { let origin_location = (Parent, Parent, EthereumNetwork::get()).into(); GlobalConsensusEthereumConvertsFor::::convert_location(&origin_location).unwrap() } - -fn make_register_token_message() -> InboundQueueFixture { - InboundQueueFixture { - execution_header: CompactExecutionHeader{ - parent_hash: hex!("d5de3dd02c96dbdc8aaa4db70a1e9fdab5ded5f4d52f18798acd56a3d37d1ad6").into(), - block_number: 772, - state_root: hex!("49cba2a79b23ad74cefe80c3a96699825d1cda0f75bfceb587c5549211c86245").into(), - receipts_root: hex!("7b1f61b9714c080ef0be014e01657a15f45f0304b477beebc7ca5596c8033095").into(), - }, - message: Message { - event_log: Log { - address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), - topics: vec![ - hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), - hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), - hex!("5f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0").into(), - ], - data: hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e00a736aa00000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").into(), - }, - proof: Proof { - block_hash: hex!("392182a385b3a417e8ddea8b252953ee81e6ec0fb09d9056c96c89fbeb703a3f").into(), - tx_index: 0, - data: (vec![ - hex!("7b1f61b9714c080ef0be014e01657a15f45f0304b477beebc7ca5596c8033095").to_vec(), - ], vec![ - hex!("f9028e822080b9028802f90284018301d205b9010000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000080000000000000000000000000000004000000000080000000000000000000000000000000000010100000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000040004000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000200000000000010f90179f85894eda338e4dc46038493b885327842fd3e301cab39e1a0f78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7ea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7df9011c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a05f7060e971b0dc81e63f0aa41831091847d97c1a4693ac450cc128c7214e65e0b8a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002e00a736aa00000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00e40b54020000000000000000000000000000000000000000000000000000000000").to_vec(), - ]), - }, - }, - } -} - -fn make_send_token_message() -> InboundQueueFixture { - InboundQueueFixture { - execution_header: CompactExecutionHeader{ - parent_hash: hex!("920cecde45d428e3a77590b70f8533cf4c2c36917b8a7b74c915e7fa3dae7075").into(), - block_number: 1148, - state_root: hex!("bbc6ba0e9940d641afecbbaf3f97abd2b9ffaf2f6bd4879c4a71e659eca89978").into(), - receipts_root: hex!("9f3340b57eddc1f86de30776db57faeca80269a3dd459031741988dec240ce34").into(), - }, - message: Message { - event_log: Log { - address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), - topics: vec![ - hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), - hex!("c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539").into(), - hex!("c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26f").into(), - ], - data: hex!("00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f00a736aa00000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").into(), - }, - proof: Proof { - block_hash: hex!("d3c155f123c3cbff22f3d7869283e02179edea9ffa7a5e9a4d8414c2a6b8991f").into(), - tx_index: 0, - data: (vec![ - hex!("9f3340b57eddc1f86de30776db57faeca80269a3dd459031741988dec240ce34").to_vec(), - ], vec![ - hex!("f90451822080b9044b02f90447018301bcb9b9010000800000000000000000000020000000000000000000004000000000000000000400000000000000000000001000000010000000000000000000000008000000200000000000000001000008000000000000000000000000000000008000080000000000200000000000000000000000000100000000000000000011000000000000020200000000000000000000000000003000000040080008000000000000000000040044000021000000002000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000200800000000000f9033cf89b9487d1f7fdfee7f651fabc8bfcb6e086c278b77a7df863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000057a2d4ff0c3866d96556884bf09fecdd7ccd530ca00000000000000000000000000000000000000000000000000de0b6b3a7640000f9015d94eda338e4dc46038493b885327842fd3e301cab39f884a024c5d2de620c6e25186ae16f6919eba93b6e2c1a33857cc419d9f3a00d6967e9a000000000000000000000000090a987b944cb1dcce5564e5fdecd7a54d3de27fea000000000000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7da000000000000000000000000000000000000000000000000000000000000003e8b8c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000208eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48f9013c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0c173fac324158e77fb5840738a1a541f633cbec8884c6a601c567d2b376a0539a0c8eaf22f2cb07bac4679df0a660e7115ed87fcfd4e32ac269f6540265bbbd26fb8c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005f00a736aa00000000000187d1f7fdfee7f651fabc8bfcb6e086c278b77a7d008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48000064a7b3b6e00d000000000000000000e40b5402000000000000000000000000").to_vec(), - ]), - }, - }, - } -} diff --git a/relay/paseo/Cargo.toml b/relay/paseo/Cargo.toml index ed63cec..335d73a 100644 --- a/relay/paseo/Cargo.toml +++ b/relay/paseo/Cargo.toml @@ -2,7 +2,7 @@ name = "paseo-runtime" build = "build.rs" repository.workspace = true -version = "1.2.7" +version = "1.2.8" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/relay/paseo/src/impls.rs b/relay/paseo/src/impls.rs index ec9f762..4c916f6 100644 --- a/relay/paseo/src/impls.rs +++ b/relay/paseo/src/impls.rs @@ -23,9 +23,9 @@ use frame_support::{ traits::{tokens::ConversionFromAssetBalance, Contains}, }; use frame_system::RawOrigin; +use paseo_runtime_constants::system_parachain::PEOPLE_ID; use polkadot_primitives::Id as ParaId; use polkadot_runtime_common::identity_migrator::{OnReapIdentity, WeightInfo}; -use paseo_runtime_constants::system_parachain::PEOPLE_ID; use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::IsChildSystemParachain; use xcm_executor::traits::TransactAsset; diff --git a/relay/paseo/src/lib.rs b/relay/paseo/src/lib.rs index 916c247..6fe2672 100644 --- a/relay/paseo/src/lib.rs +++ b/relay/paseo/src/lib.rs @@ -26,8 +26,8 @@ use polkadot_runtime_common::{ impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, - paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, - SlowAdjustingFeeUpdate, + paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount, BlockLength, + CurrencyToVote, SlowAdjustingFeeUpdate, }; use runtime_parachains::{ @@ -155,7 +155,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("paseo"), impl_name: create_runtime_str!("paseo-testnet"), authoring_version: 0, - spec_version: 1_002_007, + spec_version: 1_002_008, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, @@ -1252,7 +1252,8 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | RuntimeCall::Utility(..) | + RuntimeCall::Session(..) | + RuntimeCall::Utility(..) | RuntimeCall::FastUnstake(..) | RuntimeCall::VoterList(..) | RuntimeCall::NominationPools(..) @@ -1776,7 +1777,7 @@ construct_runtime! { Mmr: pallet_mmr = 201, BeefyMmrLeaf: pallet_beefy_mmr = 202, - // Sudo. + // Sudo. ParaSudoWrapper: paras_sudo_wrapper = 250, Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, diff --git a/relay/paseo/src/xcm_config.rs b/relay/paseo/src/xcm_config.rs index aa14f36..6f08b53 100644 --- a/relay/paseo/src/xcm_config.rs +++ b/relay/paseo/src/xcm_config.rs @@ -27,13 +27,13 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; +use paseo_runtime_constants::{ + currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX, +}; use polkadot_runtime_common::{ xcm_sender::{ChildParachainRouter, ExponentialPrice}, ToAuthor, }; -use paseo_runtime_constants::{ - currency::CENTS, system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX, -}; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -294,10 +294,9 @@ impl pallet_xcm::Config for Runtime { // messages. type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; - // Anyone can execute XCM messages locally... + // Anyone can execute XCM messages locally. type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; - // ...but they must match our filter, which rejects all. - type XcmExecuteFilter = Nothing; // == Deny All + type XcmExecuteFilter = Everything; type XcmExecutor = xcm_executor::XcmExecutor; type XcmTeleportFilter = Everything; // == Allow All type XcmReserveTransferFilter = Everything; // == Allow All diff --git a/system-parachains/asset-hub-paseo/Cargo.toml b/system-parachains/asset-hub-paseo/Cargo.toml index bce2f55..4b341b2 100644 --- a/system-parachains/asset-hub-paseo/Cargo.toml +++ b/system-parachains/asset-hub-paseo/Cargo.toml @@ -17,8 +17,11 @@ scale-info = { features = ["derive"], workspace = true } # Local bp-asset-hub-paseo = { workspace = true } bp-bridge-hub-paseo = { workspace = true } +bp-bridge-hub-kusama = { workspace = true } +bp-bridge-hub-polkadot = { workspace = true } paseo-runtime-constants = { workspace = true } + # Substrate frame-benchmarking = { optional = true, workspace = true } frame-executive = { workspace = true } @@ -182,6 +185,8 @@ std = [ "assets-common/std", "bp-asset-hub-paseo/std", "bp-bridge-hub-paseo/std", + "bp-bridge-hub-kusama/std", + "bp-bridge-hub-polkadot/std", "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-parachain-system/std", diff --git a/system-parachains/asset-hub-paseo/primitives/Cargo.toml b/system-parachains/asset-hub-paseo/primitives/Cargo.toml index 8f9eeae..fd24539 100644 --- a/system-parachains/asset-hub-paseo/primitives/Cargo.toml +++ b/system-parachains/asset-hub-paseo/primitives/Cargo.toml @@ -8,9 +8,15 @@ edition.workspace = true license.workspace = true [dependencies] +codec = { features = ["derive", "max-encoded-len"], workspace = true } +scale-info = { features = ["derive"], workspace = true } + # Local system-parachains-constants = { workspace = true } +# Bridge Dependencies +bp-xcm-bridge-hub-router = { workspace = true } + # Substrate Based Dependencies frame-support = { workspace = true } sp-std = { workspace = true } @@ -21,8 +27,11 @@ xcm = { workspace = true } [features] default = ["std"] std = [ - "frame-support/std", - "system-parachains-constants/std", - "sp-std/std", - "xcm/std", + "bp-xcm-bridge-hub-router/std", + "codec/std", + "frame-support/std", + "scale-info/std", + "sp-std/std", + "system-parachains-constants/std", + "xcm/std", ] diff --git a/system-parachains/asset-hub-paseo/primitives/src/lib.rs b/system-parachains/asset-hub-paseo/primitives/src/lib.rs index 059b7bd..5d84413 100644 --- a/system-parachains/asset-hub-paseo/primitives/src/lib.rs +++ b/system-parachains/asset-hub-paseo/primitives/src/lib.rs @@ -18,10 +18,55 @@ #![cfg_attr(not(feature = "std"), no_std)] -use system_parachains_constants::paseo::currency::system_para_deposit; +use codec::{Decode, Encode}; +use scale_info::TypeInfo; +use xcm::prelude::*; + +pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; + +use system_parachains_constants::paseo::currency::*; + +/// `AssetHubPaseo` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `AssetHubPaseo` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `AssetHubPaseo` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + /// `ToKusamaXcmRouter` bridge pallet. + #[codec(index = 34)] + ToKusamaXcmRouter(XcmBridgeHubRouterCall), +} frame_support::parameter_types! { + /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. + pub const XcmBridgeHubRouterTransactCallMaxWeight: Weight = Weight::from_parts(200_000_000, 6144); + + /// Message that is sent to the sibling Kusama Asset Hub when the with-Paseo bridge becomes congested. + pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); + /// Message that is sent to the sibling Kusama Asset Hub when the with-Paseo bridge becomes uncongested. + pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); + /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190); } +fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { + sp_std::vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), + call: Call::ToKusamaXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested, + }) + .encode() + .into(), + } + ] +} diff --git a/system-parachains/asset-hub-paseo/src/lib.rs b/system-parachains/asset-hub-paseo/src/lib.rs index 1192556..2de154a 100644 --- a/system-parachains/asset-hub-paseo/src/lib.rs +++ b/system-parachains/asset-hub-paseo/src/lib.rs @@ -143,7 +143,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("asset-hub-paseo"), impl_name: create_runtime_str!("asset-hub-paseo"), authoring_version: 1, - spec_version: 1_002_006, + spec_version: 1_002_008, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 15, @@ -485,89 +485,89 @@ impl InstanceFilter for ProxyType { ), ProxyType::CancelProxy => matches!( c, - RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), ProxyType::Assets => { matches!( c, - RuntimeCall::Assets { .. } - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } - | RuntimeCall::Nfts { .. } - | RuntimeCall::Uniques { .. } + RuntimeCall::Assets { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } | + RuntimeCall::Nfts { .. } | + RuntimeCall::Uniques { .. } ) }, ProxyType::AssetOwner => matches!( c, - RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::create { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::start_destroy { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::destroy_accounts { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::destroy_approvals { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::finish_destroy { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::set_min_balance { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::create { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::destroy { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::redeposit { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::transfer_ownership { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_team { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_collection_max_supply { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_collection { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_team { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_attribute { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_attribute { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::clear_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::set_collection_max_supply { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), ProxyType::AssetManager => matches!( c, - RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::block { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. }) - | RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::force_mint { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. }) - | RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) - | RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::block { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::touch_other { .. }) | + RuntimeCall::Assets(TrustBackedAssetsCall::refund_other { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::force_mint { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::update_mint_settings { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::mint_pre_signed { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_attributes_pre_signed { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_item_transfer { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::unlock_item_transfer { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::lock_item_properties { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::clear_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::set_collection_metadata { .. }) | + RuntimeCall::Nfts(pallet_nfts::Call::clear_collection_metadata { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::thaw { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::freeze_collection { .. }) | + RuntimeCall::Uniques(pallet_uniques::Call::thaw_collection { .. }) | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), ProxyType::Collator => matches!( c, - RuntimeCall::CollatorSelection { .. } - | RuntimeCall::Utility { .. } - | RuntimeCall::Multisig { .. } + RuntimeCall::CollatorSelection { .. } | + RuntimeCall::Utility { .. } | + RuntimeCall::Multisig { .. } ), } } @@ -685,6 +685,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; + // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< @@ -827,6 +828,38 @@ impl pallet_nfts::Config for Runtime { type Helper = (); } +/// XCM router instance to BridgeHub with bridging capabilities for `Kusama` global +/// consensus with dynamic fees and back-pressure. +pub type ToKusamaXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance1; +impl pallet_xcm_bridge_hub_router::Config for Runtime { + type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo; + + type UniversalLocation = xcm_config::UniversalLocation; + type BridgedNetworkId = xcm_config::bridging::to_kusama::KusamaNetwork; + type Bridges = xcm_config::bridging::NetworkExportTable; + type DestinationVersion = PolkadotXcm; + + #[cfg(not(feature = "runtime-benchmarks"))] + type BridgeHubOrigin = EnsureXcm>; + #[cfg(feature = "runtime-benchmarks")] + type BridgeHubOrigin = frame_support::traits::EitherOfDiverse< + // for running benchmarks + EnsureRoot, + // for running tests with `--feature runtime-benchmarks` + EnsureXcm>, + >; + + type ToBridgeHubSender = XcmpQueue; + type WithBridgeHubChannel = + cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider< + xcm_config::bridging::SiblingBridgeHubParaId, + Runtime, + >; + + type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; + type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; +} + pub type PoolAssetsInstance = pallet_assets::Instance3; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -943,6 +976,7 @@ construct_runtime!( PolkadotXcm: pallet_xcm = 31, CumulusXcm: cumulus_pallet_xcm = 32, // DmpQueue: cumulus_pallet_dmp_queue = 33, removed + ToKusamaXcmRouter: pallet_xcm_bridge_hub_router:: = 34, MessageQueue: pallet_message_queue = 35, // Handy utilities. @@ -1031,6 +1065,8 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM [pallet_xcm, PalletXcmExtrinsiscsBenchmark::] + // Bridges + [pallet_xcm_bridge_hub_router, ToKusama] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -1323,7 +1359,7 @@ impl_runtime_apis! { type Foreign = pallet_assets::Pallet::; type Pool = pallet_assets::Pallet::; - type ToKusama = XcmBridgeHubRouterBench; + type ToKusama = XcmBridgeHubRouterBench; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -1513,7 +1549,12 @@ impl_runtime_apis! { )); pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; // AssetHubPolkadot trusts AssetHubKusama as reserve for KSMs - pub TrustedReserve: Option<(Location, Asset)> = None; + pub TrustedReserve: Option<(Location, Asset)> = Some( + ( + xcm_config::bridging::to_kusama::AssetHubKusama::get(), + Asset::from((xcm_config::bridging::to_kusama::KsmLocation::get(), 1000000000000 as u128)) + ) + ); } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -1589,6 +1630,36 @@ impl_runtime_apis! { Config as XcmBridgeHubRouterConfig, }; + impl XcmBridgeHubRouterConfig for Runtime { + fn make_congested() { + cumulus_pallet_xcmp_queue::bridging::suspend_channel_for_benchmarks::( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + } + + fn ensure_bridged_target_destination() -> Result { + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests( + xcm_config::bridging::SiblingBridgeHubParaId::get().into() + ); + let bridged_asset_hub = xcm_config::bridging::to_kusama::AssetHubKusama::get(); + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(bridged_asset_hub.clone()), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + bridged_asset_hub, + XCM_VERSION, + e + ); + BenchmarkError::Stop("XcmVersion was not stored!") + })?; + Ok(bridged_asset_hub) + } + } + type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; @@ -1596,6 +1667,8 @@ impl_runtime_apis! { type Foreign = pallet_assets::Pallet::; type Pool = pallet_assets::Pallet::; + type ToKusama = XcmBridgeHubRouterBench; + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), diff --git a/system-parachains/asset-hub-paseo/src/weights/block_weights.rs b/system-parachains/asset-hub-paseo/src/weights/block_weights.rs index c2824b5..e7fdb2a 100644 --- a/system-parachains/asset-hub-paseo/src/weights/block_weights.rs +++ b/system-parachains/asset-hub-paseo/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(10_000_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs index f6fab7f..89adfe2 100644 --- a/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs @@ -13,27 +13,26 @@ // 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 `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_parachain_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -60,13 +59,13 @@ impl cumulus_pallet_parachain_system::WeightInfo for We /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84` + // Measured: `12` // Estimated: `3517` - // Minimum execution time: 2_453_000 picoseconds. - Weight::from_parts(2_553_000, 0) + // Minimum execution time: 1_633_000 picoseconds. + Weight::from_parts(1_694_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 349_908 - .saturating_add(Weight::from_parts(207_948_706, 0).saturating_mul(n.into())) + // Standard Error: 39_295 + .saturating_add(Weight::from_parts(195_057_429, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs index 099c6c2..03cb7ff 100644 --- a/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/asset-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs @@ -13,27 +13,26 @@ // 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 `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_675_000 picoseconds. - Weight::from_parts(3_947_000, 0) + // Minimum execution time: 4_667_000 picoseconds. + Weight::from_parts(4_869_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,10 +70,10 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: - // Measured: `118` + // Measured: `82` // Estimated: `3517` - // Minimum execution time: 9_726_000 picoseconds. - Weight::from_parts(10_236_000, 0) + // Minimum execution time: 10_920_000 picoseconds. + Weight::from_parts(11_192_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -85,8 +84,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 2_604_000 picoseconds. - Weight::from_parts(2_794_000, 0) + // Minimum execution time: 3_175_000 picoseconds. + Weight::from_parts(3_367_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -97,8 +96,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `111` // Estimated: `1596` - // Minimum execution time: 3_576_000 picoseconds. - Weight::from_parts(3_796_000, 0) + // Minimum execution time: 4_046_000 picoseconds. + Weight::from_parts(4_365_000, 0) .saturating_add(Weight::from_parts(0, 1596)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,8 +106,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_469_000 picoseconds. - Weight::from_parts(5_578_000, 0) + // Minimum execution time: 6_046_000 picoseconds. + Weight::from_parts(6_273_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -127,11 +126,11 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65747` - // Estimated: `69212` - // Minimum execution time: 103_916_000 picoseconds. - Weight::from_parts(107_673_000, 0) - .saturating_add(Weight::from_parts(0, 69212)) + // Measured: `65711` + // Estimated: `69176` + // Minimum execution time: 112_973_000 picoseconds. + Weight::from_parts(114_995_000, 0) + .saturating_add(Weight::from_parts(0, 69176)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -143,8 +142,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65710` // Estimated: `69175` - // Minimum execution time: 50_415_000 picoseconds. - Weight::from_parts(52_088_000, 0) + // Minimum execution time: 49_829_000 picoseconds. + Weight::from_parts(51_599_000, 0) .saturating_add(Weight::from_parts(0, 69175)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hub-paseo/src/weights/extrinsic_weights.rs b/system-parachains/asset-hub-paseo/src/weights/extrinsic_weights.rs index 10c7bbf..1a4adb9 100644 --- a/system-parachains/asset-hub-paseo/src/weights/extrinsic_weights.rs +++ b/system-parachains/asset-hub-paseo/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(250_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/system-parachains/asset-hub-paseo/src/weights/frame_system.rs b/system-parachains/asset-hub-paseo/src/weights/frame_system.rs index a123053..0615779 100644 --- a/system-parachains/asset-hub-paseo/src/weights/frame_system.rs +++ b/system-parachains/asset-hub-paseo/src/weights/frame_system.rs @@ -13,27 +13,26 @@ // 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 `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=frame_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,22 +51,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_212_000 picoseconds. - Weight::from_parts(44_195_073, 0) + // Minimum execution time: 1_547_000 picoseconds. + Weight::from_parts(737_907, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(274, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_359_000 picoseconds. - Weight::from_parts(121_418_736, 0) + // Minimum execution time: 4_705_000 picoseconds. + Weight::from_parts(64_855_385, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_520, 0).saturating_mul(b.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_632, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -77,8 +76,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 2_143_000 picoseconds. - Weight::from_parts(3_195_000, 0) + // Minimum execution time: 2_934_000 picoseconds. + Weight::from_parts(3_157_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,11 +96,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `164` - // Estimated: `1649` - // Minimum execution time: 78_647_864_000 picoseconds. - Weight::from_parts(83_016_370_000, 0) - .saturating_add(Weight::from_parts(0, 1649)) + // Measured: `127` + // Estimated: `1612` + // Minimum execution time: 94_596_353_000 picoseconds. + Weight::from_parts(98_551_357_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -112,11 +111,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_232_000 picoseconds. - Weight::from_parts(1_282_000, 0) + // Minimum execution time: 1_616_000 picoseconds. + Weight::from_parts(1_721_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_519 - .saturating_add(Weight::from_parts(741_851, 0).saturating_mul(i.into())) + // Standard Error: 1_834 + .saturating_add(Weight::from_parts(726_484, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -126,11 +125,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_252_000 picoseconds. - Weight::from_parts(1_352_000, 0) + // Minimum execution time: 1_580_000 picoseconds. + Weight::from_parts(1_666_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_981 - .saturating_add(Weight::from_parts(555_408, 0).saturating_mul(i.into())) + // Standard Error: 883 + .saturating_add(Weight::from_parts(546_438, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,13 +137,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84 + p * (69 ±0)` - // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 2_654_000 picoseconds. - Weight::from_parts(4_180_974, 0) - .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 9_488 - .saturating_add(Weight::from_parts(1_069_154, 0).saturating_mul(p.into())) + // Measured: `80 + p * (69 ±0)` + // Estimated: `80 + p * (70 ±0)` + // Minimum execution time: 3_243_000 picoseconds. + Weight::from_parts(3_430_000, 0) + .saturating_add(Weight::from_parts(0, 80)) + // Standard Error: 1_513 + .saturating_add(Weight::from_parts(1_137_698, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -155,8 +154,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_214_000 picoseconds. - Weight::from_parts(10_786_000, 0) + // Minimum execution time: 8_295_000 picoseconds. + Weight::from_parts(9_008_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,11 +175,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn apply_authorized_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `186` - // Estimated: `1671` - // Minimum execution time: 88_156_678_000 picoseconds. - Weight::from_parts(96_636_141_000, 0) - .saturating_add(Weight::from_parts(0, 1671)) + // Measured: `149` + // Estimated: `1634` + // Minimum execution time: 99_450_713_000 picoseconds. + Weight::from_parts(102_008_052_000, 0) + .saturating_add(Weight::from_parts(0, 1634)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/system-parachains/asset-hub-paseo/src/weights/mod.rs b/system-parachains/asset-hub-paseo/src/weights/mod.rs index 9a85b40..11e535b 100644 --- a/system-parachains/asset-hub-paseo/src/weights/mod.rs +++ b/system-parachains/asset-hub-paseo/src/weights/mod.rs @@ -19,9 +19,9 @@ pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; +pub mod pallet_asset_conversion; pub mod pallet_assets_foreign; pub mod pallet_assets_local; -pub mod pallet_asset_conversion; pub mod pallet_assets_pool; pub mod pallet_balances; pub mod pallet_collator_selection; @@ -35,6 +35,7 @@ pub mod pallet_uniques; pub mod pallet_utility; pub mod pallet_vesting; pub mod pallet_xcm; +pub mod pallet_xcm_bridge_hub_router; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_asset_conversion.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_asset_conversion.rs index d9d34ef..0efa2b8 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_asset_conversion.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_asset_conversion.rs @@ -13,27 +13,26 @@ // 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 `pallet_asset_conversion` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_asset_conversion // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -63,8 +62,8 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `365` // Estimated: `4689` - // Minimum execution time: 63_076_000 picoseconds. - Weight::from_parts(66_379_000, 0) + // Minimum execution time: 75_771_000 picoseconds. + Weight::from_parts(77_476_000, 0) .saturating_add(Weight::from_parts(0, 4689)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -85,8 +84,8 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `975` // Estimated: `7404` - // Minimum execution time: 113_972_000 picoseconds. - Weight::from_parts(116_767_000, 0) + // Minimum execution time: 135_346_000 picoseconds. + Weight::from_parts(137_193_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -107,8 +106,8 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1130` // Estimated: `7404` - // Minimum execution time: 107_181_000 picoseconds. - Weight::from_parts(109_706_000, 0) + // Minimum execution time: 127_356_000 picoseconds. + Weight::from_parts(129_345_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(6)) @@ -124,11 +123,11 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0 + n * (578 ±0)` // Estimated: `7404 + n * (94 ±7)` - // Minimum execution time: 70_617_000 picoseconds. - Weight::from_parts(72_939_000, 0) + // Minimum execution time: 84_932_000 picoseconds. + Weight::from_parts(86_728_000, 0) .saturating_add(Weight::from_parts(0, 7404)) - // Standard Error: 208_807 - .saturating_add(Weight::from_parts(3_612_151, 0).saturating_mul(n.into())) + // Standard Error: 172_244 + .saturating_add(Weight::from_parts(1_231_312, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 94).saturating_mul(n.into())) @@ -144,11 +143,11 @@ impl pallet_asset_conversion::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0 + n * (578 ±0)` // Estimated: `7404 + n * (94 ±7)` - // Minimum execution time: 71_378_000 picoseconds. - Weight::from_parts(74_953_000, 0) + // Minimum execution time: 85_253_000 picoseconds. + Weight::from_parts(86_737_000, 0) .saturating_add(Weight::from_parts(0, 7404)) - // Standard Error: 356_386 - .saturating_add(Weight::from_parts(6_159_700, 0).saturating_mul(n.into())) + // Standard Error: 174_940 + .saturating_add(Weight::from_parts(1_207_793, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 94).saturating_mul(n.into())) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_foreign.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_foreign.rs index 2830742..36476c6 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_foreign.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_foreign.rs @@ -13,27 +13,26 @@ // 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 `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_assets // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -57,8 +56,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `144` // Estimated: `4273` - // Minimum execution time: 20_410_000 picoseconds. - Weight::from_parts(29_735_000, 0) + // Minimum execution time: 26_333_000 picoseconds. + Weight::from_parts(27_053_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,8 +68,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `4273` - // Minimum execution time: 7_211_000 picoseconds. - Weight::from_parts(7_802_000, 0) + // Minimum execution time: 9_447_000 picoseconds. + Weight::from_parts(9_799_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,8 +80,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 8_412_000 picoseconds. - Weight::from_parts(9_314_000, 0) + // Minimum execution time: 10_686_000 picoseconds. + Weight::from_parts(11_250_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -100,11 +99,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `84 + c * (208 ±0)` // Estimated: `4273 + c * (3207 ±0)` - // Minimum execution time: 11_937_000 picoseconds. - Weight::from_parts(12_248_000, 0) + // Minimum execution time: 15_211_000 picoseconds. + Weight::from_parts(15_404_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 16_499 - .saturating_add(Weight::from_parts(11_815_721, 0).saturating_mul(c.into())) + // Standard Error: 7_220 + .saturating_add(Weight::from_parts(13_183_375, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -122,11 +121,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `413 + a * (86 ±0)` // Estimated: `4273 + a * (3221 ±0)` - // Minimum execution time: 11_718_000 picoseconds. - Weight::from_parts(12_088_000, 0) + // Minimum execution time: 15_063_000 picoseconds. + Weight::from_parts(15_371_000, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 17_729 - .saturating_add(Weight::from_parts(13_158_719, 0).saturating_mul(a.into())) + // Standard Error: 4_345 + .saturating_add(Weight::from_parts(13_785_267, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -141,8 +140,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 10_007_000 picoseconds. - Weight::from_parts(10_596_000, 0) + // Minimum execution time: 12_715_000 picoseconds. + Weight::from_parts(13_175_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -155,8 +154,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 16_895_000 picoseconds. - Weight::from_parts(17_786_000, 0) + // Minimum execution time: 21_073_000 picoseconds. + Weight::from_parts(21_770_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -169,8 +168,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 22_874_000 picoseconds. - Weight::from_parts(30_496_000, 0) + // Minimum execution time: 27_665_000 picoseconds. + Weight::from_parts(28_445_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -185,8 +184,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `389` // Estimated: `7404` - // Minimum execution time: 32_489_000 picoseconds. - Weight::from_parts(33_991_000, 0) + // Minimum execution time: 38_879_000 picoseconds. + Weight::from_parts(39_931_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -201,8 +200,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `389` // Estimated: `7404` - // Minimum execution time: 29_274_000 picoseconds. - Weight::from_parts(32_388_000, 0) + // Minimum execution time: 34_924_000 picoseconds. + Weight::from_parts(36_060_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -217,8 +216,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `389` // Estimated: `7404` - // Minimum execution time: 32_178_000 picoseconds. - Weight::from_parts(34_272_000, 0) + // Minimum execution time: 38_972_000 picoseconds. + Weight::from_parts(40_110_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -231,8 +230,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 11_106_000 picoseconds. - Weight::from_parts(11_798_000, 0) + // Minimum execution time: 14_090_000 picoseconds. + Weight::from_parts(14_649_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -245,8 +244,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 10_957_000 picoseconds. - Weight::from_parts(11_568_000, 0) + // Minimum execution time: 14_394_000 picoseconds. + Weight::from_parts(15_121_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -257,8 +256,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 8_012_000 picoseconds. - Weight::from_parts(8_643_000, 0) + // Minimum execution time: 10_483_000 picoseconds. + Weight::from_parts(10_812_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -269,8 +268,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 8_122_000 picoseconds. - Weight::from_parts(8_593_000, 0) + // Minimum execution time: 10_518_000 picoseconds. + Weight::from_parts(10_963_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -283,8 +282,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 10_086_000 picoseconds. - Weight::from_parts(12_238_000, 0) + // Minimum execution time: 12_995_000 picoseconds. + Weight::from_parts(13_390_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -295,8 +294,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 8_793_000 picoseconds. - Weight::from_parts(9_604_000, 0) + // Minimum execution time: 11_539_000 picoseconds. + Weight::from_parts(12_028_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -315,13 +314,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 18_758_000 picoseconds. - Weight::from_parts(19_046_350, 0) + // Minimum execution time: 23_085_000 picoseconds. + Weight::from_parts(24_131_087, 0) .saturating_add(Weight::from_parts(0, 4273)) - // Standard Error: 3_278 - .saturating_add(Weight::from_parts(34_884, 0).saturating_mul(n.into())) - // Standard Error: 3_278 - .saturating_add(Weight::from_parts(14_844, 0).saturating_mul(s.into())) + // Standard Error: 314 + .saturating_add(Weight::from_parts(120, 0).saturating_mul(n.into())) + // Standard Error: 314 + .saturating_add(Weight::from_parts(1_613, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -333,8 +332,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 19_980_000 picoseconds. - Weight::from_parts(25_458_000, 0) + // Minimum execution time: 24_640_000 picoseconds. + Weight::from_parts(25_384_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -349,13 +348,17 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `81` // Estimated: `4273` - // Minimum execution time: 8_783_000 picoseconds. - Weight::from_parts(12_340_703, 0) + // Minimum execution time: 11_209_000 picoseconds. + Weight::from_parts(12_061_058, 0) .saturating_add(Weight::from_parts(0, 4273)) + // Standard Error: 218 + .saturating_add(Weight::from_parts(375, 0).saturating_mul(n.into())) + // Standard Error: 218 + .saturating_add(Weight::from_parts(856, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -367,8 +370,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `406` // Estimated: `4273` - // Minimum execution time: 19_360_000 picoseconds. - Weight::from_parts(20_140_000, 0) + // Minimum execution time: 23_513_000 picoseconds. + Weight::from_parts(24_349_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -379,8 +382,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 8_112_000 picoseconds. - Weight::from_parts(8_563_000, 0) + // Minimum execution time: 10_396_000 picoseconds. + Weight::from_parts(10_894_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -393,8 +396,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `276` // Estimated: `4273` - // Minimum execution time: 21_613_000 picoseconds. - Weight::from_parts(22_664_000, 0) + // Minimum execution time: 26_610_000 picoseconds. + Weight::from_parts(27_494_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -411,8 +414,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `7404` - // Minimum execution time: 48_903_000 picoseconds. - Weight::from_parts(51_347_000, 0) + // Minimum execution time: 56_907_000 picoseconds. + Weight::from_parts(58_366_000, 0) .saturating_add(Weight::from_parts(0, 7404)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -425,8 +428,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 23_675_000 picoseconds. - Weight::from_parts(25_018_000, 0) + // Minimum execution time: 29_118_000 picoseconds. + Weight::from_parts(30_183_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -439,8 +442,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `446` // Estimated: `4273` - // Minimum execution time: 23_817_000 picoseconds. - Weight::from_parts(26_319_000, 0) + // Minimum execution time: 29_640_000 picoseconds. + Weight::from_parts(30_603_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -451,8 +454,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 9_304_000 picoseconds. - Weight::from_parts(9_966_000, 0) + // Minimum execution time: 11_633_000 picoseconds. + Weight::from_parts(12_045_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -467,8 +470,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345` // Estimated: `4273` - // Minimum execution time: 23_145_000 picoseconds. - Weight::from_parts(24_717_000, 0) + // Minimum execution time: 29_078_000 picoseconds. + Weight::from_parts(29_984_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -481,8 +484,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `4273` - // Minimum execution time: 21_673_000 picoseconds. - Weight::from_parts(24_248_000, 0) + // Minimum execution time: 26_343_000 picoseconds. + Weight::from_parts(27_195_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -497,8 +500,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `471` // Estimated: `4273` - // Minimum execution time: 23_196_000 picoseconds. - Weight::from_parts(27_431_000, 0) + // Minimum execution time: 28_093_000 picoseconds. + Weight::from_parts(28_951_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -511,8 +514,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `4273` - // Minimum execution time: 21_082_000 picoseconds. - Weight::from_parts(22_905_000, 0) + // Minimum execution time: 25_481_000 picoseconds. + Weight::from_parts(26_516_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -525,8 +528,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `350` // Estimated: `4273` - // Minimum execution time: 10_916_000 picoseconds. - Weight::from_parts(16_295_000, 0) + // Minimum execution time: 14_447_000 picoseconds. + Weight::from_parts(15_011_000, 0) .saturating_add(Weight::from_parts(0, 4273)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_local.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_local.rs index 0e42b6f..6ccdd83 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_local.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_local.rs @@ -13,27 +13,26 @@ // 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 `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_assets // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -55,8 +54,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `146` // Estimated: `3675` - // Minimum execution time: 17_576_000 picoseconds. - Weight::from_parts(21_492_000, 0) + // Minimum execution time: 22_356_000 picoseconds. + Weight::from_parts(23_247_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +66,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `6` // Estimated: `3675` - // Minimum execution time: 5_861_000 picoseconds. - Weight::from_parts(6_379_000, 0) + // Minimum execution time: 7_665_000 picoseconds. + Weight::from_parts(8_277_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -79,8 +78,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_483_000, 0) + // Minimum execution time: 9_285_000 picoseconds. + Weight::from_parts(9_669_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -98,11 +97,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `85 + c * (208 ±0)` // Estimated: `3675 + c * (2609 ±0)` - // Minimum execution time: 9_995_000 picoseconds. - Weight::from_parts(10_616_000, 0) + // Minimum execution time: 13_127_000 picoseconds. + Weight::from_parts(13_443_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 17_749 - .saturating_add(Weight::from_parts(11_746_295, 0).saturating_mul(c.into())) + // Standard Error: 7_173 + .saturating_add(Weight::from_parts(13_055_243, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -120,11 +119,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `414 + a * (86 ±0)` // Estimated: `3675 + a * (2623 ±0)` - // Minimum execution time: 9_684_000 picoseconds. - Weight::from_parts(10_075_000, 0) + // Minimum execution time: 13_260_000 picoseconds. + Weight::from_parts(13_471_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 14_729 - .saturating_add(Weight::from_parts(12_717_185, 0).saturating_mul(a.into())) + // Standard Error: 3_866 + .saturating_add(Weight::from_parts(13_625_219, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -139,8 +138,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 8_444_000 picoseconds. - Weight::from_parts(9_013_000, 0) + // Minimum execution time: 10_630_000 picoseconds. + Weight::from_parts(11_338_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -153,8 +152,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 15_493_000 picoseconds. - Weight::from_parts(16_374_000, 0) + // Minimum execution time: 19_553_000 picoseconds. + Weight::from_parts(20_083_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -167,8 +166,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 20_341_000 picoseconds. - Weight::from_parts(21_862_000, 0) + // Minimum execution time: 25_595_000 picoseconds. + Weight::from_parts(26_335_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -183,8 +182,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `6208` - // Minimum execution time: 29_214_000 picoseconds. - Weight::from_parts(30_385_000, 0) + // Minimum execution time: 36_443_000 picoseconds. + Weight::from_parts(37_762_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -199,8 +198,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `6208` - // Minimum execution time: 26_359_000 picoseconds. - Weight::from_parts(28_212_000, 0) + // Minimum execution time: 32_305_000 picoseconds. + Weight::from_parts(33_252_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -215,8 +214,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `390` // Estimated: `6208` - // Minimum execution time: 29_434_000 picoseconds. - Weight::from_parts(31_187_000, 0) + // Minimum execution time: 36_162_000 picoseconds. + Weight::from_parts(36_953_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -229,8 +228,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 9_705_000 picoseconds. - Weight::from_parts(10_325_000, 0) + // Minimum execution time: 12_898_000 picoseconds. + Weight::from_parts(13_390_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -243,8 +242,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 9_785_000 picoseconds. - Weight::from_parts(10_326_000, 0) + // Minimum execution time: 12_736_000 picoseconds. + Weight::from_parts(13_458_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -255,8 +254,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 6_850_000 picoseconds. - Weight::from_parts(7_301_000, 0) + // Minimum execution time: 9_034_000 picoseconds. + Weight::from_parts(9_475_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -267,8 +266,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 6_670_000 picoseconds. - Weight::from_parts(7_351_000, 0) + // Minimum execution time: 8_951_000 picoseconds. + Weight::from_parts(9_335_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,8 +280,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 8_483_000 picoseconds. - Weight::from_parts(9_495_000, 0) + // Minimum execution time: 11_342_000 picoseconds. + Weight::from_parts(11_716_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -293,8 +292,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 7_652_000 picoseconds. - Weight::from_parts(8_473_000, 0) + // Minimum execution time: 9_950_000 picoseconds. + Weight::from_parts(10_375_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -313,13 +312,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 17_146_000 picoseconds. - Weight::from_parts(18_156_090, 0) + // Minimum execution time: 21_545_000 picoseconds. + Weight::from_parts(22_769_148, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 3_151 - .saturating_add(Weight::from_parts(24_886, 0).saturating_mul(n.into())) - // Standard Error: 3_151 - .saturating_add(Weight::from_parts(6_140, 0).saturating_mul(s.into())) + // Standard Error: 365 + .saturating_add(Weight::from_parts(1_576, 0).saturating_mul(n.into())) + // Standard Error: 365 + .saturating_add(Weight::from_parts(681, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -331,8 +330,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 18_017_000 picoseconds. - Weight::from_parts(20_451_000, 0) + // Minimum execution time: 22_304_000 picoseconds. + Weight::from_parts(23_067_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -347,13 +346,17 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `82` // Estimated: `3675` - // Minimum execution time: 7_982_000 picoseconds. - Weight::from_parts(12_534_685, 0) + // Minimum execution time: 10_404_000 picoseconds. + Weight::from_parts(11_082_792, 0) .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 200 + .saturating_add(Weight::from_parts(803, 0).saturating_mul(n.into())) + // Standard Error: 200 + .saturating_add(Weight::from_parts(1_223, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -365,8 +368,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `407` // Estimated: `3675` - // Minimum execution time: 17_987_000 picoseconds. - Weight::from_parts(19_279_000, 0) + // Minimum execution time: 22_095_000 picoseconds. + Weight::from_parts(22_899_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -377,8 +380,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 7_201_000 picoseconds. - Weight::from_parts(8_071_000, 0) + // Minimum execution time: 9_477_000 picoseconds. + Weight::from_parts(9_866_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -391,8 +394,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3675` - // Minimum execution time: 20_471_000 picoseconds. - Weight::from_parts(21_373_000, 0) + // Minimum execution time: 24_960_000 picoseconds. + Weight::from_parts(25_890_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -409,8 +412,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `560` // Estimated: `6208` - // Minimum execution time: 44_827_000 picoseconds. - Weight::from_parts(46_641_000, 0) + // Minimum execution time: 54_045_000 picoseconds. + Weight::from_parts(55_088_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -423,8 +426,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 22_253_000 picoseconds. - Weight::from_parts(23_416_000, 0) + // Minimum execution time: 27_024_000 picoseconds. + Weight::from_parts(28_164_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -437,8 +440,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447` // Estimated: `3675` - // Minimum execution time: 22_283_000 picoseconds. - Weight::from_parts(23_806_000, 0) + // Minimum execution time: 27_704_000 picoseconds. + Weight::from_parts(28_333_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -449,8 +452,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 8_062_000 picoseconds. - Weight::from_parts(8_703_000, 0) + // Minimum execution time: 10_375_000 picoseconds. + Weight::from_parts(10_885_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -465,8 +468,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3675` - // Minimum execution time: 21_793_000 picoseconds. - Weight::from_parts(23_466_000, 0) + // Minimum execution time: 26_960_000 picoseconds. + Weight::from_parts(28_038_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -479,8 +482,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243` // Estimated: `3675` - // Minimum execution time: 19_959_000 picoseconds. - Weight::from_parts(23_946_000, 0) + // Minimum execution time: 24_579_000 picoseconds. + Weight::from_parts(25_234_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -495,8 +498,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `472` // Estimated: `3675` - // Minimum execution time: 21_984_000 picoseconds. - Weight::from_parts(24_917_000, 0) + // Minimum execution time: 26_764_000 picoseconds. + Weight::from_parts(27_690_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -509,8 +512,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `402` // Estimated: `3675` - // Minimum execution time: 19_979_000 picoseconds. - Weight::from_parts(27_462_000, 0) + // Minimum execution time: 23_938_000 picoseconds. + Weight::from_parts(25_110_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -523,8 +526,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `351` // Estimated: `3675` - // Minimum execution time: 9_744_000 picoseconds. - Weight::from_parts(13_971_000, 0) + // Minimum execution time: 12_544_000 picoseconds. + Weight::from_parts(13_219_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_pool.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_pool.rs index 2bf3a84..d672e90 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_assets_pool.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_assets_pool.rs @@ -13,27 +13,26 @@ // 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 `pallet_assets` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_assets // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -61,8 +60,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3675` - // Minimum execution time: 7_041_000 picoseconds. - Weight::from_parts(7_742_000, 0) + // Minimum execution time: 9_103_000 picoseconds. + Weight::from_parts(9_673_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -73,8 +72,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 7_581_000 picoseconds. - Weight::from_parts(8_583_000, 0) + // Minimum execution time: 9_683_000 picoseconds. + Weight::from_parts(10_258_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -92,11 +91,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `122 + c * (208 ±0)` // Estimated: `3675 + c * (2609 ±0)` - // Minimum execution time: 10_757_000 picoseconds. - Weight::from_parts(11_036_000, 0) + // Minimum execution time: 13_986_000 picoseconds. + Weight::from_parts(14_271_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 17_734 - .saturating_add(Weight::from_parts(11_698_369, 0).saturating_mul(c.into())) + // Standard Error: 7_173 + .saturating_add(Weight::from_parts(13_049_924, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -114,11 +113,11 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `451 + a * (86 ±0)` // Estimated: `3675 + a * (2623 ±0)` - // Minimum execution time: 10_526_000 picoseconds. - Weight::from_parts(10_817_000, 0) + // Minimum execution time: 13_773_000 picoseconds. + Weight::from_parts(14_104_000, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 14_562 - .saturating_add(Weight::from_parts(12_751_732, 0).saturating_mul(a.into())) + // Standard Error: 3_958 + .saturating_add(Weight::from_parts(13_616_108, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -133,8 +132,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 8_722_000 picoseconds. - Weight::from_parts(9_244_000, 0) + // Minimum execution time: 11_331_000 picoseconds. + Weight::from_parts(11_776_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -147,8 +146,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 15_553_000 picoseconds. - Weight::from_parts(16_875_000, 0) + // Minimum execution time: 19_816_000 picoseconds. + Weight::from_parts(20_473_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -161,8 +160,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 21_091_000 picoseconds. - Weight::from_parts(24_567_000, 0) + // Minimum execution time: 25_619_000 picoseconds. + Weight::from_parts(26_296_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -177,8 +176,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `427` // Estimated: `6208` - // Minimum execution time: 30_096_000 picoseconds. - Weight::from_parts(31_388_000, 0) + // Minimum execution time: 36_684_000 picoseconds. + Weight::from_parts(37_375_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -193,8 +192,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `427` // Estimated: `6208` - // Minimum execution time: 26_269_000 picoseconds. - Weight::from_parts(27_992_000, 0) + // Minimum execution time: 32_776_000 picoseconds. + Weight::from_parts(33_662_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -209,8 +208,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `427` // Estimated: `6208` - // Minimum execution time: 29_935_000 picoseconds. - Weight::from_parts(32_829_000, 0) + // Minimum execution time: 36_626_000 picoseconds. + Weight::from_parts(37_485_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -223,8 +222,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 10_225_000 picoseconds. - Weight::from_parts(10_916_000, 0) + // Minimum execution time: 13_388_000 picoseconds. + Weight::from_parts(13_813_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -237,8 +236,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 10_367_000 picoseconds. - Weight::from_parts(10_826_000, 0) + // Minimum execution time: 13_283_000 picoseconds. + Weight::from_parts(13_747_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -249,8 +248,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 7_351_000 picoseconds. - Weight::from_parts(8_052_000, 0) + // Minimum execution time: 9_469_000 picoseconds. + Weight::from_parts(9_978_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -261,8 +260,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 7_381_000 picoseconds. - Weight::from_parts(7_982_000, 0) + // Minimum execution time: 9_378_000 picoseconds. + Weight::from_parts(9_886_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -275,8 +274,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 9_204_000 picoseconds. - Weight::from_parts(13_840_000, 0) + // Minimum execution time: 11_950_000 picoseconds. + Weight::from_parts(12_403_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -287,8 +286,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 8_142_000 picoseconds. - Weight::from_parts(9_474_000, 0) + // Minimum execution time: 10_571_000 picoseconds. + Weight::from_parts(11_100_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -307,13 +306,13 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 8_774_000 picoseconds. - Weight::from_parts(9_252_475, 0) + // Minimum execution time: 11_544_000 picoseconds. + Weight::from_parts(12_361_071, 0) .saturating_add(Weight::from_parts(0, 3675)) - // Standard Error: 1_304 - .saturating_add(Weight::from_parts(14_636, 0).saturating_mul(n.into())) - // Standard Error: 1_304 - .saturating_add(Weight::from_parts(4_982, 0).saturating_mul(s.into())) + // Standard Error: 221 + .saturating_add(Weight::from_parts(1_643, 0).saturating_mul(n.into())) + // Standard Error: 221 + .saturating_add(Weight::from_parts(1_144, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -325,8 +324,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `444` // Estimated: `3675` - // Minimum execution time: 9_594_000 picoseconds. - Weight::from_parts(10_666_000, 0) + // Minimum execution time: 12_246_000 picoseconds. + Weight::from_parts(12_849_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -341,13 +340,17 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 50]`. /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { + fn force_set_metadata(n: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `119` // Estimated: `3675` - // Minimum execution time: 8_422_000 picoseconds. - Weight::from_parts(11_410_138, 0) + // Minimum execution time: 10_729_000 picoseconds. + Weight::from_parts(11_366_424, 0) .saturating_add(Weight::from_parts(0, 3675)) + // Standard Error: 191 + .saturating_add(Weight::from_parts(1_328, 0).saturating_mul(n.into())) + // Standard Error: 191 + .saturating_add(Weight::from_parts(1_232, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -359,8 +362,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `444` // Estimated: `3675` - // Minimum execution time: 9_405_000 picoseconds. - Weight::from_parts(10_355_000, 0) + // Minimum execution time: 12_103_000 picoseconds. + Weight::from_parts(12_616_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -371,8 +374,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 7_661_000 picoseconds. - Weight::from_parts(8_201_000, 0) + // Minimum execution time: 9_924_000 picoseconds. + Weight::from_parts(10_441_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -385,8 +388,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314` // Estimated: `3675` - // Minimum execution time: 20_912_000 picoseconds. - Weight::from_parts(22_613_000, 0) + // Minimum execution time: 25_453_000 picoseconds. + Weight::from_parts(26_285_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -403,8 +406,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `597` // Estimated: `6208` - // Minimum execution time: 45_319_000 picoseconds. - Weight::from_parts(47_912_000, 0) + // Minimum execution time: 54_168_000 picoseconds. + Weight::from_parts(55_330_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -417,8 +420,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `3675` - // Minimum execution time: 22_874_000 picoseconds. - Weight::from_parts(23_645_000, 0) + // Minimum execution time: 27_730_000 picoseconds. + Weight::from_parts(28_499_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -431,8 +434,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `3675` - // Minimum execution time: 23_155_000 picoseconds. - Weight::from_parts(23_886_000, 0) + // Minimum execution time: 27_849_000 picoseconds. + Weight::from_parts(28_749_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -443,8 +446,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 8_572_000 picoseconds. - Weight::from_parts(9_114_000, 0) + // Minimum execution time: 10_744_000 picoseconds. + Weight::from_parts(11_342_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -459,8 +462,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `383` // Estimated: `3675` - // Minimum execution time: 22_073_000 picoseconds. - Weight::from_parts(23_445_000, 0) + // Minimum execution time: 27_585_000 picoseconds. + Weight::from_parts(28_360_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -473,8 +476,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `280` // Estimated: `3675` - // Minimum execution time: 20_512_000 picoseconds. - Weight::from_parts(24_426_000, 0) + // Minimum execution time: 24_866_000 picoseconds. + Weight::from_parts(25_658_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -489,8 +492,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `509` // Estimated: `3675` - // Minimum execution time: 22_574_000 picoseconds. - Weight::from_parts(25_008_000, 0) + // Minimum execution time: 27_040_000 picoseconds. + Weight::from_parts(27_910_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -503,8 +506,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `439` // Estimated: `3675` - // Minimum execution time: 20_650_000 picoseconds. - Weight::from_parts(24_116_000, 0) + // Minimum execution time: 24_684_000 picoseconds. + Weight::from_parts(25_393_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -517,8 +520,8 @@ impl pallet_assets::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388` // Estimated: `3675` - // Minimum execution time: 10_325_000 picoseconds. - Weight::from_parts(14_271_000, 0) + // Minimum execution time: 13_122_000 picoseconds. + Weight::from_parts(13_661_000, 0) .saturating_add(Weight::from_parts(0, 3675)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_balances.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_balances.rs index bae1870..8d1ebf5 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_balances.rs @@ -13,27 +13,26 @@ // 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 `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_986_000 picoseconds. - Weight::from_parts(38_007_000, 0) + // Minimum execution time: 42_117_000 picoseconds. + Weight::from_parts(42_963_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +64,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 28_975_000 picoseconds. - Weight::from_parts(29_834_000, 0) + // Minimum execution time: 33_016_000 picoseconds. + Weight::from_parts(33_442_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +76,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 10_596_000 picoseconds. - Weight::from_parts(10_856_000, 0) + // Minimum execution time: 13_333_000 picoseconds. + Weight::from_parts(14_248_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +88,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_772_000 picoseconds. - Weight::from_parts(15_252_000, 0) + // Minimum execution time: 18_120_000 picoseconds. + Weight::from_parts(18_752_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,8 +100,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 38_938_000 picoseconds. - Weight::from_parts(40_060_000, 0) + // Minimum execution time: 45_143_000 picoseconds. + Weight::from_parts(46_230_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -113,8 +112,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_975_000 picoseconds. - Weight::from_parts(37_576_000, 0) + // Minimum execution time: 41_179_000 picoseconds. + Weight::from_parts(42_016_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -125,8 +124,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_040_000 picoseconds. - Weight::from_parts(13_390_000, 0) + // Minimum execution time: 15_844_000 picoseconds. + Weight::from_parts(16_408_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -138,11 +137,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 12_439_000 picoseconds. - Weight::from_parts(12_629_000, 0) + // Minimum execution time: 15_004_000 picoseconds. + Weight::from_parts(15_351_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 49_710 - .saturating_add(Weight::from_parts(12_855_431, 0).saturating_mul(u.into())) + // Standard Error: 11_567 + .saturating_add(Weight::from_parts(13_035_118, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) @@ -153,8 +152,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1501` - // Minimum execution time: 3_845_000 picoseconds. - Weight::from_parts(4_436_000, 0) + // Minimum execution time: 5_221_000 picoseconds. + Weight::from_parts(5_622_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_collator_selection.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_collator_selection.rs index f5eb0da..bbf3f33 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_collator_selection.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_collator_selection.rs @@ -13,27 +13,26 @@ // 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 `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -56,11 +55,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `196 + b * (79 ±0)` // Estimated: `1187 + b * (2555 ±0)` - // Minimum execution time: 8_683_000 picoseconds. - Weight::from_parts(7_287_414, 0) + // Minimum execution time: 11_068_000 picoseconds. + Weight::from_parts(8_480_360, 0) .saturating_add(Weight::from_parts(0, 1187)) - // Standard Error: 12_385 - .saturating_add(Weight::from_parts(2_826_094, 0).saturating_mul(b.into())) + // Standard Error: 6_186 + .saturating_add(Weight::from_parts(3_123_328, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -79,13 +78,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `794 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 30_106_000 picoseconds. - Weight::from_parts(34_394_275, 0) + // Minimum execution time: 37_988_000 picoseconds. + Weight::from_parts(39_615_334, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 31_833 - .saturating_add(Weight::from_parts(36_601, 0).saturating_mul(b.into())) - // Standard Error: 6_034 - .saturating_add(Weight::from_parts(139_478, 0).saturating_mul(c.into())) + // Standard Error: 10_458 + .saturating_add(Weight::from_parts(47_208, 0).saturating_mul(b.into())) + // Standard Error: 1_982 + .saturating_add(Weight::from_parts(146_581, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -100,11 +99,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 8_262_000 picoseconds. - Weight::from_parts(6_380_993, 0) + // Minimum execution time: 11_096_000 picoseconds. + Weight::from_parts(11_018_901, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 14_585 - .saturating_add(Weight::from_parts(366_470, 0).saturating_mul(b.into())) + // Standard Error: 2_382 + .saturating_add(Weight::from_parts(164_625, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +113,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_135_000 picoseconds. - Weight::from_parts(3_425_000, 0) + // Minimum execution time: 4_057_000 picoseconds. + Weight::from_parts(4_317_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -133,13 +132,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + c * (182 ±0) + k * (115 ±0)` // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` - // Minimum execution time: 7_612_000 picoseconds. - Weight::from_parts(7_792_000, 0) + // Minimum execution time: 9_386_000 picoseconds. + Weight::from_parts(9_467_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(5_084_810, 0).saturating_mul(c.into())) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(4_826_091, 0).saturating_mul(k.into())) + // Standard Error: 152_424 + .saturating_add(Weight::from_parts(5_140_234, 0).saturating_mul(c.into())) + // Standard Error: 152_424 + .saturating_add(Weight::from_parts(4_870_500, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) @@ -156,11 +155,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `319 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 19_259_000 picoseconds. - Weight::from_parts(24_163_743, 0) + // Minimum execution time: 23_799_000 picoseconds. + Weight::from_parts(26_493_236, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_063 - .saturating_add(Weight::from_parts(100_427, 0).saturating_mul(c.into())) + // Standard Error: 1_491 + .saturating_add(Weight::from_parts(120_792, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -179,11 +178,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `764 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 24_887_000 picoseconds. - Weight::from_parts(30_444_592, 0) + // Minimum execution time: 30_402_000 picoseconds. + Weight::from_parts(35_083_785, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_059 - .saturating_add(Weight::from_parts(160_728, 0).saturating_mul(c.into())) + // Standard Error: 2_028 + .saturating_add(Weight::from_parts(129_207, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -205,11 +204,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `904 + c * (53 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_891_000 picoseconds. - Weight::from_parts(45_664_305, 0) + // Minimum execution time: 49_025_000 picoseconds. + Weight::from_parts(53_124_168, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_782 - .saturating_add(Weight::from_parts(145_773, 0).saturating_mul(c.into())) + // Standard Error: 2_369 + .saturating_add(Weight::from_parts(155_477, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -225,11 +224,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `347 + c * (48 ±0)` // Estimated: `6287` - // Minimum execution time: 21_492_000 picoseconds. - Weight::from_parts(24_715_893, 0) + // Minimum execution time: 26_963_000 picoseconds. + Weight::from_parts(30_457_105, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 6_042 - .saturating_add(Weight::from_parts(140_303, 0).saturating_mul(c.into())) + // Standard Error: 2_238 + .saturating_add(Weight::from_parts(132_028, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -243,8 +242,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 33_530_000 picoseconds. - Weight::from_parts(51_207_000, 0) + // Minimum execution time: 38_303_000 picoseconds. + Weight::from_parts(38_992_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -267,11 +266,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 14_521_000 picoseconds. - Weight::from_parts(14_894_000, 0) + // Minimum execution time: 18_298_000 picoseconds. + Weight::from_parts(18_555_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 275_017 - .saturating_add(Weight::from_parts(12_614_016, 0).saturating_mul(c.into())) + // Standard Error: 276_687 + .saturating_add(Weight::from_parts(12_078_744, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_message_queue.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_message_queue.rs index da13b11..59a8d31 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_message_queue.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_message_queue.rs @@ -13,27 +13,26 @@ // 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 `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_message_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +52,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_686_000 picoseconds. - Weight::from_parts(11_016_000, 0) + // Minimum execution time: 11_202_000 picoseconds. + Weight::from_parts(11_572_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,10 +66,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `255` + // Measured: `218` // Estimated: `6044` - // Minimum execution time: 9_324_000 picoseconds. - Weight::from_parts(9_874_000, 0) + // Minimum execution time: 10_014_000 picoseconds. + Weight::from_parts(10_407_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,10 +78,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `6` // Estimated: `3517` - // Minimum execution time: 4_176_000 picoseconds. - Weight::from_parts(4_407_000, 0) + // Minimum execution time: 3_106_000 picoseconds. + Weight::from_parts(3_229_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,10 +90,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_789_000 picoseconds. - Weight::from_parts(6_069_000, 0) + // Minimum execution time: 5_746_000 picoseconds. + Weight::from_parts(5_960_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -103,10 +102,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_969_000 picoseconds. - Weight::from_parts(6_240_000, 0) + // Minimum execution time: 5_923_000 picoseconds. + Weight::from_parts(6_178_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -119,8 +118,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 167_292_000 picoseconds. - Weight::from_parts(172_399_000, 0) + // Minimum execution time: 167_375_000 picoseconds. + Weight::from_parts(170_492_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -130,10 +129,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `171` // Estimated: `3517` - // Minimum execution time: 6_310_000 picoseconds. - Weight::from_parts(6_680_000, 0) + // Minimum execution time: 6_625_000 picoseconds. + Weight::from_parts(6_840_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,10 +143,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 40_250_000 picoseconds. - Weight::from_parts(41_033_000, 0) + // Minimum execution time: 53_101_000 picoseconds. + Weight::from_parts(54_330_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -158,10 +157,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 57_636_000 picoseconds. - Weight::from_parts(58_778_000, 0) + // Minimum execution time: 69_080_000 picoseconds. + Weight::from_parts(70_816_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -172,10 +171,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 104_918_000 picoseconds. - Weight::from_parts(109_534_000, 0) + // Minimum execution time: 108_139_000 picoseconds. + Weight::from_parts(110_626_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_multisig.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_multisig.rs index 77bf8d4..07e055c 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_multisig.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_multisig.rs @@ -13,27 +13,26 @@ // 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 `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,11 +51,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_547_000 picoseconds. - Weight::from_parts(13_504_530, 0) + // Minimum execution time: 12_994_000 picoseconds. + Weight::from_parts(13_506_991, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 43 - .saturating_add(Weight::from_parts(363, 0).saturating_mul(z.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(513, 0).saturating_mul(z.into())) } /// Storage: `Multisig::Multisigs` (r:1 w:1) /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) @@ -66,13 +65,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 33_590_000 picoseconds. - Weight::from_parts(37_534_149, 0) + // Minimum execution time: 38_744_000 picoseconds. + Weight::from_parts(28_200_465, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_735 - .saturating_add(Weight::from_parts(94_337, 0).saturating_mul(s.into())) - // Standard Error: 65 - .saturating_add(Weight::from_parts(96, 0).saturating_mul(z.into())) + // Standard Error: 827 + .saturating_add(Weight::from_parts(119_026, 0).saturating_mul(s.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_447, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -84,13 +83,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 21_943_000 picoseconds. - Weight::from_parts(23_127_449, 0) + // Minimum execution time: 26_246_000 picoseconds. + Weight::from_parts(16_682_448, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 5_815 - .saturating_add(Weight::from_parts(32_010, 0).saturating_mul(s.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(975, 0).saturating_mul(z.into())) + // Standard Error: 511 + .saturating_add(Weight::from_parts(107_982, 0).saturating_mul(s.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_442, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,13 +103,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 35_183_000 picoseconds. - Weight::from_parts(22_693_078, 0) + // Minimum execution time: 44_668_000 picoseconds. + Weight::from_parts(31_599_813, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 7_571 - .saturating_add(Weight::from_parts(192_205, 0).saturating_mul(s.into())) - // Standard Error: 74 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(z.into())) + // Standard Error: 873 + .saturating_add(Weight::from_parts(152_860, 0).saturating_mul(s.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(1_492, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -121,11 +120,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 20_701_000 picoseconds. - Weight::from_parts(21_204_358, 0) + // Minimum execution time: 25_820_000 picoseconds. + Weight::from_parts(26_883_459, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_948 - .saturating_add(Weight::from_parts(119_886, 0).saturating_mul(s.into())) + // Standard Error: 1_196 + .saturating_add(Weight::from_parts(120_437, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,11 +135,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 11_627_000 picoseconds. - Weight::from_parts(12_970_988, 0) + // Minimum execution time: 14_912_000 picoseconds. + Weight::from_parts(15_457_212, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_773 - .saturating_add(Weight::from_parts(96_009, 0).saturating_mul(s.into())) + // Standard Error: 536 + .saturating_add(Weight::from_parts(106_849, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -151,11 +150,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 22_315_000 picoseconds. - Weight::from_parts(26_544_895, 0) + // Minimum execution time: 26_920_000 picoseconds. + Weight::from_parts(27_991_730, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_172 - .saturating_add(Weight::from_parts(76_388, 0).saturating_mul(s.into())) + // Standard Error: 688 + .saturating_add(Weight::from_parts(117_159, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_nfts.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_nfts.rs index 4a34b2a..a17771b 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_nfts.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_nfts.rs @@ -13,27 +13,26 @@ // 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 `pallet_nfts` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_nfts // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -61,8 +60,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `182` // Estimated: `3549` - // Minimum execution time: 24_707_000 picoseconds. - Weight::from_parts(28_653_000, 0) + // Minimum execution time: 30_157_000 picoseconds. + Weight::from_parts(30_897_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -81,8 +80,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3549` - // Minimum execution time: 13_950_000 picoseconds. - Weight::from_parts(14_723_000, 0) + // Minimum execution time: 17_553_000 picoseconds. + Weight::from_parts(18_157_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) @@ -106,15 +105,19 @@ impl pallet_nfts::WeightInfo for WeightInfo { /// The range of component `m` is `[0, 1000]`. /// The range of component `c` is `[0, 1000]`. /// The range of component `a` is `[0, 1000]`. - fn destroy(_m: u32, _c: u32, a: u32, ) -> Weight { + fn destroy(m: u32, c: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `32170 + a * (366 ±0)` // Estimated: `2523990 + a * (2954 ±0)` - // Minimum execution time: 966_747_000 picoseconds. - Weight::from_parts(1_060_810_061, 0) + // Minimum execution time: 1_142_320_000 picoseconds. + Weight::from_parts(1_020_536_969, 0) .saturating_add(Weight::from_parts(0, 2523990)) - // Standard Error: 37_247 - .saturating_add(Weight::from_parts(5_591_509, 0).saturating_mul(a.into())) + // Standard Error: 4_396 + .saturating_add(Weight::from_parts(29_340, 0).saturating_mul(m.into())) + // Standard Error: 4_396 + .saturating_add(Weight::from_parts(8_857, 0).saturating_mul(c.into())) + // Standard Error: 4_396 + .saturating_add(Weight::from_parts(6_454_439, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(1004)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) .saturating_add(T::DbWeight::get().writes(1005)) @@ -137,8 +140,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `421` // Estimated: `4326` - // Minimum execution time: 43_555_000 picoseconds. - Weight::from_parts(56_425_000, 0) + // Minimum execution time: 41_911_000 picoseconds. + Weight::from_parts(43_092_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -159,8 +162,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `421` // Estimated: `4326` - // Minimum execution time: 34_562_000 picoseconds. - Weight::from_parts(53_561_000, 0) + // Minimum execution time: 41_090_000 picoseconds. + Weight::from_parts(41_941_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -187,8 +190,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `530` // Estimated: `4326` - // Minimum execution time: 39_449_000 picoseconds. - Weight::from_parts(44_998_000, 0) + // Minimum execution time: 47_303_000 picoseconds. + Weight::from_parts(48_019_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(7)) @@ -213,8 +216,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `559` // Estimated: `4326` - // Minimum execution time: 31_648_000 picoseconds. - Weight::from_parts(46_841_000, 0) + // Minimum execution time: 36_742_000 picoseconds. + Weight::from_parts(37_515_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -230,11 +233,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `729 + i * (108 ±0)` // Estimated: `3549 + i * (3336 ±0)` - // Minimum execution time: 11_227_000 picoseconds. - Weight::from_parts(14_182_000, 0) + // Minimum execution time: 12_305_000 picoseconds. + Weight::from_parts(12_562_000, 0) .saturating_add(Weight::from_parts(0, 3549)) - // Standard Error: 34_564 - .saturating_add(Weight::from_parts(14_985_467, 0).saturating_mul(i.into())) + // Standard Error: 19_023 + .saturating_add(Weight::from_parts(14_881_152, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) @@ -248,8 +251,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 12_729_000 picoseconds. - Weight::from_parts(13_310_000, 0) + // Minimum execution time: 16_245_000 picoseconds. + Weight::from_parts(16_613_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -262,8 +265,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 12_779_000 picoseconds. - Weight::from_parts(13_229_000, 0) + // Minimum execution time: 16_250_000 picoseconds. + Weight::from_parts(16_656_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -276,8 +279,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3549` - // Minimum execution time: 10_266_000 picoseconds. - Weight::from_parts(10_726_000, 0) + // Minimum execution time: 12_873_000 picoseconds. + Weight::from_parts(13_444_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -294,8 +297,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `528` // Estimated: `3593` - // Minimum execution time: 18_227_000 picoseconds. - Weight::from_parts(18_669_000, 0) + // Minimum execution time: 23_248_000 picoseconds. + Weight::from_parts(23_997_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -308,8 +311,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `335` // Estimated: `6078` - // Minimum execution time: 28_392_000 picoseconds. - Weight::from_parts(29_554_000, 0) + // Minimum execution time: 34_503_000 picoseconds. + Weight::from_parts(35_346_000, 0) .saturating_add(Weight::from_parts(0, 6078)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -322,8 +325,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `277` // Estimated: `3549` - // Minimum execution time: 10_748_000 picoseconds. - Weight::from_parts(11_477_000, 0) + // Minimum execution time: 13_603_000 picoseconds. + Weight::from_parts(14_069_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) @@ -336,8 +339,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `3549` - // Minimum execution time: 8_132_000 picoseconds. - Weight::from_parts(8_522_000, 0) + // Minimum execution time: 10_407_000 picoseconds. + Weight::from_parts(10_645_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -350,8 +353,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `401` // Estimated: `3534` - // Minimum execution time: 11_737_000 picoseconds. - Weight::from_parts(12_328_000, 0) + // Minimum execution time: 15_185_000 picoseconds. + Weight::from_parts(15_561_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -370,8 +373,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3944` - // Minimum execution time: 34_893_000 picoseconds. - Weight::from_parts(36_525_000, 0) + // Minimum execution time: 42_823_000 picoseconds. + Weight::from_parts(43_836_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -384,8 +387,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `310` // Estimated: `3944` - // Minimum execution time: 17_626_000 picoseconds. - Weight::from_parts(18_167_000, 0) + // Minimum execution time: 21_777_000 picoseconds. + Weight::from_parts(22_423_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -402,8 +405,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `949` // Estimated: `3944` - // Minimum execution time: 31_787_000 picoseconds. - Weight::from_parts(32_579_000, 0) + // Minimum execution time: 39_338_000 picoseconds. + Weight::from_parts(40_004_000, 0) .saturating_add(Weight::from_parts(0, 3944)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -416,8 +419,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `347` // Estimated: `4466` - // Minimum execution time: 10_816_000 picoseconds. - Weight::from_parts(11_488_000, 0) + // Minimum execution time: 13_482_000 picoseconds. + Weight::from_parts(14_036_000, 0) .saturating_add(Weight::from_parts(0, 4466)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -435,11 +438,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `797 + n * (398 ±0)` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 17_857_000 picoseconds. - Weight::from_parts(87_316_702, 0) + // Minimum execution time: 21_830_000 picoseconds. + Weight::from_parts(22_333_000, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 29_891 - .saturating_add(Weight::from_parts(5_352_575, 0).saturating_mul(n.into())) + // Standard Error: 3_562 + .saturating_add(Weight::from_parts(6_158_600, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -460,8 +463,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `505` // Estimated: `3812` - // Minimum execution time: 28_014_000 picoseconds. - Weight::from_parts(28_784_000, 0) + // Minimum execution time: 34_404_000 picoseconds. + Weight::from_parts(35_375_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -478,8 +481,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `815` // Estimated: `3812` - // Minimum execution time: 26_540_000 picoseconds. - Weight::from_parts(27_321_000, 0) + // Minimum execution time: 32_838_000 picoseconds. + Weight::from_parts(33_557_000, 0) .saturating_add(Weight::from_parts(0, 3812)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -496,8 +499,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `364` // Estimated: `3759` - // Minimum execution time: 24_807_000 picoseconds. - Weight::from_parts(25_749_000, 0) + // Minimum execution time: 30_747_000 picoseconds. + Weight::from_parts(31_395_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) @@ -514,8 +517,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `682` // Estimated: `3759` - // Minimum execution time: 24_467_000 picoseconds. - Weight::from_parts(25_599_000, 0) + // Minimum execution time: 30_194_000 picoseconds. + Weight::from_parts(30_819_000, 0) .saturating_add(Weight::from_parts(0, 3759)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -528,8 +531,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `376` // Estimated: `4326` - // Minimum execution time: 12_699_000 picoseconds. - Weight::from_parts(13_280_000, 0) + // Minimum execution time: 16_087_000 picoseconds. + Weight::from_parts(16_679_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -540,8 +543,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4326` - // Minimum execution time: 10_725_000 picoseconds. - Weight::from_parts(11_627_000, 0) + // Minimum execution time: 13_843_000 picoseconds. + Weight::from_parts(14_385_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -552,8 +555,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `384` // Estimated: `4326` - // Minimum execution time: 10_265_000 picoseconds. - Weight::from_parts(10_776_000, 0) + // Minimum execution time: 13_091_000 picoseconds. + Weight::from_parts(13_526_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -564,8 +567,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `42` // Estimated: `3517` - // Minimum execution time: 8_172_000 picoseconds. - Weight::from_parts(9_044_000, 0) + // Minimum execution time: 10_989_000 picoseconds. + Weight::from_parts(11_411_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -578,8 +581,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `306` // Estimated: `3549` - // Minimum execution time: 11_438_000 picoseconds. - Weight::from_parts(11_998_000, 0) + // Minimum execution time: 14_720_000 picoseconds. + Weight::from_parts(15_113_000, 0) .saturating_add(Weight::from_parts(0, 3549)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -592,8 +595,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `289` // Estimated: `3538` - // Minimum execution time: 10_866_000 picoseconds. - Weight::from_parts(12_429_000, 0) + // Minimum execution time: 14_198_000 picoseconds. + Weight::from_parts(14_547_000, 0) .saturating_add(Weight::from_parts(0, 3538)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -610,8 +613,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `484` // Estimated: `4326` - // Minimum execution time: 15_153_000 picoseconds. - Weight::from_parts(15_773_000, 0) + // Minimum execution time: 18_999_000 picoseconds. + Weight::from_parts(19_718_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -636,8 +639,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `671` // Estimated: `4326` - // Minimum execution time: 36_175_000 picoseconds. - Weight::from_parts(39_059_000, 0) + // Minimum execution time: 43_843_000 picoseconds. + Weight::from_parts(45_091_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -647,11 +650,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_322_000 picoseconds. - Weight::from_parts(1_752_475, 0) + // Minimum execution time: 1_640_000 picoseconds. + Weight::from_parts(2_643_650, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 13_928 - .saturating_add(Weight::from_parts(1_673_698, 0).saturating_mul(n.into())) + // Standard Error: 5_459 + .saturating_add(Weight::from_parts(1_762_642, 0).saturating_mul(n.into())) } /// Storage: `Nfts::Item` (r:2 w:0) /// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`) @@ -661,8 +664,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `460` // Estimated: `7662` - // Minimum execution time: 13_250_000 picoseconds. - Weight::from_parts(14_372_000, 0) + // Minimum execution time: 16_400_000 picoseconds. + Weight::from_parts(17_046_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -675,8 +678,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `479` // Estimated: `4326` - // Minimum execution time: 13_550_000 picoseconds. - Weight::from_parts(14_522_000, 0) + // Minimum execution time: 16_710_000 picoseconds. + Weight::from_parts(17_472_000, 0) .saturating_add(Weight::from_parts(0, 4326)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -701,8 +704,8 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `800` // Estimated: `7662` - // Minimum execution time: 61_783_000 picoseconds. - Weight::from_parts(63_746_000, 0) + // Minimum execution time: 75_241_000 picoseconds. + Weight::from_parts(76_180_000, 0) .saturating_add(Weight::from_parts(0, 7662)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(10)) @@ -730,11 +733,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `595` // Estimated: `6078 + n * (2954 ±0)` - // Minimum execution time: 99_969_000 picoseconds. - Weight::from_parts(123_916_242, 0) + // Minimum execution time: 120_857_000 picoseconds. + Weight::from_parts(126_743_325, 0) .saturating_add(Weight::from_parts(0, 6078)) - // Standard Error: 296_165 - .saturating_add(Weight::from_parts(26_144_887, 0).saturating_mul(n.into())) + // Standard Error: 34_369 + .saturating_add(Weight::from_parts(28_979_084, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -758,11 +761,11 @@ impl pallet_nfts::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `625` // Estimated: `4466 + n * (2954 ±0)` - // Minimum execution time: 52_989_000 picoseconds. - Weight::from_parts(80_812_232, 0) + // Minimum execution time: 64_159_000 picoseconds. + Weight::from_parts(74_692_155, 0) .saturating_add(Weight::from_parts(0, 4466)) - // Standard Error: 224_507 - .saturating_add(Weight::from_parts(23_143_249, 0).saturating_mul(n.into())) + // Standard Error: 58_790 + .saturating_add(Weight::from_parts(28_034_462, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_proxy.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_proxy.rs index ac393cb..d56bed9 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_proxy.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_proxy.rs @@ -13,27 +13,26 @@ // 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 `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_proxy // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -54,11 +53,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 8_934_000 picoseconds. - Weight::from_parts(9_238_509, 0) + // Minimum execution time: 11_811_000 picoseconds. + Weight::from_parts(12_393_590, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 10_563 - .saturating_add(Weight::from_parts(181_825, 0).saturating_mul(p.into())) + // Standard Error: 791 + .saturating_add(Weight::from_parts(35_945, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -73,13 +72,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 24_386_000 picoseconds. - Weight::from_parts(27_267_051, 0) + // Minimum execution time: 29_856_000 picoseconds. + Weight::from_parts(30_328_079, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 12_649 - .saturating_add(Weight::from_parts(173_626, 0).saturating_mul(a.into())) - // Standard Error: 13_069 - .saturating_add(Weight::from_parts(4_242, 0).saturating_mul(p.into())) + // Standard Error: 1_750 + .saturating_add(Weight::from_parts(144_572, 0).saturating_mul(a.into())) + // Standard Error: 1_808 + .saturating_add(Weight::from_parts(38_250, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -93,13 +92,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 16_835_000 picoseconds. - Weight::from_parts(22_955_043, 0) + // Minimum execution time: 20_081_000 picoseconds. + Weight::from_parts(21_089_520, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_199 - .saturating_add(Weight::from_parts(565, 0).saturating_mul(a.into())) - // Standard Error: 13_637 - .saturating_add(Weight::from_parts(22_041, 0).saturating_mul(p.into())) + // Standard Error: 1_298 + .saturating_add(Weight::from_parts(123_703, 0).saturating_mul(a.into())) + // Standard Error: 1_341 + .saturating_add(Weight::from_parts(3_396, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -113,13 +112,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 16_735_000 picoseconds. - Weight::from_parts(17_777_793, 0) + // Minimum execution time: 20_145_000 picoseconds. + Weight::from_parts(20_831_834, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_591 - .saturating_add(Weight::from_parts(253_707, 0).saturating_mul(a.into())) - // Standard Error: 14_042 - .saturating_add(Weight::from_parts(3_438, 0).saturating_mul(p.into())) + // Standard Error: 1_320 + .saturating_add(Weight::from_parts(127_781, 0).saturating_mul(a.into())) + // Standard Error: 1_364 + .saturating_add(Weight::from_parts(7_676, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -135,13 +134,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 22_484_000 picoseconds. - Weight::from_parts(18_927_811, 0) + // Minimum execution time: 26_982_000 picoseconds. + Weight::from_parts(27_129_179, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_286 - .saturating_add(Weight::from_parts(230_534, 0).saturating_mul(a.into())) - // Standard Error: 13_727 - .saturating_add(Weight::from_parts(155_424, 0).saturating_mul(p.into())) + // Standard Error: 1_741 + .saturating_add(Weight::from_parts(134_725, 0).saturating_mul(a.into())) + // Standard Error: 1_799 + .saturating_add(Weight::from_parts(30_092, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -152,11 +151,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_443_000 picoseconds. - Weight::from_parts(17_113_970, 0) + // Minimum execution time: 19_066_000 picoseconds. + Weight::from_parts(19_844_956, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 21_184 - .saturating_add(Weight::from_parts(284_878, 0).saturating_mul(p.into())) + // Standard Error: 1_052 + .saturating_add(Weight::from_parts(33_364, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -167,37 +166,41 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_623_000 picoseconds. - Weight::from_parts(17_692_513, 0) + // Minimum execution time: 18_969_000 picoseconds. + Weight::from_parts(19_977_938, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 10_493 - .saturating_add(Weight::from_parts(24_243, 0).saturating_mul(p.into())) + // Standard Error: 1_475 + .saturating_add(Weight::from_parts(44_031, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(_p: u32, ) -> Weight { + fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 14_952_000 picoseconds. - Weight::from_parts(21_939_532, 0) + // Minimum execution time: 17_983_000 picoseconds. + Weight::from_parts(18_853_149, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_018 + .saturating_add(Weight::from_parts(38_227, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(_p: u32, ) -> Weight { + fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 16_014_000 picoseconds. - Weight::from_parts(19_498_552, 0) + // Minimum execution time: 20_283_000 picoseconds. + Weight::from_parts(20_994_344, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 1_081 + .saturating_add(Weight::from_parts(10_219, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -208,11 +211,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_323_000 picoseconds. - Weight::from_parts(15_142_983, 0) + // Minimum execution time: 18_697_000 picoseconds. + Weight::from_parts(19_560_576, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 9_540 - .saturating_add(Weight::from_parts(140_362, 0).saturating_mul(p.into())) + // Standard Error: 1_012 + .saturating_add(Weight::from_parts(25_795, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_session.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_session.rs index dbc3ef9..ad0e3d3 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_session.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_session.rs @@ -13,27 +13,26 @@ // 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 `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -55,8 +54,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `297` // Estimated: `3762` - // Minimum execution time: 12_839_000 picoseconds. - Weight::from_parts(14_412_000, 0) + // Minimum execution time: 14_817_000 picoseconds. + Weight::from_parts(15_253_000, 0) .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,8 +68,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `3744` - // Minimum execution time: 8_893_000 picoseconds. - Weight::from_parts(9_354_000, 0) + // Minimum execution time: 10_811_000 picoseconds. + Weight::from_parts(11_155_000, 0) .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_timestamp.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_timestamp.rs index 51c4dfa..8ad1fcd 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_timestamp.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_timestamp.rs @@ -13,27 +13,26 @@ // 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 `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +52,10 @@ impl pallet_timestamp::WeightInfo for WeightInfo { /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `86` + // Measured: `120` // Estimated: `1493` - // Minimum execution time: 5_498_000 picoseconds. - Weight::from_parts(5_858_000, 0) + // Minimum execution time: 6_603_000 picoseconds. + Weight::from_parts(7_036_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +64,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_473_000 picoseconds. - Weight::from_parts(2_614_000, 0) + // Minimum execution time: 2_753_000 picoseconds. + Weight::from_parts(2_920_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_uniques.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_uniques.rs index 08864ae..dada141 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_uniques.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_uniques.rs @@ -13,27 +13,26 @@ // 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 `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_uniques // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +52,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `182` + // Measured: `216` // Estimated: `3643` - // Minimum execution time: 19_880_000 picoseconds. - Weight::from_parts(30_256_000, 0) + // Minimum execution time: 23_704_000 picoseconds. + Weight::from_parts(24_333_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,10 +66,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn force_create() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `76` // Estimated: `3643` - // Minimum execution time: 8_623_000 picoseconds. - Weight::from_parts(9_574_000, 0) + // Minimum execution time: 11_151_000 picoseconds. + Weight::from_parts(11_403_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -96,17 +95,17 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `257 + a * (107 ±0) + m * (56 ±0) + n * (76 ±0)` + // Measured: `291 + a * (107 ±0) + m * (56 ±0) + n * (76 ±0)` // Estimated: `3643 + a * (2647 ±0) + m * (2662 ±0) + n * (2597 ±0)` - // Minimum execution time: 2_271_368_000 picoseconds. - Weight::from_parts(2_377_258_000, 0) + // Minimum execution time: 2_677_059_000 picoseconds. + Weight::from_parts(2_710_214_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 42_636 - .saturating_add(Weight::from_parts(6_575_329, 0).saturating_mul(n.into())) - // Standard Error: 42_636 - .saturating_add(Weight::from_parts(368_382, 0).saturating_mul(m.into())) - // Standard Error: 42_636 - .saturating_add(Weight::from_parts(414_606, 0).saturating_mul(a.into())) + // Standard Error: 27_644 + .saturating_add(Weight::from_parts(6_985_087, 0).saturating_mul(n.into())) + // Standard Error: 27_644 + .saturating_add(Weight::from_parts(338_802, 0).saturating_mul(m.into())) + // Standard Error: 27_644 + .saturating_add(Weight::from_parts(373_586, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into()))) @@ -129,10 +128,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 24_347_000 picoseconds. - Weight::from_parts(31_639_000, 0) + // Minimum execution time: 28_486_000 picoseconds. + Weight::from_parts(29_489_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -147,10 +146,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `428` + // Measured: `462` // Estimated: `3643` - // Minimum execution time: 25_098_000 picoseconds. - Weight::from_parts(28_683_000, 0) + // Minimum execution time: 31_253_000 picoseconds. + Weight::from_parts(31_735_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -165,10 +164,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `428` + // Measured: `462` // Estimated: `3643` - // Minimum execution time: 18_959_000 picoseconds. - Weight::from_parts(21_161_000, 0) + // Minimum execution time: 22_566_000 picoseconds. + Weight::from_parts(23_220_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) @@ -180,13 +179,13 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `738 + i * (76 ±0)` + // Measured: `772 + i * (76 ±0)` // Estimated: `3643 + i * (2597 ±0)` - // Minimum execution time: 8_041_000 picoseconds. - Weight::from_parts(9_064_000, 0) + // Minimum execution time: 10_714_000 picoseconds. + Weight::from_parts(10_961_000, 0) .saturating_add(Weight::from_parts(0, 3643)) - // Standard Error: 32_177 - .saturating_add(Weight::from_parts(14_561_101, 0).saturating_mul(i.into())) + // Standard Error: 17_427 + .saturating_add(Weight::from_parts(14_826_250, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -199,10 +198,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn freeze() -> Weight { // Proof Size summary in bytes: - // Measured: `428` + // Measured: `462` // Estimated: `3643` - // Minimum execution time: 11_248_000 picoseconds. - Weight::from_parts(11_878_000, 0) + // Minimum execution time: 14_331_000 picoseconds. + Weight::from_parts(14_913_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -213,10 +212,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn thaw() -> Weight { // Proof Size summary in bytes: - // Measured: `428` + // Measured: `462` // Estimated: `3643` - // Minimum execution time: 11_106_000 picoseconds. - Weight::from_parts(11_768_000, 0) + // Minimum execution time: 14_342_000 picoseconds. + Weight::from_parts(14_941_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -225,10 +224,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn freeze_collection() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 7_221_000 picoseconds. - Weight::from_parts(7_682_000, 0) + // Minimum execution time: 9_561_000 picoseconds. + Weight::from_parts(9_958_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -237,10 +236,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn thaw_collection() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 7_241_000 picoseconds. - Weight::from_parts(7_492_000, 0) + // Minimum execution time: 9_368_000 picoseconds. + Weight::from_parts(9_818_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -255,10 +254,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `530` + // Measured: `564` // Estimated: `3643` - // Minimum execution time: 16_835_000 picoseconds. - Weight::from_parts(18_688_000, 0) + // Minimum execution time: 21_722_000 picoseconds. + Weight::from_parts(22_263_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -267,10 +266,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn set_team() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 7_611_000 picoseconds. - Weight::from_parts(8_373_000, 0) + // Minimum execution time: 9_761_000 picoseconds. + Weight::from_parts(10_121_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,10 +280,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassAccount` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) fn force_item_status() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 10_245_000 picoseconds. - Weight::from_parts(11_197_000, 0) + // Minimum execution time: 13_129_000 picoseconds. + Weight::from_parts(14_384_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -297,10 +296,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(172), added: 2647, mode: `MaxEncodedLen`) fn set_attribute() -> Weight { // Proof Size summary in bytes: - // Measured: `559` + // Measured: `593` // Estimated: `3652` - // Minimum execution time: 26_329_000 picoseconds. - Weight::from_parts(28_673_000, 0) + // Minimum execution time: 31_692_000 picoseconds. + Weight::from_parts(33_025_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -313,10 +312,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Attribute` (`max_values`: None, `max_size`: Some(172), added: 2647, mode: `MaxEncodedLen`) fn clear_attribute() -> Weight { // Proof Size summary in bytes: - // Measured: `756` + // Measured: `790` // Estimated: `3652` - // Minimum execution time: 24_307_000 picoseconds. - Weight::from_parts(24_907_000, 0) + // Minimum execution time: 31_037_000 picoseconds. + Weight::from_parts(31_877_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -327,10 +326,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`) fn set_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `348` + // Measured: `382` // Estimated: `3652` - // Minimum execution time: 18_417_000 picoseconds. - Weight::from_parts(19_129_000, 0) + // Minimum execution time: 23_040_000 picoseconds. + Weight::from_parts(23_687_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -341,10 +340,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::InstanceMetadataOf` (`max_values`: None, `max_size`: Some(187), added: 2662, mode: `MaxEncodedLen`) fn clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `559` + // Measured: `593` // Estimated: `3652` - // Minimum execution time: 19_539_000 picoseconds. - Weight::from_parts(20_841_000, 0) + // Minimum execution time: 24_057_000 picoseconds. + Weight::from_parts(25_100_000, 0) .saturating_add(Weight::from_parts(0, 3652)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -355,10 +354,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(167), added: 2642, mode: `MaxEncodedLen`) fn set_collection_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 18_948_000 picoseconds. - Weight::from_parts(20_160_000, 0) + // Minimum execution time: 23_988_000 picoseconds. + Weight::from_parts(24_506_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -369,10 +368,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ClassMetadataOf` (`max_values`: None, `max_size`: Some(167), added: 2642, mode: `MaxEncodedLen`) fn clear_collection_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `473` + // Measured: `507` // Estimated: `3643` - // Minimum execution time: 18_848_000 picoseconds. - Weight::from_parts(21_593_000, 0) + // Minimum execution time: 23_334_000 picoseconds. + Weight::from_parts(23_574_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -383,10 +382,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`) fn approve_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `428` + // Measured: `462` // Estimated: `3643` - // Minimum execution time: 16_836_000 picoseconds. - Weight::from_parts(18_768_000, 0) + // Minimum execution time: 14_964_000 picoseconds. + Weight::from_parts(15_697_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -397,10 +396,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Asset` (`max_values`: None, `max_size`: Some(122), added: 2597, mode: `MaxEncodedLen`) fn cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `461` + // Measured: `495` // Estimated: `3643` - // Minimum execution time: 15_293_000 picoseconds. - Weight::from_parts(18_648_000, 0) + // Minimum execution time: 15_149_000 picoseconds. + Weight::from_parts(15_500_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -409,10 +408,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::OwnershipAcceptance` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn set_accept_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `76` // Estimated: `3517` - // Minimum execution time: 10_385_000 picoseconds. - Weight::from_parts(14_292_000, 0) + // Minimum execution time: 10_922_000 picoseconds. + Weight::from_parts(11_447_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -423,10 +422,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Class` (`max_values`: None, `max_size`: Some(178), added: 2653, mode: `MaxEncodedLen`) fn set_collection_max_supply() -> Weight { // Proof Size summary in bytes: - // Measured: `282` + // Measured: `316` // Estimated: `3643` - // Minimum execution time: 13_380_000 picoseconds. - Weight::from_parts(14_862_000, 0) + // Minimum execution time: 11_723_000 picoseconds. + Weight::from_parts(12_264_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -437,10 +436,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::ItemPriceOf` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`) fn set_price() -> Weight { // Proof Size summary in bytes: - // Measured: `259` + // Measured: `293` // Estimated: `3587` - // Minimum execution time: 14_130_000 picoseconds. - Weight::from_parts(14_922_000, 0) + // Minimum execution time: 12_146_000 picoseconds. + Weight::from_parts(12_497_000, 0) .saturating_add(Weight::from_parts(0, 3587)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -455,10 +454,10 @@ impl pallet_uniques::WeightInfo for WeightInfo { /// Proof: `Uniques::Account` (`max_values`: None, `max_size`: Some(88), added: 2563, mode: `MaxEncodedLen`) fn buy_item() -> Weight { // Proof Size summary in bytes: - // Measured: `540` + // Measured: `574` // Estimated: `3643` - // Minimum execution time: 26_449_000 picoseconds. - Weight::from_parts(37_797_000, 0) + // Minimum execution time: 29_775_000 picoseconds. + Weight::from_parts(30_186_000, 0) .saturating_add(Weight::from_parts(0, 3643)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_utility.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_utility.rs index 06ca92f..c41f615 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_utility.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_utility.rs @@ -13,27 +13,26 @@ // 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 `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,18 +51,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_074_000 picoseconds. - Weight::from_parts(3_155_000, 0) + // Minimum execution time: 3_923_000 picoseconds. + Weight::from_parts(4_063_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 14_227 - .saturating_add(Weight::from_parts(3_461_383, 0).saturating_mul(c.into())) + // Standard Error: 1_643 + .saturating_add(Weight::from_parts(3_793_591, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_025_000 picoseconds. - Weight::from_parts(3_165_000, 0) + // Minimum execution time: 3_921_000 picoseconds. + Weight::from_parts(4_221_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -71,18 +70,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_034_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 3_960_000 picoseconds. + Weight::from_parts(4_036_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 30_865 - .saturating_add(Weight::from_parts(3_998_927, 0).saturating_mul(c.into())) + // Standard Error: 1_636 + .saturating_add(Weight::from_parts(3_997_463, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_486_000 picoseconds. - Weight::from_parts(5_618_000, 0) + // Minimum execution time: 5_850_000 picoseconds. + Weight::from_parts(6_242_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -90,10 +89,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_145_000 picoseconds. - Weight::from_parts(3_886_000, 0) + // Minimum execution time: 3_945_000 picoseconds. + Weight::from_parts(4_142_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 25_226 - .saturating_add(Weight::from_parts(3_512_146, 0).saturating_mul(c.into())) + // Standard Error: 1_604 + .saturating_add(Weight::from_parts(3_793_014, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_vesting.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_vesting.rs index 598bc88..b647387 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_vesting.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_vesting.rs @@ -258,4 +258,4 @@ impl pallet_vesting::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } -} \ No newline at end of file +} diff --git a/system-parachains/asset-hub-paseo/src/weights/pallet_xcm.rs b/system-parachains/asset-hub-paseo/src/weights/pallet_xcm.rs index 71c3a68..6cf0ab3 100644 --- a/system-parachains/asset-hub-paseo/src/weights/pallet_xcm.rs +++ b/system-parachains/asset-hub-paseo/src/weights/pallet_xcm.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./asset-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -61,11 +60,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 16_224_000 picoseconds. - Weight::from_parts(17_216_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 20_417_000 picoseconds. + Weight::from_parts(21_346_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -87,10 +86,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `111` + // Measured: `75` // Estimated: `3593` - // Minimum execution time: 80_631_000 picoseconds. - Weight::from_parts(83_485_000, 0) + // Minimum execution time: 90_570_000 picoseconds. + Weight::from_parts(93_009_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) @@ -115,10 +114,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `333` + // Measured: `296` // Estimated: `6196` - // Minimum execution time: 100_521_000 picoseconds. - Weight::from_parts(103_285_000, 0) + // Minimum execution time: 117_416_000 picoseconds. + Weight::from_parts(119_561_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -145,10 +144,10 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `514` + // Measured: `478` // Estimated: `6208` - // Minimum execution time: 120_672_000 picoseconds. - Weight::from_parts(127_021_000, 0) + // Minimum execution time: 142_386_000 picoseconds. + Weight::from_parts(146_203_000, 0) .saturating_add(Weight::from_parts(0, 6208)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -169,8 +168,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_597_000 picoseconds. - Weight::from_parts(4_828_000, 0) + // Minimum execution time: 5_982_000 picoseconds. + Weight::from_parts(6_301_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,8 +179,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_452_000 picoseconds. - Weight::from_parts(1_552_000, 0) + // Minimum execution time: 2_050_000 picoseconds. + Weight::from_parts(2_183_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -205,11 +204,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 20_471_000 picoseconds. - Weight::from_parts(23_495_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 26_197_000 picoseconds. + Weight::from_parts(26_616_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -231,11 +230,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `329` - // Estimated: `3794` - // Minimum execution time: 23_616_000 picoseconds. - Weight::from_parts(31_567_000, 0) - .saturating_add(Weight::from_parts(0, 3794)) + // Measured: `292` + // Estimated: `3757` + // Minimum execution time: 27_668_000 picoseconds. + Weight::from_parts(28_414_000, 0) + .saturating_add(Weight::from_parts(0, 3757)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -245,8 +244,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_442_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 2_038_000 picoseconds. + Weight::from_parts(2_228_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -256,8 +255,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `125` // Estimated: `13490` - // Minimum execution time: 17_036_000 picoseconds. - Weight::from_parts(17_616_000, 0) + // Minimum execution time: 18_130_000 picoseconds. + Weight::from_parts(18_553_000, 0) .saturating_add(Weight::from_parts(0, 13490)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -268,8 +267,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `129` // Estimated: `13494` - // Minimum execution time: 17_026_000 picoseconds. - Weight::from_parts(18_638_000, 0) + // Minimum execution time: 18_447_000 picoseconds. + Weight::from_parts(18_864_000, 0) .saturating_add(Weight::from_parts(0, 13494)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -280,8 +279,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `140` // Estimated: `15980` - // Minimum execution time: 27_461_000 picoseconds. - Weight::from_parts(27_962_000, 0) + // Minimum execution time: 20_401_000 picoseconds. + Weight::from_parts(20_657_000, 0) .saturating_add(Weight::from_parts(0, 15980)) .saturating_add(T::DbWeight::get().reads(6)) } @@ -301,11 +300,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `6118` - // Minimum execution time: 20_291_000 picoseconds. - Weight::from_parts(23_094_000, 0) - .saturating_add(Weight::from_parts(0, 6118)) + // Measured: `142` + // Estimated: `6082` + // Minimum execution time: 25_133_000 picoseconds. + Weight::from_parts(25_527_000, 0) + .saturating_add(Weight::from_parts(0, 6082)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -315,8 +314,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `11062` - // Minimum execution time: 11_238_000 picoseconds. - Weight::from_parts(11_838_000, 0) + // Minimum execution time: 11_596_000 picoseconds. + Weight::from_parts(11_894_000, 0) .saturating_add(Weight::from_parts(0, 11062)) .saturating_add(T::DbWeight::get().reads(4)) } @@ -326,8 +325,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `13501` - // Minimum execution time: 17_176_000 picoseconds. - Weight::from_parts(18_297_000, 0) + // Minimum execution time: 18_513_000 picoseconds. + Weight::from_parts(19_028_000, 0) .saturating_add(Weight::from_parts(0, 13501)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) @@ -348,11 +347,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `13543` - // Minimum execution time: 28_643_000 picoseconds. - Weight::from_parts(44_347_000, 0) - .saturating_add(Weight::from_parts(0, 13543)) + // Measured: `142` + // Estimated: `13507` + // Minimum execution time: 33_572_000 picoseconds. + Weight::from_parts(34_292_000, 0) + .saturating_add(Weight::from_parts(0, 13507)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -364,8 +363,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `1554` - // Minimum execution time: 4_427_000 picoseconds. - Weight::from_parts(4_687_000, 0) + // Minimum execution time: 4_725_000 picoseconds. + Weight::from_parts(5_006_000, 0) .saturating_add(Weight::from_parts(0, 1554)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -376,8 +375,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `7706` // Estimated: `11171` - // Minimum execution time: 24_687_000 picoseconds. - Weight::from_parts(39_109_000, 0) + // Minimum execution time: 25_548_000 picoseconds. + Weight::from_parts(26_063_000, 0) .saturating_add(Weight::from_parts(0, 11171)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -388,8 +387,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `126` // Estimated: `3591` - // Minimum execution time: 32_107_000 picoseconds. - Weight::from_parts(37_496_000, 0) + // Minimum execution time: 36_411_000 picoseconds. + Weight::from_parts(37_294_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index f48f5c1..561def4 100644 --- a/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --output=./asset-hub-paseo-weights/xcm/pallet_xcm_benchmarks_fungible.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 29_084_000 picoseconds. - Weight::from_parts(29_895_000, 0) + // Minimum execution time: 34_468_000 picoseconds. + Weight::from_parts(35_027_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +64,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 33_160_000 picoseconds. - Weight::from_parts(35_313_000, 0) + // Minimum execution time: 38_652_000 picoseconds. + Weight::from_parts(39_368_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -89,10 +88,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `264` + // Measured: `228` // Estimated: `8799` - // Minimum execution time: 75_874_000 picoseconds. - Weight::from_parts(78_087_000, 0) + // Minimum execution time: 89_779_000 picoseconds. + Weight::from_parts(91_325_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(5)) @@ -103,8 +102,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. - Weight::from_parts(18_446_744_073_709_551_000, 0) + // Minimum execution time: 4_860_700 picoseconds. + Weight::from_parts(4_860_700, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -125,10 +124,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 72_549_000 picoseconds. - Weight::from_parts(74_892_000, 0) + // Minimum execution time: 88_867_000 picoseconds. + Weight::from_parts(90_298_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -137,8 +136,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_774_000 picoseconds. - Weight::from_parts(2_935_000, 0) + // Minimum execution time: 3_349_000 picoseconds. + Weight::from_parts(3_471_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) @@ -147,8 +146,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 23_115_000 picoseconds. - Weight::from_parts(24_056_000, 0) + // Minimum execution time: 27_915_000 picoseconds. + Weight::from_parts(28_361_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -171,10 +170,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `163` + // Measured: `127` // Estimated: `6196` - // Minimum execution time: 61_353_000 picoseconds. - Weight::from_parts(64_016_000, 0) + // Minimum execution time: 76_065_000 picoseconds. + Weight::from_parts(78_121_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -197,10 +196,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `111` + // Measured: `75` // Estimated: `3593` - // Minimum execution time: 37_266_000 picoseconds. - Weight::from_parts(38_448_000, 0) + // Minimum execution time: 45_557_000 picoseconds. + Weight::from_parts(46_640_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 0c37706..848d38d 100644 --- a/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/asset-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./asset-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --output=./asset-hub-paseo-weights/xcm/pallet_xcm_benchmarks_generic.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -65,10 +64,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 116_756_000 picoseconds. - Weight::from_parts(135_232_000, 0) + // Minimum execution time: 132_459_000 picoseconds. + Weight::from_parts(136_816_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -77,8 +76,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_307_000 picoseconds. - Weight::from_parts(5_788_000, 0) + // Minimum execution time: 5_526_000 picoseconds. + Weight::from_parts(5_829_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) @@ -87,8 +86,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `69` // Estimated: `3534` - // Minimum execution time: 7_301_000 picoseconds. - Weight::from_parts(7_581_000, 0) + // Minimum execution time: 8_246_000 picoseconds. + Weight::from_parts(8_535_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -96,56 +95,56 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_579_000 picoseconds. - Weight::from_parts(7_060_000, 0) + // Minimum execution time: 8_084_000 picoseconds. + Weight::from_parts(8_608_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_831_000 picoseconds. - Weight::from_parts(7_702_000, 0) + // Minimum execution time: 7_431_000 picoseconds. + Weight::from_parts(7_772_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_613_000 picoseconds. - Weight::from_parts(1_723_000, 0) + // Minimum execution time: 1_806_000 picoseconds. + Weight::from_parts(1_900_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_542_000 picoseconds. - Weight::from_parts(1_803_000, 0) + // Minimum execution time: 1_737_000 picoseconds. + Weight::from_parts(1_809_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_053_000 picoseconds. - Weight::from_parts(3_124_000, 0) + // Minimum execution time: 1_719_000 picoseconds. + Weight::from_parts(1_788_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(1_953_000, 0) + // Minimum execution time: 1_831_000 picoseconds. + Weight::from_parts(1_917_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_750_000 picoseconds. + Weight::from_parts(1_843_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -166,10 +165,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 48_224_000 picoseconds. - Weight::from_parts(51_617_000, 0) + // Minimum execution time: 55_963_000 picoseconds. + Weight::from_parts(57_601_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -180,8 +179,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `126` // Estimated: `3591` - // Minimum execution time: 9_464_000 picoseconds. - Weight::from_parts(10_486_000, 0) + // Minimum execution time: 11_300_000 picoseconds. + Weight::from_parts(11_616_000, 0) .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -190,8 +189,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_562_000 picoseconds. - Weight::from_parts(1_743_000, 0) + // Minimum execution time: 1_723_000 picoseconds. + Weight::from_parts(1_829_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -210,11 +209,11 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 17_987_000 picoseconds. - Weight::from_parts(18_918_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 22_141_000 picoseconds. + Weight::from_parts(22_657_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -224,8 +223,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_864_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 3_473_000 picoseconds. + Weight::from_parts(3_618_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -233,40 +232,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_309_000 picoseconds. - Weight::from_parts(19_620_000, 0) + // Minimum execution time: 24_248_000 picoseconds. + Weight::from_parts(24_688_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_925_000 picoseconds. - Weight::from_parts(10_906_000, 0) + // Minimum execution time: 11_154_000 picoseconds. + Weight::from_parts(11_443_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_752_000, 0) + // Minimum execution time: 1_725_000 picoseconds. + Weight::from_parts(1_862_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_583_000 picoseconds. - Weight::from_parts(1_643_000, 0) + // Minimum execution time: 1_730_000 picoseconds. + Weight::from_parts(1_847_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_753_000 picoseconds. - Weight::from_parts(1_814_000, 0) + // Minimum execution time: 1_982_000 picoseconds. + Weight::from_parts(2_093_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -287,10 +286,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 52_539_000 picoseconds. - Weight::from_parts(58_057_000, 0) + // Minimum execution time: 59_936_000 picoseconds. + Weight::from_parts(61_874_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -299,8 +298,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_296_000 picoseconds. - Weight::from_parts(4_427_000, 0) + // Minimum execution time: 4_682_000 picoseconds. + Weight::from_parts(4_939_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -321,10 +320,10 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 48_483_000 picoseconds. - Weight::from_parts(50_507_000, 0) + // Minimum execution time: 55_832_000 picoseconds. + Weight::from_parts(57_137_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(4)) @@ -333,51 +332,51 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_622_000 picoseconds. - Weight::from_parts(1_762_000, 0) + // Minimum execution time: 1_729_000 picoseconds. + Weight::from_parts(1_790_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 1_712_000 picoseconds. + Weight::from_parts(1_786_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_572_000 picoseconds. - Weight::from_parts(1_703_000, 0) + // Minimum execution time: 1_741_000 picoseconds. + Weight::from_parts(1_838_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - pub(crate) fn universal_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1489` - // Minimum execution time: 3_294_000 picoseconds. - Weight::from_parts(3_415_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - } + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + pub(crate) fn universal_origin() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1489` + // Minimum execution time: 3_294_000 picoseconds. + Weight::from_parts(3_415_000, 0) + .saturating_add(Weight::from_parts(0, 1489)) + .saturating_add(T::DbWeight::get().reads(1)) + } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_704_000 picoseconds. + Weight::from_parts(1_803_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_702_000, 0) + // Minimum execution time: 1_756_000 picoseconds. + Weight::from_parts(1_800_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/asset-hub-paseo/src/xcm_config.rs b/system-parachains/asset-hub-paseo/src/xcm_config.rs index f4e47d9..63299b6 100644 --- a/system-parachains/asset-hub-paseo/src/xcm_config.rs +++ b/system-parachains/asset-hub-paseo/src/xcm_config.rs @@ -17,7 +17,7 @@ use super::{ AccountId, AllPalletsWithSystem, AssetConversion, Assets, Authorship, Balance, Balances, CollatorSelection, ForeignAssets, NativeAndAssets, ParachainInfo, ParachainSystem, PolkadotXcm, PoolAssets, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, - TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + ToKusamaXcmRouter, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use crate::ForeignAssetsInstance; use assets_common::{ @@ -226,23 +226,6 @@ parameter_types! { pub XcmAssetFeesReceiver: Option = Authorship::author(); } -pub struct FellowshipEntities; -impl Contains for FellowshipEntities { - fn contains(location: &Location) -> bool { - matches!( - location.unpack(), - ( - 1, - [ - Parachain(system_parachain::COLLECTIVES_ID), - Plurality { id: BodyId::Technical, .. } - ] - ) | (1, [Parachain(system_parachain::COLLECTIVES_ID), PalletInstance(64)]) - | (1, [Parachain(system_parachain::COLLECTIVES_ID), PalletInstance(65)]) - ) - } -} - pub struct ParentOrParentsPlurality; impl Contains for ParentOrParentsPlurality { fn contains(location: &Location) -> bool { @@ -268,7 +251,6 @@ pub type Barrier = TrailingSetTopicAsId< // sibling bridge hub get free execution. AllowExplicitUnpaidExecutionFrom<( ParentOrParentsPlurality, - FellowshipEntities, Equals, Equals, )>, @@ -295,7 +277,6 @@ pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentia pub type WaivedLocations = ( RelayOrOtherSystemParachains, Equals, - FellowshipEntities, ); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: @@ -322,8 +303,14 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; - // Until we can bridge to westend, no reserves from now. - type IsReserve = (bridging::to_ethereum::IsTrustedBridgedReserveLocationForForeignAsset,); + // Asset Hub trusts only particular, pre-configured bridged locations from a different consensus + // as reserve locations (we trust the Bridge Hub to relay the message that a reserve is being + // held). Asset Hub may _act_ as a reserve location for DOT and assets created + // under `pallet-assets`. Users must use teleport where allowed (e.g. DOT with the Relay Chain). + type IsReserve = ( + bridging::to_kusama::IsTrustedBridgedReserveLocationForConcreteAsset, + bridging::to_ethereum::IsTrustedBridgedReserveLocationForForeignAsset, + ); type IsTeleporter = TrustedTeleporters; type UniversalLocation = UniversalLocation; type Barrier = Barrier; @@ -394,7 +381,8 @@ impl xcm_executor::Config for XcmConfig { XcmFeeToAccount, >; type MessageExporter = (); - type UniversalAliases = bridging::to_ethereum::UniversalAliases; + type UniversalAliases = + (bridging::to_kusama::UniversalAliases, bridging::to_ethereum::UniversalAliases); type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; @@ -419,6 +407,9 @@ pub type XcmRouter = WithUniqueTopic<( // The means for routing XCM messages which are not for local execution into the right message // queues. LocalXcmRouter, + // Router which wraps and sends xcm to BridgeHub to be delivered to the Kusama + // GlobalConsensus + ToKusamaXcmRouter, // Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum // GlobalConsensus SovereignPaidRemoteExporter< @@ -433,11 +424,9 @@ impl pallet_xcm::Config for Runtime { // We want to disallow users sending (arbitrary) XCMs from this chain. type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - // We support local origins dispatching XCM executions in principle... + // Anyone can execute XCM messages locally. type ExecuteXcmOrigin = EnsureXcmOrigin; - // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are - // allowed. - type XcmExecuteFilter = Nothing; + type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; @@ -491,11 +480,98 @@ pub mod bridging { use xcm_builder::NetworkExportTableItem; parameter_types! { - pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_paseo::BRIDGE_HUB_PASEO_PARACHAIN_ID; + /// Base price of every Polkadot -> Kusama message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterBaseFee: Balance = bp_bridge_hub_polkadot::estimate_polkadot_to_kusama_message_fee( + bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms::get() + ); + /// Price of every byte of the Polkadot -> Kusama message. Can be adjusted via + /// governance `set_storage` call. + pub storage XcmBridgeHubRouterByteFee: Balance = bp_bridge_hub_polkadot::estimate_polkadot_to_kusama_byte_fee(); + + pub SiblingBridgeHubParaId: u32 = bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID; pub SiblingBridgeHub: Location = Location::new(1, Parachain(SiblingBridgeHubParaId::get())); /// Router expects payment with this `AssetId`. /// (`AssetId` has to be aligned with `BridgeTable`) pub XcmBridgeHubRouterFeeAssetId: AssetId = DotLocation::get().into(); + + pub BridgeTable: sp_std::vec::Vec = + sp_std::vec::Vec::new().into_iter() + .chain(to_kusama::BridgeTable::get()) + .collect(); + } + + pub type NetworkExportTable = xcm_builder::NetworkExportTable; + + pub mod to_kusama { + use super::*; + + parameter_types! { + pub SiblingBridgeHubWithBridgeHubKusamaInstance: Location = Location::new( + 1, + [ + Parachain(SiblingBridgeHubParaId::get()), + PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX), + ] + ); + + pub const KusamaNetwork: NetworkId = NetworkId::Kusama; + pub AssetHubKusama: Location = Location::new( + 2, + [ + GlobalConsensus(KusamaNetwork::get()), + Parachain(paseo_runtime_constants::system_parachain::ASSET_HUB_ID), + ], + ); + pub KsmLocation: Location = Location::new(2, GlobalConsensus(KusamaNetwork::get())); + + pub KsmFromAssetHubKusama: (AssetFilter, Location) = ( + Wild(AllOf { fun: WildFungible, id: AssetId(KsmLocation::get()) }), + AssetHubKusama::get() + ); + + /// Set up exporters configuration. + /// `Option` represents static "base fee" which is used for total delivery fee calculation. + pub BridgeTable: sp_std::vec::Vec = sp_std::vec![ + NetworkExportTableItem::new( + KusamaNetwork::get(), + Some(sp_std::vec![ + AssetHubKusama::get().interior.split_global().expect("invalid configuration for AssetHubPolkadot").1, + ]), + SiblingBridgeHub::get(), + // base delivery fee to local `BridgeHub` + Some(( + XcmBridgeHubRouterFeeAssetId::get(), + XcmBridgeHubRouterBaseFee::get(), + ).into()) + ) + ]; + + /// Universal aliases + pub UniversalAliases: BTreeSet<(Location, Junction)> = BTreeSet::from_iter( + sp_std::vec![ + (SiblingBridgeHubWithBridgeHubKusamaInstance::get(), GlobalConsensus(KusamaNetwork::get())) + ] + ); + } + + impl Contains<(Location, Junction)> for UniversalAliases { + fn contains(alias: &(Location, Junction)) -> bool { + UniversalAliases::get().contains(alias) + } + } + + /// Reserve locations filter for `xcm_executor::Config::IsReserve`. + /// Locations from which the runtime accepts reserved assets. + pub type IsTrustedBridgedReserveLocationForConcreteAsset = + matching::IsTrustedBridgedReserveLocationForConcreteAsset< + UniversalLocation, + ( + // allow receive KSM from AssetHubKusama + xcm_builder::Case, + // and nothing else + ), + >; } pub mod to_ethereum { @@ -544,11 +620,6 @@ pub mod bridging { impl Contains<(Location, Junction)> for UniversalAliases { fn contains(alias: &(Location, Junction)) -> bool { - log::trace!( - target: "xcm::contains", - "Contains: {:?}", - alias, - ); UniversalAliases::get().contains(alias) } } @@ -561,22 +632,16 @@ pub mod bridging { #[cfg(feature = "runtime-benchmarks")] impl BridgingBenchmarksHelper { pub fn prepare_universal_alias() -> Option<(Location, Junction)> { - None + let alias = + to_kusama::UniversalAliases::get().into_iter().find_map(|(location, junction)| { + match to_kusama::SiblingBridgeHubWithBridgeHubKusamaInstance::get() + .eq(&location) + { + true => Some((location, junction)), + false => None, + } + }); + Some(alias.expect("we expect here BridgeHubPolkadot to Kusama mapping at least")) } } } - -#[test] -fn foreign_pallet_has_correct_local_account() { - use sp_core::crypto::{Ss58AddressFormat, Ss58Codec}; - use xcm_executor::traits::ConvertLocation; - - const COLLECTIVES_PARAID: u32 = 1001; - const FELLOWSHIP_SALARY_PALLET_ID: u8 = 64; - let fellowship_salary = - (Parent, Parachain(COLLECTIVES_PARAID), PalletInstance(FELLOWSHIP_SALARY_PALLET_ID)); - let account = LocationToAccountId::convert_location(&fellowship_salary.into()).unwrap(); - let polkadot = Ss58AddressFormat::try_from("polkadot").unwrap(); - let address = Ss58Codec::to_ss58check_with_version(&account, polkadot); - assert_eq!(address, "13w7NdvSR1Af8xsQTArDtZmVvjE8XhWNdL4yed3iFHrUNCnS"); -} diff --git a/system-parachains/asset-hub-paseo/tests/snowbridge.rs b/system-parachains/asset-hub-paseo/tests/snowbridge.rs new file mode 100644 index 0000000..7c410c1 --- /dev/null +++ b/system-parachains/asset-hub-paseo/tests/snowbridge.rs @@ -0,0 +1,76 @@ +// This file is part of Cumulus. + +// Copyright (C) Parity Technologies (UK) Ltd. +// 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 +// +// 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. + +use asset_hub_paseo_runtime::xcm_config::bridging::{ + to_ethereum::{BridgeHubEthereumBaseFee, BridgeTable, EthereumNetwork}, + SiblingBridgeHub, XcmBridgeHubRouterFeeAssetId, +}; +use sp_core::H160; +use sp_std::prelude::*; +use xcm::prelude::*; +use xcm_builder::{ExporterFor, NetworkExportTable}; + +#[test] +fn network_export_table_works() { + sp_io::TestExternalities::default().execute_with(|| { + #[allow(clippy::type_complexity)] + let test_data: Vec<(NetworkId, InteriorLocation, Option<(Location, Option)>)> = vec![ + // From Ethereum (from GlobalConsensus(Ethereum) is routed to BridgeHub, with a fee, + // matched. + ( + EthereumNetwork::get(), + Junctions::Here, + Some(( + SiblingBridgeHub::get(), + Some(Asset { + id: XcmBridgeHubRouterFeeAssetId::get(), + fun: Fungible(BridgeHubEthereumBaseFee::get()), + }), + )), + ), + // From Ethereum with a random parachain ID filter, not matched. + (EthereumNetwork::get(), [Parachain(4321)].into(), None), + // From Ethereum with a account ID added to the Ethereum Network, not matched. + ( + EthereumNetwork::get(), + [ + GlobalConsensus(EthereumNetwork::get()), + AccountKey20 { network: None, key: H160::random().into() }, + ] + .into(), + None, + ), + // From Ethereum with the Mainnet chain ID instead of Sepolia, not matched. + (NetworkId::Ethereum { chain_id: 1 }, Junctions::Here, None), + ]; + + for (network, remote_location, expected_result) in test_data { + assert_eq!( + NetworkExportTable::::exporter_for( + &network, + &remote_location, + &Xcm::default() + ), + expected_result, + "expected_result: {:?} not matched for network: {:?} and remote_location: {:?}", + expected_result, + network, + remote_location, + ) + } + }); +} diff --git a/system-parachains/asset-hub-paseo/tests/tests.rs b/system-parachains/asset-hub-paseo/tests/tests.rs index fdb8b4b..049ec29 100644 --- a/system-parachains/asset-hub-paseo/tests/tests.rs +++ b/system-parachains/asset-hub-paseo/tests/tests.rs @@ -19,18 +19,18 @@ use asset_hub_paseo_runtime::{ xcm_config::{ - bridging::{self, XcmBridgeHubRouterFeeAssetId}, + bridging::self, CheckingAccount, DotLocation, ForeignCreatorsSovereignAccountOf, LocationToAccountId, - RelayTreasuryLocation, RelayTreasuryPalletAccount, StakingPot, + RelayTreasuryLocation, RelayTreasuryPalletAccount, TrustBackedAssetsPalletLocation, XcmConfig, }, AllPalletsWithoutSystem, AssetConversion, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + ParachainSystem, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, TrustBackedAssetsInstance, XcmpQueue, }; use asset_test_utils::{ - test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, + CollatorSessionKey, CollatorSessionKeys, ExtBuilder, }; use codec::{Decode, Encode}; use frame_support::{assert_ok, traits::fungibles::InspectEnumerable}; @@ -262,7 +262,7 @@ asset_test_utils::include_teleports_for_native_asset_works!( ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), _ => None, } }), @@ -283,7 +283,7 @@ asset_test_utils::include_teleports_for_foreign_assets_works!( ExistentialDeposit::get(), Box::new(|runtime_event_encoded: Vec| { match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), _ => None, } }), diff --git a/system-parachains/asset-hub-paseo/tests/weight_trader.rs b/system-parachains/asset-hub-paseo/tests/weight_trader.rs new file mode 100644 index 0000000..e5e8613 --- /dev/null +++ b/system-parachains/asset-hub-paseo/tests/weight_trader.rs @@ -0,0 +1,673 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// 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 +// +// 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. + +//! Tests for `WeighTrader` type of XCM Executor. + +use asset_hub_paseo_runtime::{ + xcm_config::{ + AssetFeeAsExistentialDepositMultiplierFeeCharger, DotLocation, DotLocationV3, StakingPot, + TrustBackedAssetsPalletLocation, TrustBackedAssetsPalletLocationV3, XcmConfig, + }, + AllPalletsWithoutSystem, AssetConversion, Assets, Balances, ExistentialDeposit, ForeignAssets, + Runtime, SessionKeys, +}; +use asset_test_utils::ExtBuilder; +use assets_common::AssetIdForTrustBackedAssetsConvert; +use cumulus_primitives_utility::ChargeWeightInFungibles; +use frame_support::{ + assert_noop, assert_ok, + traits::{ + fungible::{Inspect, Mutate}, + fungibles::{Create, Inspect as FungiblesInspect, Mutate as FungiblesMutate}, + }, + weights::WeightToFee as WeightToFeeT, +}; +use parachains_common::{AccountId, AuraId}; +use paseo_runtime_constants::currency::UNITS; +use sp_runtime::traits::MaybeEquivalence; +use system_parachains_constants::paseo::fee::WeightToFee; +use xcm::latest::prelude::*; +use xcm_executor::traits::WeightTrader; + +const ALICE: [u8; 32] = [1u8; 32]; +const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; + +type RuntimeHelper = asset_test_utils::RuntimeHelper; + +type AssetIdForTrustBackedAssetsConvertLatest = + assets_common::AssetIdForTrustBackedAssetsConvertLatest; + +#[test] +fn test_asset_xcm_trader() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + let minimum_asset_balance = 333333333_u128; + let local_asset_id = 1; + assert_ok!(Assets::force_create( + RuntimeHelper::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // get asset id as location + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&local_asset_id).unwrap(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); + + // We are going to buy 400e9 weight + // Because of the ED being higher in kusama's asset hub + // and not to complicate things, we use a little + // bit more of weight + let bought = Weight::from_parts(400_000_000_000u64, 0); + + // Lets calculate amount needed + let asset_amount_needed = + AssetFeeAsExistentialDepositMultiplierFeeCharger::charge_weight_in_fungibles( + local_asset_id, + bought, + ) + .expect("failed to compute"); + + // Lets pay with: asset_amount_needed + asset_amount_extra + let asset_amount_extra = 100_u128; + let asset: Asset = + (asset_location.clone(), asset_amount_needed + asset_amount_extra).into(); + + let mut trader = ::Trader::new(); + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + + // Lets buy_weight and make sure buy_weight does not return an error + let unused_assets = trader.buy_weight(bought, asset.into(), &ctx).expect("Expected Ok"); + // Check whether a correct amount of unused assets is returned + assert_ok!(unused_assets.ensure_contains(&(asset_location, asset_amount_extra).into())); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + asset_amount_needed + ); + + // We also need to ensure the total supply increased + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); + }); +} + +#[test] +fn test_asset_xcm_trader_with_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::root_origin(), + 1.into(), + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::origin_of(AccountId::from(ALICE)), + 1.into(), + AccountId::from(ALICE).into(), + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + + // Set Alice as block author, who will receive fees + RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); + + // We are going to buy 400e9 weight + // Because of the ED being higher in kusama's asset hub + // and not to complicate things, we use a little + // bit more of weight + let bought = Weight::from_parts(400_000_000_000u64, 0); + + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); + + // lets calculate amount needed + let amount_bought = WeightToFee::weight_to_fee(&bought); + + let asset: Asset = (asset_location.clone(), amount_bought).into(); + + // Make sure buy_weight does not return an error + assert_ok!(trader.buy_weight(bought, asset.clone().into(), &ctx)); + + // Make sure again buy_weight does return an error + // This assert relies on the fact, that we use `TakeFirstAssetTrader` in `WeightTrader` + // tuple chain, which cannot be called twice + assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); + + // We actually use half of the weight + let weight_used = bought / 2; + + // Make sure refurnd works. + let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); + + assert_eq!( + trader.refund_weight(bought - weight_used, &ctx), + Some((asset_location, amount_refunded).into()) + ); + + // Drop trader + drop(trader); + + // We only should have paid for half of the bought weight + let fees_paid = WeightToFee::weight_to_fee(&weight_used); + + assert_eq!( + Assets::balance(1, AccountId::from(ALICE)), + ExistentialDeposit::get() + fees_paid + ); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get() + fees_paid); + }); +} + +#[test] +fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::root_origin(), + 1.into(), + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + + // Set Alice as block author, who will receive fees + RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); + + // We are going to buy 50e9 weight + // Because of the ED being higher in kusama's asset hub + // and not to complicate things, we use a little + // bit more of weight + let bought = Weight::from_parts(5_000_000_000u64, 0); + + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + let asset: Asset = (asset_location, amount_bought).into(); + + // Buy weight should return an error + assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); + + // not credited since the ED is higher than this value + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), 0); + + // We also need to ensure the total supply did not increase + assert_eq!(Assets::total_supply(1), 0); + }); +} + +#[test] +fn test_that_buying_ed_refund_does_not_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::root_origin(), + 1.into(), + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + + // Set Alice as block author, who will receive fees + RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); + + // We are gonna buy ED + let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0); + + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + // We know we will have to buy at least ED, so lets make sure first it will + // fail with a payment of less than ED + let asset: Asset = (asset_location.clone(), amount_bought).into(); + assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); + + // Now lets buy ED at least + let asset: Asset = (asset_location, ExistentialDeposit::get()).into(); + + // Buy weight should work + assert_ok!(trader.buy_weight(bought, asset.into(), &ctx)); + + // Should return None. We have a specific check making sure we dont go below ED for + // drop payment + assert_eq!(trader.refund_weight(bought, &ctx), None); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), ExistentialDeposit::get()); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get()); + }); +} + +#[test] +fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // Create a non-sufficient asset + let minimum_asset_balance = 1_000_000_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::root_origin(), + 1.into(), + AccountId::from(ALICE).into(), + false, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::origin_of(AccountId::from(ALICE)), + 1.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + let mut trader = ::Trader::new(); + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + + // Set Alice as block author, who will receive fees + RuntimeHelper::run_to_block(2, AccountId::from(ALICE)); + + // We are going to buy 400e9 weight + // Because of the ED being higher in kusama's asset hub + // and not to complicate things, we use a little + // bit more of weight + let bought = Weight::from_parts(400_000_000_000u64, 0); + + // lets calculate amount needed + let asset_amount_needed = WeightToFee::weight_to_fee(&bought); + + let asset_location = + AssetIdForTrustBackedAssetsConvertLatest::convert_back(&1).unwrap(); + + let asset: Asset = (asset_location, asset_amount_needed).into(); + + // Make sure again buy_weight does return an error + assert_noop!(trader.buy_weight(bought, asset.into(), &ctx), XcmError::TooExpensive); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has NOT received the amount + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), minimum_asset_balance); + + // We also need to ensure the total supply NOT increased + assert_eq!(Assets::total_supply(1), minimum_asset_balance); + }); +} + +#[test] +fn test_buy_and_refund_weight_with_native() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let bob: AccountId = SOME_ASSET_ADMIN.into(); + let staking_pot = StakingPot::get(); + let native_location = DotLocation::get(); + let initial_balance = 200 * UNITS; + + assert_ok!(Balances::mint_into(&bob, initial_balance)); + assert_ok!(Balances::mint_into(&staking_pot, initial_balance)); + + // keep initial total issuance to assert later. + let total_issuance = Balances::total_issuance(); + + // prepare input to buy weight. + let weight = Weight::from_parts(4_000_000_000, 0); + let fee = WeightToFee::weight_to_fee(&weight); + let extra_amount = 100; + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + let payment: Asset = (native_location.clone(), fee + extra_amount).into(); + + // init trader and buy weight. + let mut trader = ::Trader::new(); + let unused_asset = + trader.buy_weight(weight, payment.into(), &ctx).expect("Expected Ok"); + + // assert. + let unused_amount = + unused_asset.fungible.get(&native_location.clone().into()).map_or(0, |a| *a); + assert_eq!(unused_amount, extra_amount); + assert_eq!(Balances::total_issuance(), total_issuance); + + // prepare input to refund weight. + let refund_weight = Weight::from_parts(1_000_000_000, 0); + let refund = WeightToFee::weight_to_fee(&refund_weight); + + // refund. + let actual_refund = trader.refund_weight(refund_weight, &ctx).unwrap(); + assert_eq!(actual_refund, (native_location, refund).into()); + + // assert. + assert_eq!(Balances::balance(&staking_pot), initial_balance); + // only after `trader` is dropped we expect the fee to be resolved into the treasury + // account. + drop(trader); + assert_eq!(Balances::balance(&staking_pot), initial_balance + fee - refund); + assert_eq!(Balances::total_issuance(), total_issuance + fee - refund); + }) +} + +#[test] +fn test_buy_and_refund_weight_with_swap_local_asset_xcm_trader() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let bob: AccountId = SOME_ASSET_ADMIN.into(); + let staking_pot = StakingPot::get(); + let asset_1: u32 = 1; + let native_location = DotLocationV3::get(); + let asset_1_location = AssetIdForTrustBackedAssetsConvert::< + TrustBackedAssetsPalletLocationV3, + >::convert_back(&asset_1) + .unwrap(); + // bob's initial balance for native and `asset1` assets. + let initial_balance = 200 * UNITS; + // liquidity for both arms of (native, asset1) pool. + let pool_liquidity = 100 * UNITS; + + // init asset, balances and pool. + assert_ok!(>::create(asset_1, bob.clone(), true, 10)); + + assert_ok!(Assets::mint_into(asset_1, &bob, initial_balance)); + assert_ok!(Balances::mint_into(&bob, initial_balance)); + assert_ok!(Balances::mint_into(&staking_pot, initial_balance)); + + assert_ok!(AssetConversion::create_pool( + RuntimeHelper::origin_of(bob.clone()), + Box::new(native_location), + Box::new(asset_1_location) + )); + + assert_ok!(AssetConversion::add_liquidity( + RuntimeHelper::origin_of(bob.clone()), + Box::new(native_location), + Box::new(asset_1_location), + pool_liquidity, + pool_liquidity, + 1, + 1, + bob, + )); + + // keep initial total issuance to assert later. + let asset_total_issuance = Assets::total_issuance(asset_1); + let native_total_issuance = Balances::total_issuance(); + + let asset_1_location_latest: Location = asset_1_location.try_into().unwrap(); + + // prepare input to buy weight. + let weight = Weight::from_parts(4_000_000_000, 0); + let fee = WeightToFee::weight_to_fee(&weight); + let asset_fee = + AssetConversion::get_amount_in(&fee, &pool_liquidity, &pool_liquidity).unwrap(); + let extra_amount = 100; + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + let payment: Asset = (asset_1_location_latest.clone(), asset_fee + extra_amount).into(); + + // init trader and buy weight. + let mut trader = ::Trader::new(); + let unused_asset = + trader.buy_weight(weight, payment.into(), &ctx).expect("Expected Ok"); + + // assert. + let unused_amount = unused_asset + .fungible + .get(&asset_1_location_latest.clone().into()) + .map_or(0, |a| *a); + assert_eq!(unused_amount, extra_amount); + assert_eq!(Assets::total_issuance(asset_1), asset_total_issuance + asset_fee); + + // prepare input to refund weight. + let refund_weight = Weight::from_parts(1_000_000_000, 0); + let refund = WeightToFee::weight_to_fee(&refund_weight); + let (reserve1, reserve2) = + AssetConversion::get_reserves(native_location, asset_1_location).unwrap(); + let asset_refund = + AssetConversion::get_amount_out(&refund, &reserve1, &reserve2).unwrap(); + + // refund. + let actual_refund = trader.refund_weight(refund_weight, &ctx).unwrap(); + assert_eq!(actual_refund, (asset_1_location_latest, asset_refund).into()); + + // assert. + assert_eq!(Balances::balance(&staking_pot), initial_balance); + // only after `trader` is dropped we expect the fee to be resolved into the treasury + // account. + drop(trader); + assert_eq!(Balances::balance(&staking_pot), initial_balance + fee - refund); + assert_eq!( + Assets::total_issuance(asset_1), + asset_total_issuance + asset_fee - asset_refund + ); + assert_eq!(Balances::total_issuance(), native_total_issuance); + }) +} + +#[test] +fn test_buy_and_refund_weight_with_swap_foreign_asset_xcm_trader() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let bob: AccountId = SOME_ASSET_ADMIN.into(); + let staking_pot = StakingPot::get(); + let native_location = DotLocationV3::get(); + let foreign_location = xcm::v3::Location { + parents: 1, + interior: ( + xcm::v3::Junction::Parachain(1234), + xcm::v3::Junction::GeneralIndex(12345), + ) + .into(), + }; + // bob's initial balance for native and `asset1` assets. + let initial_balance = 200 * UNITS; + // liquidity for both arms of (native, asset1) pool. + let pool_liquidity = 100 * UNITS; + + // init asset, balances and pool. + assert_ok!(>::create( + foreign_location, + bob.clone(), + true, + 10 + )); + + assert_ok!(ForeignAssets::mint_into(foreign_location, &bob, initial_balance)); + assert_ok!(Balances::mint_into(&bob, initial_balance)); + assert_ok!(Balances::mint_into(&staking_pot, initial_balance)); + + assert_ok!(AssetConversion::create_pool( + RuntimeHelper::origin_of(bob.clone()), + Box::new(native_location), + Box::new(foreign_location) + )); + + assert_ok!(AssetConversion::add_liquidity( + RuntimeHelper::origin_of(bob.clone()), + Box::new(native_location), + Box::new(foreign_location), + pool_liquidity, + pool_liquidity, + 1, + 1, + bob, + )); + + // keep initial total issuance to assert later. + let asset_total_issuance = ForeignAssets::total_issuance(foreign_location); + let native_total_issuance = Balances::total_issuance(); + + let foreign_location_latest: Location = foreign_location.try_into().unwrap(); + + // prepare input to buy weight. + let weight = Weight::from_parts(4_000_000_000, 0); + let fee = WeightToFee::weight_to_fee(&weight); + let asset_fee = + AssetConversion::get_amount_in(&fee, &pool_liquidity, &pool_liquidity).unwrap(); + let extra_amount = 100; + let ctx = XcmContext { origin: None, message_id: XcmHash::default(), topic: None }; + let payment: Asset = (foreign_location_latest.clone(), asset_fee + extra_amount).into(); + + // init trader and buy weight. + let mut trader = ::Trader::new(); + let unused_asset = + trader.buy_weight(weight, payment.into(), &ctx).expect("Expected Ok"); + + // assert. + let unused_amount = unused_asset + .fungible + .get(&foreign_location_latest.clone().into()) + .map_or(0, |a| *a); + assert_eq!(unused_amount, extra_amount); + assert_eq!( + ForeignAssets::total_issuance(foreign_location), + asset_total_issuance + asset_fee + ); + + // prepare input to refund weight. + let refund_weight = Weight::from_parts(1_000_000_000, 0); + let refund = WeightToFee::weight_to_fee(&refund_weight); + let (reserve1, reserve2) = + AssetConversion::get_reserves(native_location, foreign_location).unwrap(); + let asset_refund = + AssetConversion::get_amount_out(&refund, &reserve1, &reserve2).unwrap(); + + // refund. + let actual_refund = trader.refund_weight(refund_weight, &ctx).unwrap(); + assert_eq!(actual_refund, (foreign_location_latest, asset_refund).into()); + + // assert. + assert_eq!(Balances::balance(&staking_pot), initial_balance); + // only after `trader` is dropped we expect the fee to be resolved into the treasury + // account. + drop(trader); + assert_eq!(Balances::balance(&staking_pot), initial_balance + fee - refund); + assert_eq!( + ForeignAssets::total_issuance(foreign_location), + asset_total_issuance + asset_fee - asset_refund + ); + assert_eq!(Balances::total_issuance(), native_total_issuance); + }) +} diff --git a/system-parachains/bridge-hub-paseo/Cargo.toml b/system-parachains/bridge-hub-paseo/Cargo.toml index 9f198c8..03b6165 100644 --- a/system-parachains/bridge-hub-paseo/Cargo.toml +++ b/system-parachains/bridge-hub-paseo/Cargo.toml @@ -18,6 +18,15 @@ log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true } +#kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "kusama-runtime-constants", default-features = false } +#bp-bridge-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-bridge-hub-kusama", default-features = false } +#bp-asset-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-asset-hub-kusama", default-features = false } + + +kusama-runtime-constants = { workspace = true, default-features = false } +bp-bridge-hub-kusama = { workspace = true, default-features = false } +bp-bridge-hub-polkadot = { workspace = true, default-features = false } +bp-asset-hub-kusama = { workspace = true, default-features = false } # Local bp-asset-hub-paseo = { workspace = true } bp-bridge-hub-paseo = { workspace = true } @@ -70,7 +79,7 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", + "parameterized-consensus-hook", ], workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } @@ -90,6 +99,7 @@ bp-parachains = { workspace = true } bp-polkadot-core = { workspace = true } bp-relayers = { workspace = true } bp-runtime = { workspace = true } +bp-kusama = { workspace = true } bp-polkadot = { workspace = true } bridge-hub-common = { workspace = true } bridge-runtime-common = { workspace = true } @@ -116,7 +126,7 @@ sp-debug-derive = { workspace = true } [dev-dependencies] bridge-hub-test-utils = { workspace = true } bridge-runtime-common = { features = [ - "integrity-test", + "integrity-test", ], workspace = true, default-features = true } sp-keyring = { workspace = true } static_assertions = { workspace = true } @@ -126,166 +136,172 @@ parachains-runtimes-test-utils = { workspace = true } [features] default = ["std"] std = [ - "bp-asset-hub-paseo/std", - "bp-bridge-hub-paseo/std", - "bp-header-chain/std", - "bp-messages/std", - "bp-parachains/std", - "bp-polkadot-core/std", - "bp-polkadot/std", - "bp-relayers/std", - "bp-runtime/std", - "bridge-hub-common/std", - "bridge-runtime-common/std", - "codec/std", - "cumulus-pallet-aura-ext/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-aura/std", - "cumulus-primitives-core/std", - "cumulus-primitives-utility/std", - "frame-benchmarking?/std", - "frame-executive/std", - "frame-metadata-hash-extension/std", - "frame-support/std", - "frame-system-benchmarking?/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "frame-try-runtime?/std", - "paseo-runtime-constants/std", - "log/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-bridge-grandpa/std", - "pallet-bridge-messages/std", - "pallet-bridge-parachains/std", - "pallet-bridge-relayers/std", - "pallet-collator-selection/std", - "pallet-message-queue/std", - "pallet-multisig/std", - "pallet-session/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-utility/std", - "pallet-xcm-benchmarks?/std", - "pallet-xcm-bridge-hub/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-core-primitives/std", - "polkadot-parachain-primitives/std", - "polkadot-runtime-common/std", - "scale-info/std", - "serde", - "snowbridge-beacon-primitives/std", - "snowbridge-core/std", - "snowbridge-outbound-queue-runtime-api/std", - "snowbridge-pallet-ethereum-client/std", - "snowbridge-pallet-inbound-queue/std", - "snowbridge-pallet-outbound-queue/std", - "snowbridge-pallet-system/std", - "snowbridge-router-primitives/std", - "snowbridge-runtime-common/std", - "snowbridge-system-runtime-api/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-debug-derive/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-storage/std", - "sp-transaction-pool/std", - "sp-version/std", - "substrate-wasm-builder", - "system-parachains-constants/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", + "kusama-runtime-constants/std", + "bp-asset-hub-kusama/std", + "bp-asset-hub-paseo/std", + "bp-bridge-hub-kusama/std", + "bp-bridge-hub-polkadot/std", + "bp-bridge-hub-paseo/std", + "bp-header-chain/std", + "bp-kusama/std", + "bp-messages/std", + "bp-parachains/std", + "bp-polkadot-core/std", + "bp-polkadot/std", + "bp-relayers/std", + "bp-runtime/std", + "bridge-hub-common/std", + "bridge-runtime-common/std", + "codec/std", + "cumulus-pallet-aura-ext/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-aura/std", + "cumulus-primitives-core/std", + "cumulus-primitives-utility/std", + "frame-benchmarking?/std", + "frame-executive/std", + "frame-metadata-hash-extension/std", + "frame-support/std", + "frame-system-benchmarking?/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "frame-try-runtime?/std", + "paseo-runtime-constants/std", + "log/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-bridge-grandpa/std", + "pallet-bridge-messages/std", + "pallet-bridge-parachains/std", + "pallet-bridge-relayers/std", + "pallet-collator-selection/std", + "pallet-message-queue/std", + "pallet-multisig/std", + "pallet-session/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-utility/std", + "pallet-xcm-benchmarks?/std", + "pallet-xcm-bridge-hub/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-core-primitives/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std", + "paseo-runtime-constants/std", + "scale-info/std", + "serde", + "snowbridge-beacon-primitives/std", + "snowbridge-core/std", + "snowbridge-outbound-queue-runtime-api/std", + "snowbridge-pallet-ethereum-client/std", + "snowbridge-pallet-inbound-queue/std", + "snowbridge-pallet-outbound-queue/std", + "snowbridge-pallet-system/std", + "snowbridge-router-primitives/std", + "snowbridge-runtime-common/std", + "snowbridge-system-runtime-api/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-debug-derive/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-storage/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "system-parachains-constants/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", ] runtime-benchmarks = [ - "bridge-hub-common/runtime-benchmarks", - "bridge-runtime-common/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-bridge-grandpa/runtime-benchmarks", - "pallet-bridge-messages/runtime-benchmarks", - "pallet-bridge-parachains/runtime-benchmarks", - "pallet-bridge-relayers/runtime-benchmarks", - "pallet-collator-selection/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-xcm-benchmarks/runtime-benchmarks", - "pallet-xcm-bridge-hub/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "snowbridge-core/runtime-benchmarks", - "snowbridge-pallet-ethereum-client/runtime-benchmarks", - "snowbridge-pallet-inbound-queue/runtime-benchmarks", - "snowbridge-pallet-outbound-queue/runtime-benchmarks", - "snowbridge-pallet-system/runtime-benchmarks", - "snowbridge-router-primitives/runtime-benchmarks", - "snowbridge-runtime-common/runtime-benchmarks", - "snowbridge-runtime-test-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "bridge-hub-common/runtime-benchmarks", + "bridge-runtime-common/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-bridge-grandpa/runtime-benchmarks", + "pallet-bridge-messages/runtime-benchmarks", + "pallet-bridge-parachains/runtime-benchmarks", + "pallet-bridge-relayers/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm-bridge-hub/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "snowbridge-core/runtime-benchmarks", + "snowbridge-pallet-ethereum-client/runtime-benchmarks", + "snowbridge-pallet-inbound-queue/runtime-benchmarks", + "snowbridge-pallet-outbound-queue/runtime-benchmarks", + "snowbridge-pallet-system/runtime-benchmarks", + "snowbridge-router-primitives/runtime-benchmarks", + "snowbridge-runtime-common/runtime-benchmarks", + "snowbridge-runtime-test-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", ] try-runtime = [ - "cumulus-pallet-aura-ext/try-runtime", - "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", - "frame-executive/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-bridge-grandpa/try-runtime", - "pallet-bridge-messages/try-runtime", - "pallet-bridge-parachains/try-runtime", - "pallet-bridge-relayers/try-runtime", - "pallet-collator-selection/try-runtime", - "pallet-message-queue/try-runtime", - "pallet-multisig/try-runtime", - "pallet-session/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-utility/try-runtime", - "pallet-xcm-bridge-hub/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", - "snowbridge-pallet-ethereum-client/try-runtime", - "snowbridge-pallet-inbound-queue/try-runtime", - "snowbridge-pallet-outbound-queue/try-runtime", - "snowbridge-pallet-system/try-runtime", - "sp-runtime/try-runtime", + "cumulus-pallet-aura-ext/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-executive/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-bridge-grandpa/try-runtime", + "pallet-bridge-messages/try-runtime", + "pallet-bridge-parachains/try-runtime", + "pallet-bridge-relayers/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-multisig/try-runtime", + "pallet-session/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-utility/try-runtime", + "pallet-xcm-bridge-hub/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "snowbridge-pallet-ethereum-client/try-runtime", + "snowbridge-pallet-inbound-queue/try-runtime", + "snowbridge-pallet-outbound-queue/try-runtime", + "snowbridge-pallet-system/try-runtime", + "sp-runtime/try-runtime", ] # Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. diff --git a/system-parachains/bridge-hub-paseo/build.rs b/system-parachains/bridge-hub-paseo/build.rs index a9ba6c2..98771a4 100644 --- a/system-parachains/bridge-hub-paseo/build.rs +++ b/system-parachains/bridge-hub-paseo/build.rs @@ -15,14 +15,14 @@ #[cfg(all(feature = "std", not(feature = "metadata-hash")))] fn main() { - substrate_wasm_builder::WasmBuilder::build_using_defaults() + substrate_wasm_builder::WasmBuilder::build_using_defaults() } #[cfg(all(feature = "std", feature = "metadata-hash"))] fn main() { - substrate_wasm_builder::WasmBuilder::init_with_defaults() - .enable_metadata_hash("PAS", 12) - .build() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("PAS", 12) + .build() } #[cfg(not(feature = "std"))] diff --git a/system-parachains/bridge-hub-paseo/primitives/Cargo.toml b/system-parachains/bridge-hub-paseo/primitives/Cargo.toml index 904a3d7..a0c0f10 100644 --- a/system-parachains/bridge-hub-paseo/primitives/Cargo.toml +++ b/system-parachains/bridge-hub-paseo/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bp-bridge-hub-paseo" -description = "Primitives of BridgeHub Paseo parachain runtime." +description = "Primitives of BridgeHubPaseo parachain runtime." repository.workspace = true version.workspace = true authors.workspace = true @@ -8,9 +8,13 @@ edition.workspace = true license.workspace = true [dependencies] + +# Local +kusama-runtime-constants = { workspace = true } +paseo-runtime-constants = { workspace = true } +system-parachains-constants = { workspace = true } + # Bridge Dependencies -codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false } -scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } bp-bridge-hub-cumulus = { workspace = true } bp-runtime = { workspace = true } bp-messages = { workspace = true } @@ -32,11 +36,12 @@ std = [ "bp-messages/std", "bp-runtime/std", "frame-support/std", + "kusama-runtime-constants/std", + "paseo-runtime-constants/std", "snowbridge-core/std", "sp-api/std", "sp-runtime/std", "sp-std/std", + "system-parachains-constants/std", "xcm/std", - "codec/std", - "scale-info/std" ] diff --git a/system-parachains/bridge-hub-paseo/primitives/src/lib.rs b/system-parachains/bridge-hub-paseo/primitives/src/lib.rs index 203d6d3..498648a 100644 --- a/system-parachains/bridge-hub-paseo/primitives/src/lib.rs +++ b/system-parachains/bridge-hub-paseo/primitives/src/lib.rs @@ -20,24 +20,151 @@ #![cfg_attr(not(feature = "std"), no_std)] pub use bp_bridge_hub_cumulus::*; +use bp_messages::*; +use bp_runtime::{ + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, +}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; + +/// BridgeHubPaseo parachain. +#[derive(RuntimeDebug)] +pub struct BridgeHubPaseo; + +impl Chain for BridgeHubPaseo { + const ID: ChainId = *b"bhpd"; + + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + + fn max_extrinsic_size() -> u32 { + *BlockLength::get().max.get(DispatchClass::Normal) + } + + fn max_extrinsic_weight() -> Weight { + BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .unwrap_or(Weight::MAX) + } +} + +impl Parachain for BridgeHubPaseo { + const PARACHAIN_ID: u32 = BRIDGE_HUB_POLKAPAS_PARACHAIN_ID; +} + +impl ChainWithMessages for BridgeHubPaseo { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + WITH_BRIDGE_HUB_POLKAPAS_MESSAGES_PALLET_NAME; + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + +/// Identifier of BridgeHubPaseo in the Paseo relay chain. +pub const BRIDGE_HUB_POLKAPAS_PARACHAIN_ID: u32 = 1002; + +/// Name of the With-BridgeHubPaseo messages pallet instance that is deployed at bridged chains. +pub const WITH_BRIDGE_HUB_POLKAPAS_MESSAGES_PALLET_NAME: &str = "BridgePaseoMessages"; + +/// Name of the With-BridgeHubPaseo bridge-relayers pallet instance that is deployed at bridged +/// chains. +pub const WITH_BRIDGE_HUB_POLKAPAS_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; + +/// Pallet index of `BridgeKusamaMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_POLKAPAS_TO_KUSAMA_MESSAGES_PALLET_INDEX: u8 = 53; + +decl_bridge_finality_runtime_apis!(bridge_hub_paseo); +decl_bridge_messages_runtime_apis!(bridge_hub_paseo); + +frame_support::parameter_types! { + /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Paseo + /// BridgeHub. + /// (initially was calculated by test `BridgeHubPaseo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubPaseoBaseXcmFeeInDots: Balance = 177_594_900; + + /// Transaction fee that is paid at the Paseo BridgeHub for delivering single inbound message. + /// (initially was calculated by test `BridgeHubPaseo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) + pub const BridgeHubPaseoBaseDeliveryFeeInDots: Balance = 16_912_645_364; + + /// Transaction fee that is paid at the Paseo BridgeHub for delivering single outbound message confirmation. + /// (initially was calculated by test `BridgeHubPaseo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) + pub const BridgeHubPaseoBaseConfirmationFeeInDots: Balance = 16_142_774_864; +} + +/// Compute the total estimated fee that needs to be paid in PASs by the sender when sending +/// message from Paseo Bridge Hub to Kusama Bridge Hub. +pub fn estimate_paseo_to_kusama_message_fee( + bridge_hub_kusama_base_delivery_fee_in_uksms: Balance, +) -> Balance { + // Sender must pay: + // + // 1) an approximate cost of XCM execution (`ExportMessage` and surroundings) at Paseo bridge + // Hub; + // + // 2) the approximate cost of Paseo -> Kusama message delivery transaction on Kusama Bridge Hub, + // converted into KSMs using 1:5 conversion rate; + // + // 3) the approximate cost of Paseo -> Kusama message confirmation transaction on Paseo Bridge + // Hub. + BridgeHubPaseoBaseXcmFeeInDots::get() + .saturating_add(convert_from_uksm_to_udot(bridge_hub_kusama_base_delivery_fee_in_uksms)) + .saturating_add(BridgeHubPaseoBaseConfirmationFeeInDots::get()) +} + +/// Compute the per-byte fee that needs to be paid in PASs by the sender when sending +/// message from Paseo Bridge Hub to Kusama Bridge Hub. +pub fn estimate_paseo_to_kusama_byte_fee() -> Balance { + // the sender pays for the same byte twice: + // 1) the first part comes from the HRMP, when message travels from Paseo Asset Hub to Paseo + // Bridge Hub; + // 2) the second part is the payment for bytes of the message delivery transaction, which is + // "mined" at Kusama Bridge Hub. Hence, we need to use byte fees from that chain and convert + // it to PASs here. + convert_from_uksm_to_udot(paseo_runtime_constants::fee::TRANSACTION_BYTE_FEE) +} + +/// Convert from uKSMs to uPASs. +fn convert_from_uksm_to_udot(price_in_uksm: Balance) -> Balance { + // assuming exchange rate is 5 PASs for 1 KSM + let dot_to_ksm_economic_rate = FixedU128::from_rational(5, 1); + // tokens have different nominals and we need to take that into account + let nominal_ratio = FixedU128::from_rational( + paseo_runtime_constants::currency::UNITS, + kusama_runtime_constants::currency::UNITS, + ); + + dot_to_ksm_economic_rate + .saturating_mul(nominal_ratio) + .saturating_mul(FixedU128::saturating_from_integer(price_in_uksm)) + .into_inner() / + FixedU128::DIV +} -pub const BRIDGE_HUB_PASEO_PARACHAIN_ID: u32 = 1002; pub mod snowbridge { - use crate::Balance; - use frame_support::parameter_types; - use snowbridge_core::{PricingParameters, Rewards, U256}; - use sp_runtime::FixedU128; - use xcm::latest::NetworkId; + use crate::Balance; + use frame_support::parameter_types; + use snowbridge_core::{PricingParameters, Rewards, U256}; + use sp_runtime::FixedU128; + use xcm::latest::NetworkId; - parameter_types! { + parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. pub const CreateAssetCall: [u8;2] = [53, 0]; /// The pallet index of the Ethereum inbound queue pallet in the Bridge Hub runtime. pub const InboundQueuePalletInstance: u8 = 80; /// Default pricing parameters used to calculate bridging fees. Initialized to unit values, - /// as it is intended that these parameters should be updated with more - /// accurate values prior to bridge activation. This can be performed - /// using the `EthereumSystem::set_pricing_parameters` governance extrinsic. + /// as it is intended that these parameters should be updated with more + /// accurate values prior to bridge activation. This can be performed + /// using the `EthereumSystem::set_pricing_parameters` governance extrinsic. pub Parameters: PricingParameters = PricingParameters { // ETH/DOT exchange rate exchange_rate: FixedU128::from_rational(1, 1), @@ -54,9 +181,26 @@ pub mod snowbridge { 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. - /// - /// + /// to is the Ethereum Sepolia network, with chain ID 11155111. + /// + /// pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 11155111 }; } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn convert_from_uksm_to_udot_works() { + let price_in_uksm = 77 * kusama_runtime_constants::currency::UNITS; + let same_price_in_udot = convert_from_uksm_to_udot(price_in_uksm); + + let price_in_ksm = + FixedU128::from_rational(price_in_uksm, kusama_runtime_constants::currency::UNITS); + let price_in_dot = + FixedU128::from_rational(same_price_in_udot, paseo_runtime_constants::currency::UNITS); + assert_eq!(price_in_dot / FixedU128::saturating_from_integer(5), price_in_ksm); + } +} diff --git a/system-parachains/bridge-hub-paseo/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hub-paseo/src/bridge_to_ethereum_config.rs index 047f4b0..ccc15cd 100644 --- a/system-parachains/bridge-hub-paseo/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hub-paseo/src/bridge_to_ethereum_config.rs @@ -15,10 +15,10 @@ // along with Cumulus. If not, see . use crate::{ - xcm_config, - xcm_config::{RelayTreasuryPalletAccount, UniversalLocation}, - Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, - RuntimeEvent, TransactionByteFee, + xcm_config, + xcm_config::{RelayTreasuryPalletAccount, UniversalLocation}, + Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, + RuntimeEvent, TransactionByteFee, }; pub use bp_bridge_hub_paseo::snowbridge::EthereumNetwork; use bp_bridge_hub_paseo::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; @@ -34,10 +34,10 @@ use system_parachains_constants::paseo::fee::WeightToFee; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< - UniversalLocation, - EthereumNetwork, - snowbridge_pallet_outbound_queue::Pallet, - snowbridge_core::AgentIdOf, + UniversalLocation, + EthereumNetwork, + snowbridge_pallet_outbound_queue::Pallet, + snowbridge_core::AgentIdOf, >; parameter_types! { @@ -46,74 +46,74 @@ parameter_types! { } 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_paseo::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; + 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_paseo::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; + 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)))] +#[cfg(not(any(feature = "std", feature = "runtime-benchmarks", test)))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { - version: [144, 0, 0, 111], // 0x90000069 + version: [0, 0, 0, 0], // 0x00000000 epoch: 0, }, altair: Fork { - version: [144, 0, 0, 112], // 0x90000070 - epoch: 50, + version: [1, 0, 0, 0], // 0x01000000 + epoch: 74240, }, bellatrix: Fork { - version: [144, 0, 0, 113], // 0x90000071 - epoch: 100, + version: [2, 0, 0, 0], // 0x02000000 + epoch: 144896, }, capella: Fork { - version: [144, 0, 0, 114], // 0x90000072 - epoch: 56832, + version: [3, 0, 0, 0], // 0x03000000 + epoch: 194048, }, deneb: Fork { - version: [144, 0, 0, 115], // 0x90000073 - epoch: 132608, + version: [4, 0, 0, 0], // 0x04000000 + epoch: 269568, }, }; } -#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))] +#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] parameter_types! { pub const ChainForkVersions: ForkVersions = ForkVersions { genesis: Fork { @@ -139,91 +139,83 @@ parameter_types! { }; } -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; + type RuntimeEvent = RuntimeEvent; + type ForkVersions = ChainForkVersions; + 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; + 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)) - } - } + 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::BeaconHeader; + 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(beacon_header: BeaconHeader, block_roots_root: H256) { + EthereumBeaconClient::store_finalized_header(beacon_header, block_roots_root).unwrap(); + 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 - ); - } + 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-hub-paseo/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hub-paseo/src/bridge_to_kusama_config.rs new file mode 100644 index 0000000..90b352e --- /dev/null +++ b/system-parachains/bridge-hub-paseo/src/bridge_to_kusama_config.rs @@ -0,0 +1,430 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +//! Bridge definitions used for bridging with Kusama Bridge Hub. + +use crate::{ + weights, + xcm_config::{UniversalLocation, XcmRouter}, + AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, PolkadotXcm, Runtime, + RuntimeEvent, RuntimeOrigin, XcmOverBridgeHubKusama, +}; + +use bp_messages::LaneId; +use bp_parachains::SingleParaStoredHeaderDataBuilder; +use bp_runtime::Chain; +use bridge_runtime_common::{ + messages, + messages::{ + source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter}, + target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter}, + MessageBridge, ThisChainWithMessages, UnderlyingChainProvider, + }, + messages_xcm_extension::{ + SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, + XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, + }, + refund_relayer_extension::{ + ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, + RefundableMessagesLane, RefundableParachain, + }, +}; +use frame_support::{parameter_types, traits::PalletInfoAccess}; +use paseo_runtime_constants as constants; + +use sp_runtime::{traits::ConstU32, RuntimeDebug}; +use xcm::latest::prelude::*; +use xcm_builder::BridgeBlobDispatcher; + +/// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. +pub const XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA: LaneId = LaneId([0, 0, 0, 1]); + +// Parameters that may be changed by the governance. +parameter_types! { + /// Reward that is paid (by the Polkadot Asset Hub) to relayers for delivering a single + /// Polkadot -> Kusama bridge message. + /// + /// This payment is tracked by the `pallet_bridge_relayers` pallet at the Polkadot + /// Bridge Hub. + pub storage DeliveryRewardInBalance: Balance = constants::currency::UNITS / 2_000; + + /// Registered relayer stake. + /// + /// Any relayer may reserve this amount on his account and get a priority boost for his + /// message delivery transactions. In exchange, he risks losing his stake if he would + /// submit an invalid transaction. The set of such (registered) relayers is tracked + /// by the `pallet_bridge_relayers` pallet at the Polkadot Bridge Hub. + pub storage RequiredStakeForStakeAndSlash: Balance = 500 * constants::currency::UNITS; +} + +// Parameters, used by both XCM and bridge code. +parameter_types! { + /// Kusama Network identifier. + pub KusamaGlobalConsensusNetwork: NetworkId = NetworkId::Kusama; + /// Kusama Network as `Location`. + pub KusamaGlobalConsensusNetworkLocation: Location = Location { + parents: 2, + interior: [GlobalConsensus(KusamaGlobalConsensusNetwork::get())].into() + }; + /// Interior location (relative to this runtime) of the with-Kusama messages pallet. + pub BridgePolkadotToKusamaMessagesPalletInstance: InteriorLocation = PalletInstance(::index() as u8).into(); + + /// Identifier of the sibling Polkadot Asset Hub parachain. + pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = paseo_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Identifier of the bridged Kusama Asset Hub parachain. + pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); + /// Location of the bridged Kusama Bridge Hub parachain. + pub BridgeHubKusamaLocation: Location = Location { + parents: 2, + interior: [ + GlobalConsensus(KusamaGlobalConsensusNetwork::get()), + Parachain(::PARACHAIN_ID) + ].into() + }; + + /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub + /// message is following. + pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( + ParentThen(Parachain(AssetHubPolkadotParaId::get().into()).into()).into(), + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + ); + + /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. + pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId + = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; + /// All active lanes that the current bridge supports. + pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] + = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; + + /// Lanes + pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ + ( + FromAssetHubPolkadotToAssetHubKusamaRoute::get(), + (KusamaGlobalConsensusNetwork::get(), Parachain(AssetHubKusamaParaId::get().into()).into()) + ) + ]; +} + +// Parameters, used by bridge transport code. +parameter_types! { + /// Number of Kusama headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const RelayChainHeadersToKeep: u32 = 1_200; + /// Number of Kusama Bridge Hub headers to keep in the runtime storage. + /// + /// Note that we are keeping only required header information, not the whole header itself. Roughly, it + /// is the 2 hours of real time (assuming that every header is submitted). + pub const ParachainHeadsToKeep: u32 = 600; + /// Maximal size of Kusama Bridge Hub header **part** that we are storing in the runtime storage. + pub const MaxParaHeadDataSize: u32 = bp_kusama::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE; + + /// Bridge specific chain (network) identifier of the Kusama Bridge Hub. + pub const BridgeHubKusamaChainId: bp_runtime::ChainId = bp_bridge_hub_kusama::BridgeHubKusama::ID; + /// Name of the `paras` pallet at Kusama that tracks all parachain heads. + pub const ParachainPalletNameAtKusama: &'static str = bp_kusama::PARAS_PALLET_NAME; + + /// Maximal number of entries in the unrewarded relayers vector at the Polkadot Bridge Hub. It matches the + /// maximal number of unrewarded relayers that the single confirmation transaction at Kusama Bridge + /// Hub may process. + pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + /// Maximal number of unconfirmed messages at the Polkadot Bridge Hub. It matches the maximal number of + /// uncinfirmed messages that the single confirmation transaction at Kusama Bridge Hub may process. + pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = + bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; + + /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. + pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; + /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. + pub const RelayerStakeLease: u32 = 300; + /// Priority boost that the registered relayer receives for every additional message in the message + /// delivery transaction. + /// + /// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the + /// meaning of this value + pub PriorityBoostPerMessage: u64 = 1_820_444_444_444; +} + +/// Add GRANDPA bridge pallet to track Kusama relay chain. +pub type BridgeGrandpaKusamaInstance = pallet_bridge_grandpa::Instance1; +impl pallet_bridge_grandpa::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type BridgedChain = bp_kusama::Kusama; + type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; + type HeadersToKeep = RelayChainHeadersToKeep; + type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo; +} + +/// Add parachain bridge pallet to track Kusama BridgeHub parachain. +pub type BridgeParachainKusamaInstance = pallet_bridge_parachains::Instance1; +impl pallet_bridge_parachains::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_parachains::WeightInfo; + type BridgesGrandpaPalletInstance = BridgeGrandpaKusamaInstance; + type ParasPalletName = ParachainPalletNameAtKusama; + type ParaStoredHeaderDataBuilder = + SingleParaStoredHeaderDataBuilder; + type HeadsToKeep = ParachainHeadsToKeep; + type MaxParaHeadDataSize = MaxParaHeadDataSize; +} + +/// Allows collect and claim rewards for relayers. +impl pallet_bridge_relayers::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reward = Balance; + type PaymentProcedure = + bp_relayers::PayRewardFromAccount, AccountId>; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + RequiredStakeForStakeAndSlash, + RelayerStakeLease, + >; + type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; +} + +/// Add XCM messages support for exchanging messages with BridgeHubKusama. +pub type WithBridgeHubKusamaMessagesInstance = pallet_bridge_messages::Instance1; +impl pallet_bridge_messages::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_bridge_messages::WeightInfo; + type BridgedChainId = BridgeHubKusamaChainId; + type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubKusama; + type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; + type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; + + type MaximalOutboundPayloadSize = ToBridgeHubKusamaMaximalOutboundPayloadSize; + type OutboundPayload = XcmAsPlainPayload; + + type InboundPayload = XcmAsPlainPayload; + type InboundRelayer = AccountId; + type DeliveryPayments = (); + + type TargetHeaderChain = TargetHeaderChainAdapter; + type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< + Runtime, + WithBridgeHubKusamaMessagesInstance, + DeliveryRewardInBalance, + >; + + type SourceHeaderChain = SourceHeaderChainAdapter; + type MessageDispatch = XcmBlobMessageDispatch< + FromKusamaMessageBlobDispatcher, + Self::WeightInfo, + cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider< + AssetHubPolkadotParaId, + Runtime, + >, + >; + type OnMessagesDelivered = OnMessagesDeliveredFromKusama; +} + +/// Proof of messages, coming from Kusama. +pub type FromKusamaBridgeHubMessagesProof = + FromBridgedChainMessagesProof; +/// Messages delivery proof for Polkadot Bridge Hub -> Kusama Bridge Hub messages. +pub type ToKusamaBridgeHubMessagesDeliveryProof = + FromBridgedChainMessagesDeliveryProof; + +/// Dispatches received XCM messages from Kusama BridgeHub. +type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< + XcmRouter, + UniversalLocation, + BridgePolkadotToKusamaMessagesPalletInstance, +>; + +/// Export XCM messages to be relayed to the other side +pub type ToBridgeHubKusamaHaulBlobExporter = XcmOverBridgeHubKusama; +pub struct ToBridgeHubKusamaXcmBlobHauler; +impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { + type Runtime = Runtime; + type MessagesInstance = WithBridgeHubKusamaMessagesInstance; + + type ToSourceChainSender = XcmRouter; + type CongestedMessage = bp_asset_hub_paseo::CongestedMessage; + type UncongestedMessage = bp_asset_hub_paseo::UncongestedMessage; +} + +/// Add support for the export and dispatch of XCM programs. +pub type XcmOverBridgeHubKusamaInstance = pallet_xcm_bridge_hub::Instance1; +impl pallet_xcm_bridge_hub::Config for Runtime { + type UniversalLocation = UniversalLocation; + type BridgedNetwork = KusamaGlobalConsensusNetworkLocation; + type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; + // `MessageExportPrice` is simply propagated to the inner `xcm_builder::HaulBlobExporter`, and + // we do not need or want to add any additional price for exporting here, as it is already + // covered by the measured weight of the `ExportMessage` instruction. + type MessageExportPrice = (); + type DestinationVersion = XcmVersionOfDestAndRemoteBridge; + type Lanes = ActiveLanes; + type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; +} + +/// On messages delivered callback. +type OnMessagesDeliveredFromKusama = + XcmBlobHaulerAdapter; + +/// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama +pub struct WithBridgeHubKusamaMessageBridge; +impl MessageBridge for WithBridgeHubKusamaMessageBridge { + const BRIDGED_MESSAGES_PALLET_NAME: &'static str = + bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME; + type ThisChain = BridgeHubPolkadot; + type BridgedChain = BridgeHubKusama; + type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< + Runtime, + BridgeParachainKusamaInstance, + bp_bridge_hub_kusama::BridgeHubKusama, + >; +} + +/// Maximal outbound payload size of BridgeHubPolkadot -> BridgeHubKusama messages. +pub type ToBridgeHubKusamaMaximalOutboundPayloadSize = + messages::source::FromThisChainMaximalOutboundPayloadSize; + +/// BridgeHubKusama chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubKusama; + +impl UnderlyingChainProvider for BridgeHubKusama { + type Chain = bp_bridge_hub_kusama::BridgeHubKusama; +} + +impl messages::BridgedChainWithMessages for BridgeHubKusama {} + +/// BridgeHubPolkadot chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct BridgeHubPolkadot; + +impl UnderlyingChainProvider for BridgeHubPolkadot { + type Chain = bp_bridge_hub_paseo::BridgeHubPaseo; +} + +impl ThisChainWithMessages for BridgeHubPolkadot { + type RuntimeOrigin = RuntimeOrigin; +} + +/// Signed extension that refunds relayers that are delivering messages from the Kusama parachain. +pub type RefundBridgeHubKusamaMessages = RefundSignedExtensionAdapter< + RefundBridgedParachainMessages< + Runtime, + RefundableParachain, + RefundableMessagesLane< + WithBridgeHubKusamaMessagesInstance, + AssetHubPolkadotToAssetHubKusamaMessagesLane, + >, + ActualFeeRefund, + PriorityBoostPerMessage, + StrRefundBridgeHubKusamaMessages, + >, +>; +bp_runtime::generate_static_str_provider!(RefundBridgeHubKusamaMessages); + +#[cfg(test)] +mod tests { + use super::*; + use bridge_runtime_common::{ + assert_complete_bridge_types, + integrity::{ + assert_complete_bridge_constants, check_message_lane_weights, + AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants, + AssertCompleteBridgeConstants, + }, + }; + + /// Every additional message in the message delivery transaction boosts its priority. + /// So the priority of transaction with `N+1` messages is larger than priority of + /// transaction with `N` messages by the `PriorityBoostPerMessage`. + /// + /// Economically, it is an equivalent of adding tip to the transaction with `N` messages. + /// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip. + /// + /// We want this tip to be large enough (delivery transactions with more messages = less + /// operational costs and a faster bridge), so this value should be significant. + const FEE_BOOST_PER_MESSAGE: Balance = 2 * constants::currency::UNITS; + + #[test] + fn ensure_bridge_hub_polkadot_message_lane_weights_are_correct() { + check_message_lane_weights::< + bp_bridge_hub_polkadot::BridgeHubPolkadot, + Runtime, + WithBridgeHubKusamaMessagesInstance, + >( + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE, + bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + true, + ); + } + + #[test] + fn ensure_bridge_integrity() { + assert_complete_bridge_types!( + runtime: Runtime, + with_bridged_chain_grandpa_instance: BridgeGrandpaKusamaInstance, + with_bridged_chain_messages_instance: WithBridgeHubKusamaMessagesInstance, + bridge: WithBridgeHubKusamaMessageBridge, + this_chain: bp_polkadot::Polkadot, + bridged_chain: bp_kusama::Kusama, + ); + + assert_complete_bridge_constants::< + Runtime, + BridgeGrandpaKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, + >(AssertCompleteBridgeConstants { + this_chain_constants: AssertChainConstants { + block_length: bp_bridge_hub_polkadot::BlockLength::get(), + block_weights: bp_bridge_hub_polkadot::BlockWeights::get(), + }, + messages_pallet_constants: AssertBridgeMessagesPalletConstants { + max_unrewarded_relayers_in_bridged_confirmation_tx: + bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + max_unconfirmed_messages_in_bridged_confirmation_tx: + bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + bridged_chain_id: bp_bridge_hub_kusama::BridgeHubKusama::ID, + }, + pallet_names: AssertBridgePalletNames { + with_this_chain_messages_pallet_name: + bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME, + with_bridged_chain_grandpa_pallet_name: bp_kusama::WITH_KUSAMA_GRANDPA_PALLET_NAME, + with_bridged_chain_messages_pallet_name: + bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME, + }, + }); + + bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::< + Runtime, + WithBridgeHubKusamaMessagesInstance, + PriorityBoostPerMessage, + >(FEE_BOOST_PER_MESSAGE); + + assert_eq!( + BridgePolkadotToKusamaMessagesPalletInstance::get(), + Into::::into(PalletInstance( + bp_bridge_hub_polkadot::WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX + )) + ); + + assert!(BridgeHubKusamaLocation::get() + .starts_with(&KusamaGlobalConsensusNetworkLocation::get())); + } +} diff --git a/system-parachains/bridge-hub-paseo/src/lib.rs b/system-parachains/bridge-hub-paseo/src/lib.rs index 7778068..7c3d0e6 100644 --- a/system-parachains/bridge-hub-paseo/src/lib.rs +++ b/system-parachains/bridge-hub-paseo/src/lib.rs @@ -23,26 +23,27 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); pub mod bridge_to_ethereum_config; +pub mod bridge_to_kusama_config; mod weights; pub mod xcm_config; use bridge_hub_common::message_queue::{ - AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, + AggregateMessageOrigin, NarrowOriginToSibling, ParaIdToSibling, }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; use cumulus_primitives_core::ParaId; use snowbridge_core::{ - outbound::{Command, Fee}, - AgentId, PricingParameters, + outbound::{Command, Fee}, + AgentId, PricingParameters, }; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, - transaction_validity::{TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, + create_runtime_str, generic, impl_opaque_keys, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + transaction_validity::{TransactionSource, TransactionValidity}, + ApplyExtrinsicResult, }; use sp_std::prelude::*; @@ -51,34 +52,34 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use frame_support::{ - construct_runtime, - dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, - parameter_types, - traits::{ - tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, - Everything, TransformOrigin, - }, - weights::{ConstantMultiplier, Weight}, - PalletId, + construct_runtime, + dispatch::DispatchClass, + genesis_builder_helper::{build_config, create_default_config}, + parameter_types, + traits::{ + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, TransformOrigin, + }, + weights::{ConstantMultiplier, Weight}, + PalletId, }; use frame_system::{ - limits::{BlockLength, BlockWeights}, - EnsureRoot, + limits::{BlockLength, BlockWeights}, + EnsureRoot, }; 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, StakingPot, XcmOriginToTransactDispatchOrigin, + FellowshipLocation, GovernanceLocation, StakingPot, XcmOriginToTransactDispatchOrigin, }; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; // Polkadot imports -use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use paseo_runtime_constants::system_parachain::{ASSET_HUB_ID, BRIDGE_HUB_ID}; +use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; @@ -86,8 +87,8 @@ use parachains_common::{AccountId, Balance, BlockNumber, Hash, Header, Nonce, Si pub use system_parachains_constants::SLOT_DURATION; use system_parachains_constants::{ - paseo::{consensus::*, currency::*, fee::WeightToFee}, - AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, + paseo::{consensus::*, currency::*, fee::WeightToFee}, + AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, }; // XCM Imports @@ -107,20 +108,32 @@ pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckEra, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, - frame_metadata_hash_extension::CheckMetadataHash, + frame_system::CheckNonZeroSender, + frame_system::CheckSpecVersion, + frame_system::CheckTxVersion, + frame_system::CheckGenesis, + frame_system::CheckEra, + frame_system::CheckNonce, + frame_system::CheckWeight, + pallet_transaction_payment::ChargeTransactionPayment, + BridgeRejectObsoleteHeadersAndMessages, + bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + frame_metadata_hash_extension::CheckMetadataHash, ); +bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { + RuntimeCall, AccountId, + // Grandpa + BridgeKusamaGrandpa, + // Parachains + BridgeKusamaParachains, + // Messages + BridgeKusamaMessages +} + /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = -generic::UncheckedExtrinsic; + generic::UncheckedExtrinsic; parameter_types! { pub DmpQueueName: &'static str = "DmpQueue"; @@ -128,27 +141,27 @@ parameter_types! { /// Migrations to apply on runtime upgrade. pub type Migrations = ( - // unreleased - frame_support::migrations::RemovePallet, - cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, - snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< - Runtime, - ConstU32, - ConstU32, - >, - pallet_collator_selection::migration::v2::MigrationToV2, - // permanent - pallet_xcm::migration::MigrateToLatestXcmVersion, + // unreleased + frame_support::migrations::RemovePallet, + cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, + snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< + Runtime, + ConstU32, + ConstU32, + >, + pallet_collator_selection::migration::v2::MigrationToV2, + // permanent + pallet_xcm::migration::MigrateToLatestXcmVersion, ); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Migrations, + Runtime, + Block, + frame_system::ChainContext, + Runtime, + AllPalletsWithSystem, + Migrations, >; impl_opaque_keys! { @@ -159,20 +172,20 @@ impl_opaque_keys! { #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("bridge-hub-polkadot"), - impl_name: create_runtime_str!("bridge-hub-polkadot"), - authoring_version: 1, - spec_version: 1_001_006, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 4, - state_version: 1, + spec_name: create_runtime_str!("bridge-hub-paseo"), + impl_name: create_runtime_str!("bridge-hub-paseo"), + authoring_version: 1, + spec_version: 1_002_008, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 4, + state_version: 1, }; /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } + NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } } parameter_types! { @@ -203,64 +216,64 @@ parameter_types! { // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; - /// The index type for storing how many extrinsics an account has signed. - type Nonce = Nonce; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The block type. - type Block = Block; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type RuntimeTask = RuntimeTask; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Runtime version. - type Version = Version; - /// Converts a module to an index of this module in the runtime. - type PalletInfo = PalletInfo; - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The basic call filter to use in dispatchable. - type BaseCallFilter = Everything; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = weights::frame_system::WeightInfo; - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; - type SS58Prefix = SS58Prefix; - /// The action to take on a Runtime Upgrade - type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; - type MaxConsumers = ConstU32<16>; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type RuntimeCall = RuntimeCall; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Nonce = Nonce; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The block type. + type Block = Block; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type RuntimeTask = RuntimeTask; + /// The ubiquitous origin type. + type RuntimeOrigin = RuntimeOrigin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// Runtime version. + type Version = Version; + /// Converts a module to an index of this module in the runtime. + type PalletInfo = PalletInfo; + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// The basic call filter to use in dispatchable. + type BaseCallFilter = Everything; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = weights::frame_system::WeightInfo; + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + type SS58Prefix = SS58Prefix; + /// The action to take on a Runtime Upgrade + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; + type MaxConsumers = ConstU32<16>; } impl pallet_timestamp::Config for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; - type WeightInfo = weights::pallet_timestamp::WeightInfo; + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; + type WeightInfo = weights::pallet_timestamp::WeightInfo; } impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (CollatorSelection,); + type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = (CollatorSelection,); } parameter_types! { @@ -268,36 +281,36 @@ parameter_types! { } impl pallet_balances::Config for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - type DustRemoval = (); - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type RuntimeFreezeReason = RuntimeFreezeReason; - type FreezeIdentifier = (); - type MaxFreezes = ConstU32<0>; + /// The type for recording an account's balance. + type Balance = Balance; + type DustRemoval = (); + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = weights::pallet_balances::WeightInfo; + type MaxLocks = ConstU32<50>; + type MaxReserves = ConstU32<50>; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; } parameter_types! { /// Relay Chain `TransactionByteFee` / 10 - pub const TransactionByteFee: Balance = MILLICENTS; + pub const TransactionByteFee: Balance = system_parachains_constants::paseo::fee::TRANSACTION_BYTE_FEE; } impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = - pallet_transaction_payment::FungibleAdapter>; - type OperationalFeeMultiplier = ConstU8<5>; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; + type RuntimeEvent = RuntimeEvent; + type OnChargeTransaction = + pallet_transaction_payment::FungibleAdapter>; + type OperationalFeeMultiplier = ConstU8<5>; + type WeightToFee = WeightToFee; + type LengthToFee = ConstantMultiplier; + type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; } parameter_types! { @@ -307,62 +320,62 @@ parameter_types! { } impl cumulus_pallet_parachain_system::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnSystemEvent = (); - type SelfParaId = parachain_info::Pallet; - type OutboundXcmpMessageSource = XcmpQueue; - type DmpQueue = frame_support::traits::EnqueueWithOrigin; - type ReservedDmpWeight = ReservedDmpWeight; - type XcmpMessageHandler = XcmpQueue; - type ReservedXcmpWeight = ReservedXcmpWeight; - type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; - type ConsensusHook = ConsensusHook; - type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type OnSystemEvent = (); + type SelfParaId = parachain_info::Pallet; + type OutboundXcmpMessageSource = XcmpQueue; + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + type ReservedDmpWeight = ReservedDmpWeight; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases; + type ConsensusHook = ConsensusHook; + type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< - Runtime, - RELAY_CHAIN_SLOT_DURATION_MILLIS, - BLOCK_PROCESSING_VELOCITY, - UNINCLUDED_SEGMENT_CAPACITY, + Runtime, + RELAY_CHAIN_SLOT_DURATION_MILLIS, + BLOCK_PROCESSING_VELOCITY, + UNINCLUDED_SEGMENT_CAPACITY, >; impl parachain_info::Config for Runtime {} parameter_types! { /// Amount of weight that can be spent per block to service messages. This was increased - /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client - /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes - /// the sync committee's pubkeys (512 x 48 bytes). + /// from 35% to 60% of the max block weight to accommodate the Ethereum beacon light client + /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes + /// the sync committee's pubkeys (512 x 48 bytes). pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_message_queue::WeightInfo; - // Use the NoopMessageProcessor exclusively for benchmarks, not for tests with the - // runtime-benchmarks feature as tests require the BridgeHubMessageRouter to process messages. - // The "test" feature flag doesn't work, hence the reliance on the "std" feature, which is - // enabled during tests. - #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; - #[cfg(not(all(not(feature = "std"), feature = "runtime-benchmarks")))] - type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter< - xcm_builder::ProcessXcmMessage< - AggregateMessageOrigin, - xcm_executor::XcmExecutor, - RuntimeCall, - >, - EthereumOutboundQueue, - >; - type Size = u32; - // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: - type QueueChangeHandler = NarrowOriginToSibling; - type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; - type ServiceWeight = MessageQueueServiceWeight; + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_message_queue::WeightInfo; + // Use the NoopMessageProcessor exclusively for benchmarks, not for tests with the + // runtime-benchmarks feature as tests require the BridgeHubMessageRouter to process messages. + // The "test" feature flag doesn't work, hence the reliance on the "std" feature, which is + // enabled during tests. + #[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))] + type MessageProcessor = + pallet_message_queue::mock_helpers::NoopMessageProcessor; + #[cfg(not(all(not(feature = "std"), feature = "runtime-benchmarks")))] + type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter< + xcm_builder::ProcessXcmMessage< + AggregateMessageOrigin, + xcm_executor::XcmExecutor, + RuntimeCall, + >, + EthereumOutboundQueue, + >; + type Size = u32; + // The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin: + type QueueChangeHandler = NarrowOriginToSibling; + type QueuePausedQuery = NarrowOriginToSibling; + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + type ServiceWeight = MessageQueueServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -379,59 +392,59 @@ parameter_types! { /// Privileged origin that represents Root or Fellows. pub type RootOrFellows = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, + EnsureRoot, + EnsureXcm>, >; pub type PriceForSiblingParachainDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< - FeeAssetId, - ToSiblingBaseDeliveryFee, - TransactionByteFee, - XcmpQueue, + FeeAssetId, + ToSiblingBaseDeliveryFee, + TransactionByteFee, + XcmpQueue, >; pub type PriceForParentDelivery = polkadot_runtime_common::xcm_sender::ExponentialPrice< - FeeAssetId, - ToParentBaseDeliveryFee, - TransactionByteFee, - ParachainSystem, + FeeAssetId, + ToParentBaseDeliveryFee, + TransactionByteFee, + ParachainSystem, >; impl cumulus_pallet_xcmp_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ChannelInfo = ParachainSystem; - type VersionWrapper = PolkadotXcm; - // Enqueue XCMP messages from siblings for later processing. - type XcmpQueue = TransformOrigin; - type MaxInboundSuspended = sp_core::ConstU32<1_000>; - type ControllerOrigin = RootOrFellows; - type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; - type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; + type RuntimeEvent = RuntimeEvent; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + // Enqueue XCMP messages from siblings for later processing. + type XcmpQueue = TransformOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; + type ControllerOrigin = RootOrFellows; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = pallet_collator_selection::IdentityCollator; - type ShouldEndSession = pallet_session::PeriodicSessions, ConstU32>; - type NextSessionRotation = pallet_session::PeriodicSessions, ConstU32>; - type SessionManager = CollatorSelection; - // Essentially just Aura, but let's be pedantic. - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = weights::pallet_session::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions, ConstU32>; + type NextSessionRotation = pallet_session::PeriodicSessions, ConstU32>; + type SessionManager = CollatorSelection; + // Essentially just Aura, but let's be pedantic. + type SessionHandler = ::KeyTypeIdProviders; + type Keys = SessionKeys; + type WeightInfo = weights::pallet_session::WeightInfo; } impl pallet_aura::Config for Runtime { - type AuthorityId = AuraId; - type DisabledValidators = (); - type MaxAuthorities = ConstU32<100_000>; - type AllowMultipleBlocksPerSlot = ConstBool; - type SlotDuration = ConstU64; + type AuthorityId = AuraId; + type DisabledValidators = (); + type MaxAuthorities = ConstU32<100_000>; + type AllowMultipleBlocksPerSlot = ConstBool; + type SlotDuration = ConstU64; } parameter_types! { @@ -443,24 +456,24 @@ parameter_types! { /// We allow root, the StakingAdmin to execute privileged collator selection operations. pub type CollatorSelectionUpdateOrigin = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, + EnsureRoot, + EnsureXcm>, >; impl pallet_collator_selection::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type UpdateOrigin = CollatorSelectionUpdateOrigin; - type PotId = PotId; - type MaxCandidates = ConstU32<100>; - type MinEligibleCollators = ConstU32<4>; - type MaxInvulnerables = ConstU32<20>; - // should be a multiple of session or things will get inconsistent - type KickThreshold = ConstU32; - type ValidatorId = ::AccountId; - type ValidatorIdOf = pallet_collator_selection::IdentityCollator; - type ValidatorRegistration = Session; - type WeightInfo = weights::pallet_collator_selection::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type UpdateOrigin = CollatorSelectionUpdateOrigin; + type PotId = PotId; + type MaxCandidates = ConstU32<100>; + type MinEligibleCollators = ConstU32<4>; + type MaxInvulnerables = ConstU32<20>; + // should be a multiple of session or things will get inconsistent + type KickThreshold = ConstU32; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_collator_selection::IdentityCollator; + type ValidatorRegistration = Session; + type WeightInfo = weights::pallet_collator_selection::WeightInfo; } parameter_types! { @@ -471,20 +484,20 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = ConstU32<100>; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = ConstU32<100>; + type WeightInfo = weights::pallet_multisig::WeightInfo; } impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = weights::pallet_utility::WeightInfo; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = weights::pallet_utility::WeightInfo; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -518,6 +531,15 @@ construct_runtime!( Utility: pallet_utility = 40, Multisig: pallet_multisig = 41, + // Pallets that may be used by all bridges. + BridgeRelayers: pallet_bridge_relayers = 50, + + // Kusama bridge pallets. + BridgeKusamaGrandpa: pallet_bridge_grandpa:: = 51, + BridgeKusamaParachains: pallet_bridge_parachains:: = 52, + BridgeKusamaMessages: pallet_bridge_messages:: = 53, + XcmOverBridgeHubKusama: pallet_xcm_bridge_hub:: = 54, + // Ethereum bridge pallets. EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, EthereumOutboundQueue: snowbridge_pallet_outbound_queue = 81, @@ -532,7 +554,7 @@ construct_runtime!( #[cfg(feature = "runtime-benchmarks")] mod benches { - frame_benchmarking::define_benchmarks!( + frame_benchmarking::define_benchmarks!( [frame_system, SystemBench::] [pallet_balances, Balances] [pallet_message_queue, MessageQueue] @@ -548,6 +570,12 @@ mod benches { // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] + // Shared bridge pallets + [pallet_bridge_relayers, BridgeRelayersBench::] + // Paseo bridge pallets. + [pallet_bridge_grandpa, KusamaFinality] + [pallet_bridge_parachains, KusamaParachains] + [pallet_bridge_messages, KusamaMessages] // Ethereum Bridge [snowbridge_pallet_inbound_queue, EthereumInboundQueue] [snowbridge_pallet_outbound_queue, EthereumOutboundQueue] @@ -719,6 +747,50 @@ impl_runtime_apis! { } } + impl bp_kusama::KusamaFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgeKusamaGrandpa::best_finalized() + } + + fn synced_headers_grandpa_info( + ) -> Vec> { + BridgeKusamaGrandpa::synced_headers_grandpa_info() + } + } + + impl bp_bridge_hub_kusama::BridgeHubKusamaFinalityApi for Runtime { + fn best_finalized() -> Option> { + BridgeKusamaParachains::best_parachain_head_id::< + bp_bridge_hub_kusama::BridgeHubKusama + >().unwrap_or(None) + } + } + + impl bp_bridge_hub_kusama::FromBridgeHubKusamaInboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, + ) -> Vec { + bridge_runtime_common::messages_api::inbound_message_details::< + Runtime, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >(lane, messages) + } + } + + impl bp_bridge_hub_kusama::ToBridgeHubKusamaOutboundLaneApi for Runtime { + fn message_details( + lane: bp_messages::LaneId, + begin: bp_messages::MessageNonce, + end: bp_messages::MessageNonce, + ) -> Vec { + bridge_runtime_common::messages_api::outbound_message_details::< + Runtime, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >(lane, begin, end) + } + } + impl snowbridge_outbound_queue_runtime_api::OutboundQueueApi for Runtime { fn prove_message(leaf_index: u64) -> Option { snowbridge_pallet_outbound_queue::api::prove_message::(leaf_index) @@ -772,6 +844,11 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench; + type KusamaFinality = BridgeKusamaGrandpa; + type KusamaParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type KusamaMessages = pallet_bridge_messages::benchmarking::Pallet::; + let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -913,10 +990,6 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn export_message_origin_and_destination() -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { - Err(BenchmarkError::Skip) - } - fn worst_case_asset_exchange() -> Result<(Assets, Assets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -951,7 +1024,7 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - /*fn export_message_origin_and_destination( + fn export_message_origin_and_destination( ) -> Result<(Location, NetworkId, InteriorLocation), BenchmarkError> { // save XCM version for remote bridge hub let _ = PolkadotXcm::force_xcm_version( @@ -975,7 +1048,7 @@ impl_runtime_apis! { Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into()).into() ) ) - }*/ + } fn alias_origin() -> Result<(Location, Location), BenchmarkError> { Err(BenchmarkError::Skip) @@ -985,6 +1058,114 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + type KusamaFinality = BridgeKusamaGrandpa; + type KusamaParachains = pallet_bridge_parachains::benchmarking::Pallet::; + type KusamaMessages = pallet_bridge_messages::benchmarking::Pallet::; + + use pallet_bridge_relayers::benchmarking::{ + Pallet as BridgeRelayersBench, + Config as BridgeRelayersConfig, + }; + + impl BridgeRelayersConfig for Runtime { + fn prepare_rewards_account( + account_params: bp_relayers::RewardsAccountParams, + reward: Balance, + ) { + let rewards_account = bp_relayers::PayRewardFromAccount::< + Balances, + AccountId + >::rewards_account(account_params); + Self::deposit_account(rewards_account, reward); + } + + fn deposit_account(account: AccountId, balance: Balance) { + use frame_support::traits::fungible::Mutate; + Balances::mint_into(&account, balance.saturating_add(ExistentialDeposit::get())).unwrap(); + } + } + + use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof; + use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig; + + impl BridgeParachainsConfig for Runtime { + fn parachains() -> Vec { + use bp_runtime::Parachain; + vec![bp_paseo_core::parachains::ParaId(bp_bridge_hub_kusama::BridgeHubKusama::PARACHAIN_ID)] + } + + fn prepare_parachain_heads_proof( + parachains: &[bp_paseo_core::parachains::ParaId], + parachain_head_size: u32, + proof_size: bp_runtime::StorageProofSize, + ) -> ( + pallet_bridge_parachains::RelayBlockNumber, + pallet_bridge_parachains::RelayBlockHash, + bp_paseo_core::parachains::ParaHeadsProof, + Vec<(bp_paseo_core::parachains::ParaId, bp_paseo_core::parachains::ParaHash)>, + ) { + prepare_parachain_heads_proof::( + parachains, + parachain_head_size, + proof_size, + ) + } + } + + use bridge_runtime_common::messages_benchmarking::{ + prepare_message_delivery_proof_from_parachain, + prepare_message_proof_from_parachain, + generate_xcm_builder_bridge_message_sample, + }; + use pallet_bridge_messages::benchmarking::{ + Config as BridgeMessagesConfig, + MessageDeliveryProofParams, + MessageProofParams, + }; + + impl BridgeMessagesConfig for Runtime { + fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { + let bench_lane_id = >::bench_lane_id(); + let bridged_chain_id = bridge_to_kusama_config::BridgeHubKusamaChainId::get(); + pallet_bridge_relayers::Pallet::::relayer_reward( + relayer, + bp_relayers::RewardsAccountParams::new( + bench_lane_id, + bridged_chain_id, + bp_relayers::RewardsAccountOwner::BridgedChain + ) + ).is_some() + } + + fn prepare_message_proof( + params: MessageProofParams, + ) -> (bridge_to_kusama_config::FromKusamaBridgeHubMessagesProof, Weight) { + use cumulus_primitives_core::XcmpMessageSource; + assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); + ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + prepare_message_proof_from_parachain::< + Runtime, + bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, + >(params, generate_xcm_builder_bridge_message_sample([GlobalConsensus(Paseo), Parachain(42)].into())) + } + + fn prepare_message_delivery_proof( + params: MessageDeliveryProofParams, + ) -> bridge_to_kusama_config::ToKusamaBridgeHubMessagesDeliveryProof { + prepare_message_delivery_proof_from_parachain::< + Runtime, + bridge_to_kusama_config::BridgeGrandpaKusamaInstance, + bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, + >(params) + } + + fn is_message_successfully_dispatched(_nonce: bp_messages::MessageNonce) -> bool { + use cumulus_primitives_core::XcmpMessageSource; + !XcmpQueue::take_outbound_messages(usize::MAX).is_empty() + } + } + let whitelist: Vec = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), @@ -1014,12 +1195,12 @@ cumulus_pallet_parachain_system::register_validate_block! { #[cfg(test)] mod tests { - use super::*; - - #[test] - fn test_transasction_byte_fee_is_one_tenth_of_relay() { - let relay_tbf = paseo_runtime_constants::fee::TRANSACTION_BYTE_FEE; - let parachain_tbf = TransactionByteFee::get(); - assert_eq!(relay_tbf / 10, parachain_tbf); - } + use super::*; + + #[test] + fn test_transasction_byte_fee_is_one_tenth_of_relay() { + let relay_tbf = paseo_runtime_constants::fee::TRANSACTION_BYTE_FEE; + let parachain_tbf = TransactionByteFee::get(); + assert_eq!(relay_tbf / 10, parachain_tbf); + } } diff --git a/system-parachains/bridge-hub-paseo/src/weights/block_weights.rs b/system-parachains/bridge-hub-paseo/src/weights/block_weights.rs index c2824b5..e7fdb2a 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/block_weights.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(10_000_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs index f6fab7f..8de264a 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_parachain_system.rs @@ -13,27 +13,26 @@ // 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 `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_parachain_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -60,13 +59,13 @@ impl cumulus_pallet_parachain_system::WeightInfo for We /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84` + // Measured: `49` // Estimated: `3517` - // Minimum execution time: 2_453_000 picoseconds. - Weight::from_parts(2_553_000, 0) + // Minimum execution time: 2_140_000 picoseconds. + Weight::from_parts(2_185_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 349_908 - .saturating_add(Weight::from_parts(207_948_706, 0).saturating_mul(n.into())) + // Standard Error: 21_644 + .saturating_add(Weight::from_parts(197_577_584, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs index 099c6c2..74396c6 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/cumulus_pallet_xcmp_queue.rs @@ -13,27 +13,26 @@ // 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 `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_675_000 picoseconds. - Weight::from_parts(3_947_000, 0) + // Minimum execution time: 3_732_000 picoseconds. + Weight::from_parts(3_909_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,10 +70,10 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: - // Measured: `118` + // Measured: `82` // Estimated: `3517` - // Minimum execution time: 9_726_000 picoseconds. - Weight::from_parts(10_236_000, 0) + // Minimum execution time: 9_834_000 picoseconds. + Weight::from_parts(10_241_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -85,8 +84,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 2_604_000 picoseconds. - Weight::from_parts(2_794_000, 0) + // Minimum execution time: 2_291_000 picoseconds. + Weight::from_parts(2_400_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -97,8 +96,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `111` // Estimated: `1596` - // Minimum execution time: 3_576_000 picoseconds. - Weight::from_parts(3_796_000, 0) + // Minimum execution time: 3_158_000 picoseconds. + Weight::from_parts(3_394_000, 0) .saturating_add(Weight::from_parts(0, 1596)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,8 +106,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_469_000 picoseconds. - Weight::from_parts(5_578_000, 0) + // Minimum execution time: 6_037_000 picoseconds. + Weight::from_parts(6_277_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -127,11 +126,11 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65747` - // Estimated: `69212` - // Minimum execution time: 103_916_000 picoseconds. - Weight::from_parts(107_673_000, 0) - .saturating_add(Weight::from_parts(0, 69212)) + // Measured: `65711` + // Estimated: `69176` + // Minimum execution time: 114_520_000 picoseconds. + Weight::from_parts(115_984_000, 0) + .saturating_add(Weight::from_parts(0, 69176)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -143,8 +142,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65710` // Estimated: `69175` - // Minimum execution time: 50_415_000 picoseconds. - Weight::from_parts(52_088_000, 0) + // Minimum execution time: 52_150_000 picoseconds. + Weight::from_parts(53_802_000, 0) .saturating_add(Weight::from_parts(0, 69175)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/bridge-hub-paseo/src/weights/extrinsic_weights.rs b/system-parachains/bridge-hub-paseo/src/weights/extrinsic_weights.rs index 10c7bbf..1a4adb9 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/extrinsic_weights.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/extrinsic_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(250_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/system-parachains/bridge-hub-paseo/src/weights/frame_system.rs b/system-parachains/bridge-hub-paseo/src/weights/frame_system.rs index a123053..3364c45 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/frame_system.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/frame_system.rs @@ -13,27 +13,26 @@ // 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 `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=frame_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,22 +51,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_212_000 picoseconds. - Weight::from_parts(44_195_073, 0) + // Minimum execution time: 1_582_000 picoseconds. + Weight::from_parts(1_665_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(274, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(389, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_359_000 picoseconds. - Weight::from_parts(121_418_736, 0) + // Minimum execution time: 4_627_000 picoseconds. + Weight::from_parts(4_783_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_520, 0).saturating_mul(b.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_803, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -77,8 +76,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 2_143_000 picoseconds. - Weight::from_parts(3_195_000, 0) + // Minimum execution time: 2_856_000 picoseconds. + Weight::from_parts(3_097_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,11 +96,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `164` - // Estimated: `1649` - // Minimum execution time: 78_647_864_000 picoseconds. - Weight::from_parts(83_016_370_000, 0) - .saturating_add(Weight::from_parts(0, 1649)) + // Measured: `165` + // Estimated: `1650` + // Minimum execution time: 103_204_469_000 picoseconds. + Weight::from_parts(106_838_413_000, 0) + .saturating_add(Weight::from_parts(0, 1650)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -112,11 +111,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_232_000 picoseconds. - Weight::from_parts(1_282_000, 0) + // Minimum execution time: 1_619_000 picoseconds. + Weight::from_parts(1_672_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_519 - .saturating_add(Weight::from_parts(741_851, 0).saturating_mul(i.into())) + // Standard Error: 2_464 + .saturating_add(Weight::from_parts(760_804, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -126,11 +125,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_252_000 picoseconds. - Weight::from_parts(1_352_000, 0) + // Minimum execution time: 1_570_000 picoseconds. + Weight::from_parts(1_665_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_981 - .saturating_add(Weight::from_parts(555_408, 0).saturating_mul(i.into())) + // Standard Error: 1_141 + .saturating_add(Weight::from_parts(566_279, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,13 +137,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84 + p * (69 ±0)` - // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 2_654_000 picoseconds. - Weight::from_parts(4_180_974, 0) - .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 9_488 - .saturating_add(Weight::from_parts(1_069_154, 0).saturating_mul(p.into())) + // Measured: `67 + p * (69 ±0)` + // Estimated: `73 + p * (70 ±0)` + // Minimum execution time: 3_205_000 picoseconds. + Weight::from_parts(3_365_000, 0) + .saturating_add(Weight::from_parts(0, 73)) + // Standard Error: 2_155 + .saturating_add(Weight::from_parts(1_185_589, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -155,8 +154,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_214_000 picoseconds. - Weight::from_parts(10_786_000, 0) + // Minimum execution time: 15_605_000 picoseconds. + Weight::from_parts(17_404_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,11 +175,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn apply_authorized_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `186` - // Estimated: `1671` - // Minimum execution time: 88_156_678_000 picoseconds. - Weight::from_parts(96_636_141_000, 0) - .saturating_add(Weight::from_parts(0, 1671)) + // Measured: `187` + // Estimated: `1672` + // Minimum execution time: 107_348_957_000 picoseconds. + Weight::from_parts(110_261_219_000, 0) + .saturating_add(Weight::from_parts(0, 1672)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/system-parachains/bridge-hub-paseo/src/weights/mod.rs b/system-parachains/bridge-hub-paseo/src/weights/mod.rs index e096a70..a1871c2 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/mod.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/mod.rs @@ -17,12 +17,22 @@ //! Expose the auto generated weight files. +use crate::Runtime; +use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt; +use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt; +use ::pallet_bridge_relayers::WeightInfoExt as _; +use frame_support::weights::Weight; + pub mod block_weights; pub mod cumulus_pallet_parachain_system; pub mod cumulus_pallet_xcmp_queue; pub mod extrinsic_weights; pub mod frame_system; pub mod pallet_balances; +pub mod pallet_bridge_grandpa; +pub mod pallet_bridge_messages; +pub mod pallet_bridge_parachains; +pub mod pallet_bridge_relayers; pub mod pallet_collator_selection; pub mod pallet_message_queue; pub mod pallet_multisig; @@ -41,3 +51,24 @@ pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; pub use rocksdb_weights::constants::RocksDbWeight; + +impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE + } + + fn receive_messages_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_proof_overhead_from_runtime( + ) + } + + fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight { + pallet_bridge_relayers::WeightInfo::::receive_messages_delivery_proof_overhead_from_runtime() + } +} + +impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo { + fn expected_extra_storage_proof_size() -> u32 { + bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE + } +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_balances.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_balances.rs index bae1870..77531fa 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_balances.rs @@ -13,27 +13,26 @@ // 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 `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_986_000 picoseconds. - Weight::from_parts(38_007_000, 0) + // Minimum execution time: 43_393_000 picoseconds. + Weight::from_parts(45_025_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +64,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 28_975_000 picoseconds. - Weight::from_parts(29_834_000, 0) + // Minimum execution time: 34_858_000 picoseconds. + Weight::from_parts(35_951_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +76,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 10_596_000 picoseconds. - Weight::from_parts(10_856_000, 0) + // Minimum execution time: 12_526_000 picoseconds. + Weight::from_parts(12_906_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +88,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_772_000 picoseconds. - Weight::from_parts(15_252_000, 0) + // Minimum execution time: 17_279_000 picoseconds. + Weight::from_parts(17_652_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,8 +100,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 38_938_000 picoseconds. - Weight::from_parts(40_060_000, 0) + // Minimum execution time: 45_702_000 picoseconds. + Weight::from_parts(46_632_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -113,8 +112,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_975_000 picoseconds. - Weight::from_parts(37_576_000, 0) + // Minimum execution time: 43_725_000 picoseconds. + Weight::from_parts(44_663_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -125,8 +124,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_040_000 picoseconds. - Weight::from_parts(13_390_000, 0) + // Minimum execution time: 15_261_000 picoseconds. + Weight::from_parts(15_780_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -138,11 +137,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 12_439_000 picoseconds. - Weight::from_parts(12_629_000, 0) + // Minimum execution time: 14_617_000 picoseconds. + Weight::from_parts(14_952_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 49_710 - .saturating_add(Weight::from_parts(12_855_431, 0).saturating_mul(u.into())) + // Standard Error: 16_825 + .saturating_add(Weight::from_parts(13_796_847, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) @@ -153,8 +152,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1501` - // Minimum execution time: 3_845_000 picoseconds. - Weight::from_parts(4_436_000, 0) + // Minimum execution time: 4_962_000 picoseconds. + Weight::from_parts(5_234_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_grandpa.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_grandpa.rs new file mode 100644 index 0000000..b0c2d02 --- /dev/null +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_grandpa.rs @@ -0,0 +1,77 @@ +// 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 +// +// 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 `pallet_bridge_grandpa` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! 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/production/polkadot +// benchmark +// pallet +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_bridge_grandpa +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_bridge_grandpa`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_grandpa::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaGrandpa::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::BestFinalized` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::CurrentAuthoritySet` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHashesPointer` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHashes` (r:1 w:1) + /// Proof: `BridgeKusamaGrandpa::ImportedHashes` (`max_values`: Some(1200), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:0 w:2) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 838]`. + /// The range of component `v` is `[50, 100]`. + fn submit_finality_proof(p: u32, v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `302 + p * (60 ±0)` + // Estimated: `51735` + // Minimum execution time: 304_219_000 picoseconds. + Weight::from_parts(38_797_291, 0) + .saturating_add(Weight::from_parts(0, 51735)) + // Standard Error: 5_837 + .saturating_add(Weight::from_parts(55_270_177, 0).saturating_mul(p.into())) + // Standard Error: 97_366 + .saturating_add(Weight::from_parts(2_496_036, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(5)) + } +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_messages.rs new file mode 100644 index 0000000..1246e47 --- /dev/null +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_messages.rs @@ -0,0 +1,240 @@ +// 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 +// +// 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 `pallet_bridge_messages` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! 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/production/polkadot +// benchmark +// pallet +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_bridge_messages +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_bridge_messages`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_messages::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `562` + // Estimated: `52645` + // Minimum execution time: 39_459_000 picoseconds. + Weight::from_parts(41_009_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_two_messages_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `562` + // Estimated: `52645` + // Minimum execution time: 50_372_000 picoseconds. + Weight::from_parts(51_775_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + fn receive_single_message_proof_with_outbound_lane_state() -> Weight { + // Proof Size summary in bytes: + // Measured: `562` + // Estimated: `52645` + // Minimum execution time: 44_166_000 picoseconds. + Weight::from_parts(45_680_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_1_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `52645` + // Minimum execution time: 38_320_000 picoseconds. + Weight::from_parts(39_403_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + fn receive_single_message_proof_16_kb() -> Weight { + // Proof Size summary in bytes: + // Measured: `530` + // Estimated: `52645` + // Minimum execution time: 69_386_000 picoseconds. + Weight::from_parts(72_218_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_single_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `432` + // Estimated: `3897` + // Minimum execution time: 32_734_000 picoseconds. + Weight::from_parts(33_370_000, 0) + .saturating_add(Weight::from_parts(0, 3897)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { + // Proof Size summary in bytes: + // Measured: `432` + // Estimated: `3897` + // Minimum execution time: 32_343_000 picoseconds. + Weight::from_parts(33_614_000, 0) + .saturating_add(Weight::from_parts(0, 3897)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) + /// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { + // Proof Size summary in bytes: + // Measured: `432` + // Estimated: `6086` + // Minimum execution time: 37_146_000 picoseconds. + Weight::from_parts(38_228_000, 0) + .saturating_add(Weight::from_parts(0, 6086)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, 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: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) + /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) + /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) + /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) + /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) + /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[128, 2048]`. + fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `731` + // Estimated: `52645` + // Minimum execution time: 62_066_000 picoseconds. + Weight::from_parts(63_215_134, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 84 + .saturating_add(Weight::from_parts(9_324, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_parachains.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_parachains.rs new file mode 100644 index 0000000..ded28f3 --- /dev/null +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_parachains.rs @@ -0,0 +1,110 @@ +// 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 +// +// 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 `pallet_bridge_parachains` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! 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/production/polkadot +// benchmark +// pallet +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_bridge_parachains +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_bridge_parachains`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_parachains::WeightInfo for WeightInfo { + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// The range of component `p` is `[1, 2]`. + fn submit_parachain_heads_with_n_parachains(_p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `2543` + // Minimum execution time: 31_197_000 picoseconds. + Weight::from_parts(32_362_159, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_1kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `2543` + // Minimum execution time: 32_948_000 picoseconds. + Weight::from_parts(33_517_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeKusamaParachains::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaGrandpa::ImportedHeaders` (r:1 w:0) + /// Proof: `BridgeKusamaGrandpa::ImportedHeaders` (`max_values`: Some(1200), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ParasInfo` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHashes` (r:1 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHashes` (`max_values`: Some(600), `max_size`: Some(64), added: 1549, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:0 w:1) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + fn submit_parachain_heads_with_16kb_proof() -> Weight { + // Proof Size summary in bytes: + // Measured: `388` + // Estimated: `2543` + // Minimum execution time: 61_509_000 picoseconds. + Weight::from_parts(62_413_000, 0) + .saturating_add(Weight::from_parts(0, 2543)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_relayers.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_relayers.rs new file mode 100644 index 0000000..c859feb --- /dev/null +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_bridge_relayers.rs @@ -0,0 +1,121 @@ +// 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 +// +// 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 `pallet_bridge_relayers` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! 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/production/polkadot +// benchmark +// pallet +// --chain=./bridge-hub-polkadot-chain-spec.json +// --steps=50 +// --repeat=20 +// --pallet=pallet_bridge_relayers +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./bridge-hub-polkadot-weights/ +// --header=./file_header.txt + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_bridge_relayers`. +pub struct WeightInfo(PhantomData); +impl pallet_bridge_relayers::WeightInfo for WeightInfo { + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn claim_rewards() -> Weight { + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `3593` + // Minimum execution time: 43_509_000 picoseconds. + Weight::from_parts(44_237_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn register() -> Weight { + // Proof Size summary in bytes: + // Measured: `115` + // Estimated: `4714` + // Minimum execution time: 22_745_000 picoseconds. + Weight::from_parts(22_970_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + fn deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `231` + // Estimated: `4714` + // Minimum execution time: 24_959_000 picoseconds. + Weight::from_parts(25_262_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1) + /// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`) + /// Storage: `Balances::Reserves` (r:1 w:1) + /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn slash_and_deregister() -> Weight { + // Proof Size summary in bytes: + // Measured: `334` + // Estimated: `4714` + // Minimum execution time: 27_353_000 picoseconds. + Weight::from_parts(27_970_000, 0) + .saturating_add(Weight::from_parts(0, 4714)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) + /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + fn register_relayer_reward() -> Weight { + // Proof Size summary in bytes: + // Measured: `76` + // Estimated: `3538` + // Minimum execution time: 5_110_000 picoseconds. + Weight::from_parts(5_473_000, 0) + .saturating_add(Weight::from_parts(0, 3538)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_collator_selection.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_collator_selection.rs index f5eb0da..b3032f4 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_collator_selection.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_collator_selection.rs @@ -13,27 +13,26 @@ // 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 `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -56,11 +55,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `196 + b * (79 ±0)` // Estimated: `1187 + b * (2555 ±0)` - // Minimum execution time: 8_683_000 picoseconds. - Weight::from_parts(7_287_414, 0) + // Minimum execution time: 11_117_000 picoseconds. + Weight::from_parts(8_246_810, 0) .saturating_add(Weight::from_parts(0, 1187)) - // Standard Error: 12_385 - .saturating_add(Weight::from_parts(2_826_094, 0).saturating_mul(b.into())) + // Standard Error: 5_915 + .saturating_add(Weight::from_parts(3_144_195, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -79,13 +78,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `794 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 30_106_000 picoseconds. - Weight::from_parts(34_394_275, 0) + // Minimum execution time: 37_811_000 picoseconds. + Weight::from_parts(36_633_430, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 31_833 - .saturating_add(Weight::from_parts(36_601, 0).saturating_mul(b.into())) - // Standard Error: 6_034 - .saturating_add(Weight::from_parts(139_478, 0).saturating_mul(c.into())) + // Standard Error: 8_479 + .saturating_add(Weight::from_parts(103_826, 0).saturating_mul(b.into())) + // Standard Error: 1_607 + .saturating_add(Weight::from_parts(208_295, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -100,11 +99,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 8_262_000 picoseconds. - Weight::from_parts(6_380_993, 0) + // Minimum execution time: 10_858_000 picoseconds. + Weight::from_parts(10_475_537, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 14_585 - .saturating_add(Weight::from_parts(366_470, 0).saturating_mul(b.into())) + // Standard Error: 3_699 + .saturating_add(Weight::from_parts(186_563, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +113,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_135_000 picoseconds. - Weight::from_parts(3_425_000, 0) + // Minimum execution time: 3_944_000 picoseconds. + Weight::from_parts(4_182_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -133,13 +132,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + c * (182 ±0) + k * (115 ±0)` // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` - // Minimum execution time: 7_612_000 picoseconds. - Weight::from_parts(7_792_000, 0) + // Minimum execution time: 9_067_000 picoseconds. + Weight::from_parts(9_253_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(5_084_810, 0).saturating_mul(c.into())) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(4_826_091, 0).saturating_mul(k.into())) + // Standard Error: 154_915 + .saturating_add(Weight::from_parts(5_263_487, 0).saturating_mul(c.into())) + // Standard Error: 154_915 + .saturating_add(Weight::from_parts(4_895_475, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) @@ -156,11 +155,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `319 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 19_259_000 picoseconds. - Weight::from_parts(24_163_743, 0) + // Minimum execution time: 23_358_000 picoseconds. + Weight::from_parts(24_896_978, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_063 - .saturating_add(Weight::from_parts(100_427, 0).saturating_mul(c.into())) + // Standard Error: 1_437 + .saturating_add(Weight::from_parts(174_963, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -179,11 +178,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `764 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 24_887_000 picoseconds. - Weight::from_parts(30_444_592, 0) + // Minimum execution time: 31_865_000 picoseconds. + Weight::from_parts(34_284_692, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_059 - .saturating_add(Weight::from_parts(160_728, 0).saturating_mul(c.into())) + // Standard Error: 2_054 + .saturating_add(Weight::from_parts(199_851, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -205,11 +204,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `904 + c * (53 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_891_000 picoseconds. - Weight::from_parts(45_664_305, 0) + // Minimum execution time: 45_978_000 picoseconds. + Weight::from_parts(50_228_169, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_782 - .saturating_add(Weight::from_parts(145_773, 0).saturating_mul(c.into())) + // Standard Error: 3_771 + .saturating_add(Weight::from_parts(256_148, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -225,11 +224,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `347 + c * (48 ±0)` // Estimated: `6287` - // Minimum execution time: 21_492_000 picoseconds. - Weight::from_parts(24_715_893, 0) + // Minimum execution time: 26_577_000 picoseconds. + Weight::from_parts(28_803_953, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 6_042 - .saturating_add(Weight::from_parts(140_303, 0).saturating_mul(c.into())) + // Standard Error: 2_445 + .saturating_add(Weight::from_parts(203_453, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -243,8 +242,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 33_530_000 picoseconds. - Weight::from_parts(51_207_000, 0) + // Minimum execution time: 36_982_000 picoseconds. + Weight::from_parts(38_073_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -267,11 +266,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 14_521_000 picoseconds. - Weight::from_parts(14_894_000, 0) + // Minimum execution time: 17_745_000 picoseconds. + Weight::from_parts(18_102_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 275_017 - .saturating_add(Weight::from_parts(12_614_016, 0).saturating_mul(c.into())) + // Standard Error: 278_847 + .saturating_add(Weight::from_parts(12_401_027, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_message_queue.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_message_queue.rs index da13b11..31b3eef 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_message_queue.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_message_queue.rs @@ -13,27 +13,26 @@ // 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 `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_message_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +52,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_686_000 picoseconds. - Weight::from_parts(11_016_000, 0) + // Minimum execution time: 11_107_000 picoseconds. + Weight::from_parts(11_518_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,10 +66,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `255` + // Measured: `218` // Estimated: `6044` - // Minimum execution time: 9_324_000 picoseconds. - Weight::from_parts(9_874_000, 0) + // Minimum execution time: 9_834_000 picoseconds. + Weight::from_parts(10_234_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,10 +78,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `6` // Estimated: `3517` - // Minimum execution time: 4_176_000 picoseconds. - Weight::from_parts(4_407_000, 0) + // Minimum execution time: 3_083_000 picoseconds. + Weight::from_parts(3_247_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,10 +90,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_789_000 picoseconds. - Weight::from_parts(6_069_000, 0) + // Minimum execution time: 4_871_000 picoseconds. + Weight::from_parts(5_047_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -103,10 +102,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_969_000 picoseconds. - Weight::from_parts(6_240_000, 0) + // Minimum execution time: 4_915_000 picoseconds. + Weight::from_parts(5_151_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -119,8 +118,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 167_292_000 picoseconds. - Weight::from_parts(172_399_000, 0) + // Minimum execution time: 165_777_000 picoseconds. + Weight::from_parts(167_796_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -130,10 +129,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `171` // Estimated: `3517` - // Minimum execution time: 6_310_000 picoseconds. - Weight::from_parts(6_680_000, 0) + // Minimum execution time: 6_379_000 picoseconds. + Weight::from_parts(6_774_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,10 +143,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 40_250_000 picoseconds. - Weight::from_parts(41_033_000, 0) + // Minimum execution time: 53_159_000 picoseconds. + Weight::from_parts(54_840_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -158,10 +157,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 57_636_000 picoseconds. - Weight::from_parts(58_778_000, 0) + // Minimum execution time: 69_395_000 picoseconds. + Weight::from_parts(71_393_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -172,10 +171,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 104_918_000 picoseconds. - Weight::from_parts(109_534_000, 0) + // Minimum execution time: 108_749_000 picoseconds. + Weight::from_parts(110_284_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_multisig.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_multisig.rs index 77bf8d4..c8a2127 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_multisig.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_multisig.rs @@ -13,27 +13,26 @@ // 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 `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,11 +51,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_547_000 picoseconds. - Weight::from_parts(13_504_530, 0) + // Minimum execution time: 12_689_000 picoseconds. + Weight::from_parts(13_444_130, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 43 - .saturating_add(Weight::from_parts(363, 0).saturating_mul(z.into())) + // Standard Error: 10 + .saturating_add(Weight::from_parts(523, 0).saturating_mul(z.into())) } /// Storage: `Multisig::Multisigs` (r:1 w:1) /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) @@ -66,13 +65,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 33_590_000 picoseconds. - Weight::from_parts(37_534_149, 0) + // Minimum execution time: 37_849_000 picoseconds. + Weight::from_parts(27_193_990, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_735 - .saturating_add(Weight::from_parts(94_337, 0).saturating_mul(s.into())) - // Standard Error: 65 - .saturating_add(Weight::from_parts(96, 0).saturating_mul(z.into())) + // Standard Error: 1_079 + .saturating_add(Weight::from_parts(124_966, 0).saturating_mul(s.into())) + // Standard Error: 10 + .saturating_add(Weight::from_parts(1_428, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -84,13 +83,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 21_943_000 picoseconds. - Weight::from_parts(23_127_449, 0) + // Minimum execution time: 25_182_000 picoseconds. + Weight::from_parts(15_769_176, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 5_815 - .saturating_add(Weight::from_parts(32_010, 0).saturating_mul(s.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(975, 0).saturating_mul(z.into())) + // Standard Error: 687 + .saturating_add(Weight::from_parts(109_978, 0).saturating_mul(s.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_429, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,13 +103,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 35_183_000 picoseconds. - Weight::from_parts(22_693_078, 0) + // Minimum execution time: 43_583_000 picoseconds. + Weight::from_parts(30_311_181, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 7_571 - .saturating_add(Weight::from_parts(192_205, 0).saturating_mul(s.into())) - // Standard Error: 74 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(z.into())) + // Standard Error: 1_428 + .saturating_add(Weight::from_parts(162_543, 0).saturating_mul(s.into())) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_499, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -121,11 +120,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 20_701_000 picoseconds. - Weight::from_parts(21_204_358, 0) + // Minimum execution time: 25_753_000 picoseconds. + Weight::from_parts(26_202_739, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_948 - .saturating_add(Weight::from_parts(119_886, 0).saturating_mul(s.into())) + // Standard Error: 746 + .saturating_add(Weight::from_parts(117_420, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,11 +135,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 11_627_000 picoseconds. - Weight::from_parts(12_970_988, 0) + // Minimum execution time: 14_634_000 picoseconds. + Weight::from_parts(15_097_279, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_773 - .saturating_add(Weight::from_parts(96_009, 0).saturating_mul(s.into())) + // Standard Error: 882 + .saturating_add(Weight::from_parts(104_968, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -151,11 +150,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 22_315_000 picoseconds. - Weight::from_parts(26_544_895, 0) + // Minimum execution time: 27_390_000 picoseconds. + Weight::from_parts(28_089_652, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_172 - .saturating_add(Weight::from_parts(76_388, 0).saturating_mul(s.into())) + // Standard Error: 1_148 + .saturating_add(Weight::from_parts(117_661, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_session.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_session.rs index dbc3ef9..e6f4ddd 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_session.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_session.rs @@ -13,27 +13,26 @@ // 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 `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -55,8 +54,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `297` // Estimated: `3762` - // Minimum execution time: 12_839_000 picoseconds. - Weight::from_parts(14_412_000, 0) + // Minimum execution time: 16_086_000 picoseconds. + Weight::from_parts(16_408_000, 0) .saturating_add(Weight::from_parts(0, 3762)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,8 +68,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `279` // Estimated: `3744` - // Minimum execution time: 8_893_000 picoseconds. - Weight::from_parts(9_354_000, 0) + // Minimum execution time: 11_659_000 picoseconds. + Weight::from_parts(12_146_000, 0) .saturating_add(Weight::from_parts(0, 3744)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_timestamp.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_timestamp.rs index 51c4dfa..134e91e 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_timestamp.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_timestamp.rs @@ -13,27 +13,26 @@ // 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 `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +52,10 @@ impl pallet_timestamp::WeightInfo for WeightInfo { /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `86` + // Measured: `49` // Estimated: `1493` - // Minimum execution time: 5_498_000 picoseconds. - Weight::from_parts(5_858_000, 0) + // Minimum execution time: 5_255_000 picoseconds. + Weight::from_parts(5_440_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +64,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_473_000 picoseconds. - Weight::from_parts(2_614_000, 0) + // Minimum execution time: 2_715_000 picoseconds. + Weight::from_parts(2_799_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_utility.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_utility.rs index 06ca92f..d5710cd 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_utility.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_utility.rs @@ -13,27 +13,26 @@ // 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 `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,18 +51,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_074_000 picoseconds. - Weight::from_parts(3_155_000, 0) + // Minimum execution time: 3_734_000 picoseconds. + Weight::from_parts(3_845_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 14_227 - .saturating_add(Weight::from_parts(3_461_383, 0).saturating_mul(c.into())) + // Standard Error: 1_146 + .saturating_add(Weight::from_parts(2_680_845, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_025_000 picoseconds. - Weight::from_parts(3_165_000, 0) + // Minimum execution time: 3_649_000 picoseconds. + Weight::from_parts(3_904_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -71,18 +70,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_034_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 3_814_000 picoseconds. + Weight::from_parts(5_289_496, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 30_865 - .saturating_add(Weight::from_parts(3_998_927, 0).saturating_mul(c.into())) + // Standard Error: 1_640 + .saturating_add(Weight::from_parts(2_869_794, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_486_000 picoseconds. - Weight::from_parts(5_618_000, 0) + // Minimum execution time: 5_532_000 picoseconds. + Weight::from_parts(5_790_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -90,10 +89,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_145_000 picoseconds. - Weight::from_parts(3_886_000, 0) + // Minimum execution time: 3_849_000 picoseconds. + Weight::from_parts(9_068_821, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 25_226 - .saturating_add(Weight::from_parts(3_512_146, 0).saturating_mul(c.into())) + // Standard Error: 3_039 + .saturating_add(Weight::from_parts(2_634_416, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/bridge-hub-paseo/src/weights/pallet_xcm.rs b/system-parachains/bridge-hub-paseo/src/weights/pallet_xcm.rs index 71c3a68..76eff73 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/pallet_xcm.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/pallet_xcm.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./bridge-hub-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -61,11 +60,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 16_224_000 picoseconds. - Weight::from_parts(17_216_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 19_634_000 picoseconds. + Weight::from_parts(20_057_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -79,7 +78,7 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -87,50 +86,26 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `111` + // Measured: `107` // Estimated: `3593` - // Minimum execution time: 80_631_000 picoseconds. - Weight::from_parts(83_485_000, 0) + // Minimum execution time: 77_202_000 picoseconds. + Weight::from_parts(79_538_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) - /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) - /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `333` - // Estimated: `6196` - // Minimum execution time: 100_521_000 picoseconds. - Weight::from_parts(103_285_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) @@ -139,19 +114,21 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `514` - // Estimated: `6208` - // Minimum execution time: 120_672_000 picoseconds. - Weight::from_parts(127_021_000, 0) - .saturating_add(Weight::from_parts(0, 6208)) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(7)) + // Measured: `107` + // Estimated: `3593` + // Minimum execution time: 77_293_000 picoseconds. + Weight::from_parts(78_958_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -169,8 +146,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_597_000 picoseconds. - Weight::from_parts(4_828_000, 0) + // Minimum execution time: 5_894_000 picoseconds. + Weight::from_parts(6_160_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,8 +157,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_452_000 picoseconds. - Weight::from_parts(1_552_000, 0) + // Minimum execution time: 1_946_000 picoseconds. + Weight::from_parts(2_031_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -205,11 +182,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 20_471_000 picoseconds. - Weight::from_parts(23_495_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 25_360_000 picoseconds. + Weight::from_parts(25_956_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -231,11 +208,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `329` - // Estimated: `3794` - // Minimum execution time: 23_616_000 picoseconds. - Weight::from_parts(31_567_000, 0) - .saturating_add(Weight::from_parts(0, 3794)) + // Measured: `293` + // Estimated: `3758` + // Minimum execution time: 28_338_000 picoseconds. + Weight::from_parts(28_958_000, 0) + .saturating_add(Weight::from_parts(0, 3758)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -245,8 +222,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_442_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 1_898_000 picoseconds. + Weight::from_parts(2_035_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -254,11 +231,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `125` - // Estimated: `13490` - // Minimum execution time: 17_036_000 picoseconds. - Weight::from_parts(17_616_000, 0) - .saturating_add(Weight::from_parts(0, 13490)) + // Measured: `89` + // Estimated: `13454` + // Minimum execution time: 16_115_000 picoseconds. + Weight::from_parts(16_440_000, 0) + .saturating_add(Weight::from_parts(0, 13454)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -266,11 +243,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `129` - // Estimated: `13494` - // Minimum execution time: 17_026_000 picoseconds. - Weight::from_parts(18_638_000, 0) - .saturating_add(Weight::from_parts(0, 13494)) + // Measured: `93` + // Estimated: `13458` + // Minimum execution time: 16_214_000 picoseconds. + Weight::from_parts(16_600_000, 0) + .saturating_add(Weight::from_parts(0, 13458)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -278,11 +255,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `15980` - // Minimum execution time: 27_461_000 picoseconds. - Weight::from_parts(27_962_000, 0) - .saturating_add(Weight::from_parts(0, 15980)) + // Measured: `106` + // Estimated: `15946` + // Minimum execution time: 18_542_000 picoseconds. + Weight::from_parts(19_436_000, 0) + .saturating_add(Weight::from_parts(0, 15946)) .saturating_add(T::DbWeight::get().reads(6)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) @@ -301,11 +278,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `6118` - // Minimum execution time: 20_291_000 picoseconds. - Weight::from_parts(23_094_000, 0) - .saturating_add(Weight::from_parts(0, 6118)) + // Measured: `143` + // Estimated: `6083` + // Minimum execution time: 25_126_000 picoseconds. + Weight::from_parts(25_924_000, 0) + .saturating_add(Weight::from_parts(0, 6083)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -313,22 +290,22 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: - // Measured: `172` - // Estimated: `11062` - // Minimum execution time: 11_238_000 picoseconds. - Weight::from_parts(11_838_000, 0) - .saturating_add(Weight::from_parts(0, 11062)) + // Measured: `136` + // Estimated: `11026` + // Minimum execution time: 10_789_000 picoseconds. + Weight::from_parts(11_131_000, 0) + .saturating_add(Weight::from_parts(0, 11026)) .saturating_add(T::DbWeight::get().reads(4)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `136` - // Estimated: `13501` - // Minimum execution time: 17_176_000 picoseconds. - Weight::from_parts(18_297_000, 0) - .saturating_add(Weight::from_parts(0, 13501)) + // Measured: `100` + // Estimated: `13465` + // Minimum execution time: 16_310_000 picoseconds. + Weight::from_parts(16_904_000, 0) + .saturating_add(Weight::from_parts(0, 13465)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -348,11 +325,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `13543` - // Minimum execution time: 28_643_000 picoseconds. - Weight::from_parts(44_347_000, 0) - .saturating_add(Weight::from_parts(0, 13543)) + // Measured: `143` + // Estimated: `13508` + // Minimum execution time: 33_444_000 picoseconds. + Weight::from_parts(34_343_000, 0) + .saturating_add(Weight::from_parts(0, 13508)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -362,11 +339,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn new_query() -> Weight { // Proof Size summary in bytes: - // Measured: `69` - // Estimated: `1554` - // Minimum execution time: 4_427_000 picoseconds. - Weight::from_parts(4_687_000, 0) - .saturating_add(Weight::from_parts(0, 1554)) + // Measured: `32` + // Estimated: `1517` + // Minimum execution time: 3_397_000 picoseconds. + Weight::from_parts(3_528_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -374,11 +351,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn take_response() -> Weight { // Proof Size summary in bytes: - // Measured: `7706` - // Estimated: `11171` - // Minimum execution time: 24_687_000 picoseconds. - Weight::from_parts(39_109_000, 0) - .saturating_add(Weight::from_parts(0, 11171)) + // Measured: `7669` + // Estimated: `11134` + // Minimum execution time: 23_354_000 picoseconds. + Weight::from_parts(23_823_000, 0) + .saturating_add(Weight::from_parts(0, 11134)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -386,11 +363,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `126` - // Estimated: `3591` - // Minimum execution time: 32_107_000 picoseconds. - Weight::from_parts(37_496_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 33_922_000 picoseconds. + Weight::from_parts(34_433_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_ethereum_client.rs index 991971e..4a2eeb7 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_ethereum_client.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_ethereum_client.rs @@ -13,12 +13,13 @@ // 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 32.0.0 -//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-07-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -60,19 +61,17 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for /// 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: `114` // Estimated: `3501` - // Minimum execution time: 101_311_912_000 picoseconds. - Weight::from_parts(131_940_680_300, 0) + // Minimum execution time: 121_085_131_000 picoseconds. + Weight::from_parts(121_259_783_000, 0) .saturating_add(Weight::from_parts(0, 3501)) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(9)) + .saturating_add(T::DbWeight::get().writes(8)) } /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) @@ -80,8 +79,6 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for /// 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) @@ -92,10 +89,10 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for // Proof Size summary in bytes: // Measured: `92787` // Estimated: `93857` - // Minimum execution time: 25_164_795_000 picoseconds. - Weight::from_parts(32_798_197_900, 0) + // Minimum execution time: 31_330_152_000 picoseconds. + Weight::from_parts(31_359_573_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().reads(6)) } /// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0) /// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) @@ -103,8 +100,6 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for /// 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) @@ -115,34 +110,10 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for // Proof Size summary in bytes: // Measured: `92787` // Estimated: `93857` - // Minimum execution time: 126_786_733_000 picoseconds. - Weight::from_parts(165_017_398_000, 0) + // Minimum execution time: 152_429_993_000 picoseconds. + Weight::from_parts(152_677_694_000, 0) .saturating_add(Weight::from_parts(0, 93857)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// 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: `418` - // Estimated: `3537` - // Minimum execution time: 88_695_000 picoseconds. - Weight::from_parts(120_429_400, 0) - .saturating_add(Weight::from_parts(0, 3537)) .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(1)) } -} +} \ No newline at end of file diff --git a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_inbound_queue.rs b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_inbound_queue.rs index 196aec1..b9cf0dc 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_inbound_queue.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_inbound_queue.rs @@ -13,12 +13,13 @@ // 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 32.0.0 -//! DATE: 2024-03-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-07-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 // Executed Command: @@ -48,8 +49,10 @@ pub struct WeightInfo(PhantomData); impl snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo { /// 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: `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: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) /// Proof: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0) /// Storage: `EthereumSystem::Channels` (r:1 w:0) @@ -62,12 +65,12 @@ impl snowbridge_pallet_inbound_queue::WeightInfo for We /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn submit() -> Weight { // Proof Size summary in bytes: - // Measured: `815` - // Estimated: `4280` - // Minimum execution time: 104_849_000 picoseconds. - Weight::from_parts(140_211_500, 0) - .saturating_add(Weight::from_parts(0, 4280)) - .saturating_add(T::DbWeight::get().reads(7)) + // Measured: `768` + // Estimated: `4233` + // Minimum execution time: 175_861_000 picoseconds. + Weight::from_parts(178_291_000, 0) + .saturating_add(Weight::from_parts(0, 4233)) + .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_outbound_queue.rs b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_outbound_queue.rs index 681feda..0f554e6 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_outbound_queue.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_outbound_queue.rs @@ -59,7 +59,7 @@ impl snowbridge_pallet_outbound_queue::WeightInfo for W // Measured: `81` // Estimated: `3513` // Minimum execution time: 28_111_000 picoseconds. - Weight::from_parts(37_141_000, 0) + 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)) @@ -73,7 +73,7 @@ impl snowbridge_pallet_outbound_queue::WeightInfo for W // Measured: `1057` // Estimated: `2542` // Minimum execution time: 27_193_000 picoseconds. - Weight::from_parts(35_599_200, 0) + 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)) @@ -87,7 +87,7 @@ impl snowbridge_pallet_outbound_queue::WeightInfo for W // Measured: `64` // Estimated: `1549` // Minimum execution time: 7_062_000 picoseconds. - Weight::from_parts(9_530_300, 0) + 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-hub-paseo/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_system.rs index 086d054..4db436f 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_system.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/snowbridge_pallet_system.rs @@ -61,7 +61,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `219` // Estimated: `3601` // Minimum execution time: 32_064_000 picoseconds. - Weight::from_parts(42_308_500, 0) + 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)) @@ -81,7 +81,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `219` // Estimated: `3601` // Minimum execution time: 24_339_000 picoseconds. - Weight::from_parts(32_693_700, 0) + 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)) @@ -101,7 +101,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `219` // Estimated: `3601` // Minimum execution time: 29_237_000 picoseconds. - Weight::from_parts(38_771_200, 0) + 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)) @@ -127,7 +127,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `485` // Estimated: `6196` // Minimum execution time: 61_956_000 picoseconds. - Weight::from_parts(83_129_800, 0) + Weight::from_parts(63_946_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -151,7 +151,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `930` // Estimated: `69078` // Minimum execution time: 73_087_000 picoseconds. - Weight::from_parts(97_900_400, 0) + 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)) @@ -175,7 +175,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `716` // Estimated: `6212` // Minimum execution time: 70_147_000 picoseconds. - Weight::from_parts(92_814_800, 0) + 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)) @@ -195,7 +195,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `548` // Estimated: `6212` // Minimum execution time: 36_346_000 picoseconds. - Weight::from_parts(48_492_600, 0) + 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)) @@ -221,7 +221,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `815` // Estimated: `6212` // Minimum execution time: 73_833_000 picoseconds. - Weight::from_parts(98_029_100, 0) + 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)) @@ -243,7 +243,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `570` // Estimated: `6212` // Minimum execution time: 40_908_000 picoseconds. - Weight::from_parts(54_454_400, 0) + 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)) @@ -263,7 +263,7 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf // Measured: `219` // Estimated: `3601` // Minimum execution time: 26_585_000 picoseconds. - Weight::from_parts(35_380_800, 0) + 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-hub-paseo/src/weights/xcm/mod.rs b/system-parachains/bridge-hub-paseo/src/weights/xcm/mod.rs index fe52778..8f60b01 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/xcm/mod.rs @@ -18,6 +18,7 @@ mod pallet_xcm_benchmarks_fungible; mod pallet_xcm_benchmarks_generic; use crate::{xcm_config::MaxAssetsIntoHolding, Runtime}; +use codec::Encode; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_std::prelude::*; @@ -196,11 +197,12 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { XcmGeneric::::clear_transact_status() } fn universal_origin(_: &Junction) -> Weight { - XcmGeneric::::universal_origin() - } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { Weight::MAX } + fn export_message(_: &NetworkId, _: &Junctions, inner: &Xcm<()>) -> Weight { + let inner_encoded_len = inner.encode().len() as u32; + XcmGeneric::::export_message(inner_encoded_len) + } fn lock_asset(_: &Asset, _: &Location) -> Weight { Weight::MAX } @@ -229,4 +231,4 @@ impl XcmWeightInfo for BridgeHubPolkadotXcmWeight { fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { XcmGeneric::::unpaid_execution() } -} \ No newline at end of file +} diff --git a/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index f48f5c1..c952c51 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --output=./bridge-hub-paseo-weights/xcm/pallet_xcm_benchmarks_fungible.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +52,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 29_084_000 picoseconds. - Weight::from_parts(29_895_000, 0) + // Minimum execution time: 27_749_000 picoseconds. + Weight::from_parts(28_473_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,13 +64,13 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 33_160_000 picoseconds. - Weight::from_parts(35_313_000, 0) + // Minimum execution time: 37_673_000 picoseconds. + Weight::from_parts(38_330_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `System::Account` (r:3 w:3) + /// Storage: `System::Account` (r:3 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`) @@ -89,13 +88,13 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `264` + // Measured: `260` // Estimated: `8799` - // Minimum execution time: 75_874_000 picoseconds. - Weight::from_parts(78_087_000, 0) + // Minimum execution time: 78_356_000 picoseconds. + Weight::from_parts(80_180_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -117,7 +116,7 @@ impl WeightInfo { /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -125,20 +124,20 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `208` // Estimated: `6196` - // Minimum execution time: 72_549_000 picoseconds. - Weight::from_parts(74_892_000, 0) + // Minimum execution time: 48_088_000 picoseconds. + Weight::from_parts(49_343_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_774_000 picoseconds. - Weight::from_parts(2_935_000, 0) + // Minimum execution time: 2_705_000 picoseconds. + Weight::from_parts(2_797_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) @@ -147,8 +146,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 23_115_000 picoseconds. - Weight::from_parts(24_056_000, 0) + // Minimum execution time: 21_715_000 picoseconds. + Weight::from_parts(22_032_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -163,7 +162,7 @@ impl WeightInfo { /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -171,13 +170,13 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `163` + // Measured: `159` // Estimated: `6196` - // Minimum execution time: 61_353_000 picoseconds. - Weight::from_parts(64_016_000, 0) + // Minimum execution time: 55_124_000 picoseconds. + Weight::from_parts(56_361_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .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`) @@ -189,7 +188,7 @@ impl WeightInfo { /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) + /// Storage: `System::Account` (r:1 w:0) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -197,12 +196,12 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `111` + // Measured: `107` // Estimated: `3593` - // Minimum execution time: 37_266_000 picoseconds. - Weight::from_parts(38_448_000, 0) + // Minimum execution time: 25_317_000 picoseconds. + Weight::from_parts(26_148_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 0c37706..cda83c6 100644 --- a/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hub-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -13,27 +13,26 @@ // 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 `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./bridge-hub-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --output=./bridge-hub-paseo-weights/xcm/pallet_xcm_benchmarks_generic.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,12 +51,12 @@ impl WeightInfo { /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -65,87 +64,87 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `208` // Estimated: `6196` - // Minimum execution time: 116_756_000 picoseconds. - Weight::from_parts(135_232_000, 0) + // Minimum execution time: 46_970_000 picoseconds. + Weight::from_parts(48_603_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_307_000 picoseconds. - Weight::from_parts(5_788_000, 0) + // Minimum execution time: 1_247_000 picoseconds. + Weight::from_parts(1_351_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `69` - // Estimated: `3534` - // Minimum execution time: 7_301_000 picoseconds. - Weight::from_parts(7_581_000, 0) - .saturating_add(Weight::from_parts(0, 3534)) + // Measured: `32` + // Estimated: `3497` + // Minimum execution time: 6_555_000 picoseconds. + Weight::from_parts(6_703_000, 0) + .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_579_000 picoseconds. - Weight::from_parts(7_060_000, 0) + // Minimum execution time: 6_333_000 picoseconds. + Weight::from_parts(6_728_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_831_000 picoseconds. - Weight::from_parts(7_702_000, 0) + // Minimum execution time: 1_943_000 picoseconds. + Weight::from_parts(2_051_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_613_000 picoseconds. - Weight::from_parts(1_723_000, 0) + // Minimum execution time: 1_264_000 picoseconds. + Weight::from_parts(1_332_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_542_000 picoseconds. - Weight::from_parts(1_803_000, 0) + // Minimum execution time: 1_240_000 picoseconds. + Weight::from_parts(1_303_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_053_000 picoseconds. - Weight::from_parts(3_124_000, 0) + // Minimum execution time: 1_220_000 picoseconds. + Weight::from_parts(1_292_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(1_953_000, 0) + // Minimum execution time: 1_293_000 picoseconds. + Weight::from_parts(1_394_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_201_000 picoseconds. + Weight::from_parts(1_290_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -153,12 +152,12 @@ impl WeightInfo { /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -166,23 +165,23 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `208` // Estimated: `6196` - // Minimum execution time: 48_224_000 picoseconds. - Weight::from_parts(51_617_000, 0) + // Minimum execution time: 44_226_000 picoseconds. + Weight::from_parts(46_560_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `126` - // Estimated: `3591` - // Minimum execution time: 9_464_000 picoseconds. - Weight::from_parts(10_486_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 9_384_000 picoseconds. + Weight::from_parts(9_849_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,8 +189,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_562_000 picoseconds. - Weight::from_parts(1_743_000, 0) + // Minimum execution time: 1_267_000 picoseconds. + Weight::from_parts(1_342_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -199,7 +198,7 @@ impl WeightInfo { /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) @@ -210,11 +209,11 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 17_987_000 picoseconds. - Weight::from_parts(18_918_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) + // Measured: `75` + // Estimated: `3540` + // Minimum execution time: 20_511_000 picoseconds. + Weight::from_parts(21_396_000, 0) + .saturating_add(Weight::from_parts(0, 3540)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -224,8 +223,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_864_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 3_127_000 picoseconds. + Weight::from_parts(3_672_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -233,40 +232,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_309_000 picoseconds. - Weight::from_parts(19_620_000, 0) + // Minimum execution time: 1_591_000 picoseconds. + Weight::from_parts(1_749_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_925_000 picoseconds. - Weight::from_parts(10_906_000, 0) + // Minimum execution time: 1_382_000 picoseconds. + Weight::from_parts(1_447_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_752_000, 0) + // Minimum execution time: 1_245_000 picoseconds. + Weight::from_parts(1_442_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_583_000 picoseconds. - Weight::from_parts(1_643_000, 0) + // Minimum execution time: 1_244_000 picoseconds. + Weight::from_parts(1_421_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_753_000 picoseconds. - Weight::from_parts(1_814_000, 0) + // Minimum execution time: 1_417_000 picoseconds. + Weight::from_parts(1_581_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -274,12 +273,12 @@ impl WeightInfo { /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -287,20 +286,20 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `208` // Estimated: `6196` - // Minimum execution time: 52_539_000 picoseconds. - Weight::from_parts(58_057_000, 0) + // Minimum execution time: 48_410_000 picoseconds. + Weight::from_parts(49_318_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_296_000 picoseconds. - Weight::from_parts(4_427_000, 0) + // Minimum execution time: 4_099_000 picoseconds. + Weight::from_parts(4_205_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -308,12 +307,12 @@ impl WeightInfo { /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -321,63 +320,77 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `212` + // Measured: `208` // Estimated: `6196` - // Minimum execution time: 48_483_000 picoseconds. - Weight::from_parts(50_507_000, 0) + // Minimum execution time: 44_221_000 picoseconds. + Weight::from_parts(45_703_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_622_000 picoseconds. - Weight::from_parts(1_762_000, 0) + // Minimum execution time: 1_227_000 picoseconds. + Weight::from_parts(1_292_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 1_193_000 picoseconds. + Weight::from_parts(1_268_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_572_000 picoseconds. - Weight::from_parts(1_703_000, 0) + // Minimum execution time: 1_195_000 picoseconds. + Weight::from_parts(1_279_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - pub(crate) fn universal_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1489` - // Minimum execution time: 3_294_000 picoseconds. - Weight::from_parts(3_415_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - } + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `PaseoXcm::SupportedVersion` (r:2 w:0) + /// Proof: `PaseoXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (r:1 w:0) + /// Proof: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:1) + /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`) + /// The range of component `x` is `[1, 1000]`. + pub(crate) fn export_message(x: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `227` + // Estimated: `6167` + // Minimum execution time: 37_717_000 picoseconds. + Weight::from_parts(38_427_457, 0) + .saturating_add(Weight::from_parts(0, 6167)) + // Standard Error: 128 + .saturating_add(Weight::from_parts(43_117, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_153_000 picoseconds. + Weight::from_parts(1_246_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_702_000, 0) + // Minimum execution time: 1_182_000 picoseconds. + Weight::from_parts(1_280_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/bridge-hub-paseo/src/xcm_config.rs b/system-parachains/bridge-hub-paseo/src/xcm_config.rs index aedcc72..73b8a69 100644 --- a/system-parachains/bridge-hub-paseo/src/xcm_config.rs +++ b/system-parachains/bridge-hub-paseo/src/xcm_config.rs @@ -15,42 +15,42 @@ // along with Cumulus. If not, see . use super::{ - bridge_to_ethereum_config::EthereumNetwork, - AccountId, AllPalletsWithSystem, - Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + bridge_to_ethereum_config::EthereumNetwork, + bridge_to_kusama_config::ToBridgeHubKusamaHaulBlobExporter, AccountId, AllPalletsWithSystem, + Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, + PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ - parameter_types, - traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, + parameter_types, + traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ - AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, - RelayOrOtherSystemParachains, + AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, + RelayOrOtherSystemParachains, }; -use polkadot_parachain_primitives::primitives::Sibling; use paseo_runtime_constants::system_parachain; +use polkadot_parachain_primitives::primitives::Sibling; use snowbridge_runtime_common::XcmExportFeeToSibling; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, - DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeToAccount, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, + DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, + FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeToAccount, }; use xcm_executor::{ - traits::{ConvertLocation, FeeManager, FeeReason, FeeReason::Export}, - XcmExecutor, + traits::{ConvertLocation, FeeManager, FeeReason, FeeReason::Export}, + XcmExecutor, }; parameter_types! { @@ -77,65 +77,65 @@ parameter_types! { /// when determining ownership of accounts for asset transacting and when attempting to use XCM /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( - // The parent (Relay-chain) origin converts to the parent `AccountId`. - ParentIsPreset, - // Sibling parachain origins convert to AccountId via the `ParaId::into`. - SiblingParachainConvertsVia, - // Straight up local `AccountId32` origins just alias directly to `AccountId`. - AccountId32Aliases, - // Foreign locations alias into accounts according to a hash of their standard description. - HashedDescription>, + // The parent (Relay-chain) origin converts to the parent `AccountId`. + ParentIsPreset, + // Sibling parachain origins convert to AccountId via the `ParaId::into`. + SiblingParachainConvertsVia, + // Straight up local `AccountId32` origins just alias directly to `AccountId`. + AccountId32Aliases, + // Foreign locations alias into accounts according to a hash of their standard description. + HashedDescription>, ); /// Means for transacting the native currency on this chain. pub type FungibleTransactor = FungibleAdapter< - // Use this currency: - Balances, - // Use this currency when it is a fungible asset matching the given location or name: - IsConcrete, - // Do a simple punn to convert an AccountId32 Location into a native chain account ID: - LocationToAccountId, - // Our chain's account ID type (we can't get away without mentioning it explicitly): - AccountId, - // We don't track any teleports of `Balances`. - (), + // Use this currency: + Balances, + // Use this currency when it is a fungible asset matching the given location or name: + IsConcrete, + // Do a simple punn to convert an AccountId32 Location into a native chain account ID: + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports of `Balances`. + (), >; /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, /// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can /// biases the kind of local `Origin` it will become. pub type XcmOriginToTransactDispatchOrigin = ( - // Sovereign account converter; this attempts to derive an `AccountId` from the origin location - // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for - // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, - // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when - // recognized. - RelayChainAsNative, - // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when - // recognized. - SiblingParachainAsNative, - // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a - // transaction from the Root origin. - ParentAsSuperuser, - // Native signed account converter; this just converts an `AccountId32` origin into a normal - // `RuntimeOrigin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, - // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + // Sovereign account converter; this attempts to derive an `AccountId` from the origin location + // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for + // foreign chains who want to have a local sovereign account on this chain which they control. + SovereignSignedViaLocation, + // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when + // recognized. + RelayChainAsNative, + // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when + // recognized. + SiblingParachainAsNative, + // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a + // transaction from the Root origin. + ParentAsSuperuser, + // Native signed account converter; this just converts an `AccountId32` origin into a normal + // `RuntimeOrigin::Signed` origin of the same 32-byte value. + SignedAccountId32AsNative, + // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. + XcmPassthrough, ); pub struct ParentOrParentsPlurality; impl Contains for ParentOrParentsPlurality { - fn contains(location: &Location) -> bool { - matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) - } + fn contains(location: &Location) -> bool { + matches!(location.unpack(), (1, []) | (1, [Plurality { .. }])) + } } pub struct FellowsPlurality; impl Contains for FellowsPlurality { - fn contains(location: &Location) -> bool { - matches!( + fn contains(location: &Location) -> bool { + matches!( location.unpack(), ( 1, @@ -145,46 +145,46 @@ impl Contains for FellowsPlurality { ] ) ) - } + } } pub type Barrier = TrailingSetTopicAsId< - DenyThenTry< - DenyReserveTransferToRelayChain, - ( - // Allow local users to buy weight credit. - TakeWeightCredit, - // Expected responses are OK. - AllowKnownQueryResponses, - WithComputedOrigin< - ( - // If the message is one that immediately attempts to pay for execution, then - // allow it. - AllowTopLevelPaidExecutionFrom, - // Parent, its pluralities (i.e. governance bodies), Fellows plurality - // and relay treasury get free execution. - AllowExplicitUnpaidExecutionFrom<( - ParentOrParentsPlurality, - FellowsPlurality, - Equals, - )>, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - ), - UniversalLocation, - ConstU32<8>, - >, - ), - >, + DenyThenTry< + DenyReserveTransferToRelayChain, + ( + // Allow local users to buy weight credit. + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + WithComputedOrigin< + ( + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // Parent, its pluralities (i.e. governance bodies), Fellows plurality + // and relay treasury get free execution. + AllowExplicitUnpaidExecutionFrom<( + ParentOrParentsPlurality, + FellowsPlurality, + Equals, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, + ), + >, >; /// Locations that will not be charged fees in the executor, /// either execution or delivery. /// We only waive fees for system functions, which these locations represent. pub type WaivedLocations = ( - RelayOrOtherSystemParachains, - Equals, - FellowsPlurality, + RelayOrOtherSystemParachains, + Equals, + FellowsPlurality, ); /// Cases where a remote origin is accepted as trusted Teleporter for a given asset: @@ -193,56 +193,57 @@ pub type TrustedTeleporters = ConcreteAssetFromSystem; pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type RuntimeCall = RuntimeCall; - type XcmSender = XcmRouter; - type AssetTransactor = FungibleTransactor; - type OriginConverter = XcmOriginToTransactDispatchOrigin; - // BridgeHub does not recognize a reserve location for any asset. Users must teleport DOT - // where allowed (e.g. with the Relay Chain). - type IsReserve = (); - type IsTeleporter = TrustedTeleporters; - type UniversalLocation = UniversalLocation; - type Barrier = Barrier; - type Weigher = WeightInfoBounds< - crate::weights::xcm::BridgeHubPolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - type Trader = UsingComponents< - WeightToFee, - DotRelayLocation, - AccountId, - Balances, - ResolveTo, - >; - type ResponseHandler = PolkadotXcm; - type AssetTrap = PolkadotXcm; - type AssetClaims = PolkadotXcm; - type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = AllPalletsWithSystem; - type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); - type FeeManager = XcmFeeManagerFromComponentsBridgeHub< - WaivedLocations, - ( - XcmExportFeeToSibling< - bp_polkadot::Balance, - AccountId, - DotRelayLocation, - EthereumNetwork, - Self::AssetTransactor, - crate::EthereumOutboundQueue, - >, - XcmFeeToAccount, - ), - >; - type MessageExporter = crate::bridge_to_ethereum_config::SnowbridgeExporter; - type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; - type SafeCallFilter = Everything; - type Aliasers = Nothing; - type TransactionalProcessor = FrameTransactionalProcessor; + type RuntimeCall = RuntimeCall; + type XcmSender = XcmRouter; + type AssetTransactor = FungibleTransactor; + type OriginConverter = XcmOriginToTransactDispatchOrigin; + // BridgeHub does not recognize a reserve location for any asset. Users must teleport PAS + // where allowed (e.g. with the Relay Chain). + type IsReserve = (); + type IsTeleporter = TrustedTeleporters; + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = WeightInfoBounds< + crate::weights::xcm::BridgeHubPolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type Trader = UsingComponents< + WeightToFee, + DotRelayLocation, + AccountId, + Balances, + ResolveTo, + >; + type ResponseHandler = PolkadotXcm; + type AssetTrap = PolkadotXcm; + type AssetClaims = PolkadotXcm; + type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = XcmFeeManagerFromComponentsBridgeHub< + WaivedLocations, + ( + XcmExportFeeToSibling< + bp_polkadot::Balance, + AccountId, + DotRelayLocation, + EthereumNetwork, + Self::AssetTransactor, + crate::EthereumOutboundQueue, + >, + XcmFeeToAccount, + ), + >; + type MessageExporter = + (ToBridgeHubKusamaHaulBlobExporter, crate::bridge_to_ethereum_config::SnowbridgeExporter); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM location. @@ -252,70 +253,69 @@ pub type LocalOriginToLocation = SignedToAccountId32, - // ..and XCMP to communicate with the sibling chains. - XcmpQueue, + // Two routers - use UMP to communicate with the relay chain: + cumulus_primitives_utility::ParentAsUmp, + // ..and XCMP to communicate with the sibling chains. + XcmpQueue, )>; impl pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - // We want to disallow users sending (arbitrary) XCMs from this chain. - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; - // We support local origins dispatching XCM executions in principle... - type ExecuteXcmOrigin = EnsureXcmOrigin; - // ... but disallow generic XCM execution. As a result only teleports are allowed. - type XcmExecuteFilter = Nothing; - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location. - type Weigher = WeightInfoBounds< - crate::weights::xcm::BridgeHubPolkadotXcmWeight, - RuntimeCall, - MaxInstructions, - >; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; - type Currency = Balances; - type CurrencyMatcher = (); - type TrustedLockers = (); - type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; - type WeightInfo = crate::weights::pallet_xcm::WeightInfo; - type AdminOrigin = EnsureRoot; - type MaxRemoteLockConsumers = ConstU32<0>; - type RemoteLockConsumerIdentifier = (); + type RuntimeEvent = RuntimeEvent; + // We want to disallow users sending (arbitrary) XCMs from this chain. + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = XcmRouter; + // Anyone can execute XCM messages locally. + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Everything; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location. + type Weigher = WeightInfoBounds< + crate::weights::xcm::BridgeHubPolkadotXcmWeight, + RuntimeCall, + MaxInstructions, + >; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; + type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); } impl cumulus_pallet_xcm::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type XcmExecutor = XcmExecutor; + type RuntimeEvent = RuntimeEvent; + type XcmExecutor = XcmExecutor; } /// A `FeeManager` implementation that forces fees for any message delivered to Ethereum. /// Otherwise, it permits the specified `WaivedLocations` to not pay for fees and uses the provided /// `HandleFee` implementation. pub struct XcmFeeManagerFromComponentsBridgeHub( - PhantomData<(WaivedLocations, HandleFee)>, + PhantomData<(WaivedLocations, HandleFee)>, ); impl, FeeHandler: HandleFee> FeeManager -for XcmFeeManagerFromComponentsBridgeHub + for XcmFeeManagerFromComponentsBridgeHub { - fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { - let Some(loc) = origin else { return false }; - if let Export { network, destination: Here } = fee_reason { - if network == EthereumNetwork::get() { - return false - } - } - WaivedLocations::contains(loc) - } + fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool { + let Some(loc) = origin else { return false }; + if let Export { network, destination: Here } = fee_reason { + if network == EthereumNetwork::get() { + return false + } + } + WaivedLocations::contains(loc) + } - fn handle_fee(fee: Assets, context: Option<&XcmContext>, reason: FeeReason) { - FeeHandler::handle_fee(fee, context, reason); - } + fn handle_fee(fee: Assets, context: Option<&XcmContext>, reason: FeeReason) { + FeeHandler::handle_fee(fee, context, reason); + } } diff --git a/system-parachains/bridge-hub-paseo/tests/snowbridge.rs b/system-parachains/bridge-hub-paseo/tests/snowbridge.rs index de47f3c..5bf4d48 100644 --- a/system-parachains/bridge-hub-paseo/tests/snowbridge.rs +++ b/system-parachains/bridge-hub-paseo/tests/snowbridge.rs @@ -18,23 +18,24 @@ use bp_polkadot_core::Signature; use bridge_hub_paseo_runtime::{ - bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, - xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - Executive, MessageQueueServiceWeight, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, + bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, + bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, + BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, + RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, }; use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; use frame_support::{ - assert_err, assert_ok, parameter_types, - traits::{Contains, OnFinalize, OnInitialize}, + assert_err, assert_ok, parameter_types, + traits::{Contains, OnFinalize, OnInitialize}, }; use frame_system::pallet_prelude::BlockNumberFor; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; use parachains_runtimes_test_utils::{ - AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, + AccountIdOf, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, }; use paseo_runtime_constants::currency::UNITS; use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; @@ -44,460 +45,466 @@ use snowbridge_runtime_test_common::initial_fund; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ - generic::{Era, SignedPayload}, - traits::Header, - AccountId32, FixedU128, Saturating, + generic::{Era, SignedPayload}, + traits::Header, + AccountId32, FixedU128, Saturating, }; use xcm::{latest::prelude::*, v3::Error}; use xcm_builder::HandleFee; use xcm_executor::{ - traits::{FeeManager, FeeReason}, - XcmExecutor, + traits::{FeeManager, FeeReason}, + XcmExecutor, }; type RuntimeHelper = -parachains_runtimes_test_utils::RuntimeHelper; + parachains_runtimes_test_utils::RuntimeHelper; parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; } fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { - bridge_hub_test_utils::CollatorSessionKeys::new( - AccountId::from(Alice), - AccountId::from(Alice), - SessionKeys { aura: AuraId::from(Alice.public()) }, - ) + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) } #[test] pub fn transfer_token_to_ethereum_works() { - send_transfer_token_message_success::( - collator_session_keys(), - 1013, - 1000, - H160::random(), - H160::random(), - DefaultBridgeHubEthereumBaseFee::get(), - Box::new(|runtime_event_encoded: Vec| { - match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { - Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), - _ => None, - } - }), - ) + send_transfer_token_message_success::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) } #[test] pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { - snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( - collator_session_keys(), - 1013, - 1000, - H160::random(), - H160::random(), - ) + snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + ) } #[test] pub fn transfer_token_to_ethereum_fee_not_enough() { - send_transfer_token_message_failure::( - collator_session_keys(), - 1013, - 1000, - DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, - H160::random(), - H160::random(), - // fee not enough - 1_000_000_000, - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), - NotHoldingFees, - ) + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + DefaultBridgeHubEthereumBaseFee::get() + 1_000_000_000, + H160::random(), + H160::random(), + // fee not enough + 1_000_000_000, + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), + NotHoldingFees, + ) } #[test] pub fn transfer_token_to_ethereum_insufficient_fund() { - send_transfer_token_message_failure::( - collator_session_keys(), - 1013, - 1000, - 1_000_000_000, - H160::random(), - H160::random(), - DefaultBridgeHubEthereumBaseFee::get(), - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), - FailedToTransactAsset("Funds are unavailable"), - ) + send_transfer_token_message_failure::( + collator_session_keys(), + 1013, + 1000, + 1_000_000_000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), + FailedToTransactAsset("Funds are unavailable"), + ) } #[test] fn change_ethereum_gateway_by_governance_works() { - change_storage_constant_by_governance_works::( - collator_session_keys(), - bp_bridge_hub_paseo::BRIDGE_HUB_PASEO_PARACHAIN_ID, - Box::new(|call| RuntimeCall::System(call).encode()), - || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), - |_| [1; 20].into(), - ) + change_storage_constant_by_governance_works::( + collator_session_keys(), + bp_bridge_hub_paseo::BRIDGE_HUB_POLKAPAS_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (EthereumGatewayAddress::key().to_vec(), EthereumGatewayAddress::get()), + |_| [1; 20].into(), + ) } /// Fee is not waived when origin is none. #[test] fn test_xcm_fee_manager_from_components_bh_origin_none() { - assert!(!TestXcmFeeManager::is_waived(None, FeeReason::ChargeFees)); + assert!(!TestXcmFeeManager::is_waived(None, FeeReason::ChargeFees)); } /// Fee is not waived when origin is not in waived location. #[test] fn test_xcm_fee_manager_from_components_bh_origin_not_in_waived_locations() { - assert!(!TestXcmFeeManager::is_waived( - Some(&Location::new(1, [Parachain(1)])), - FeeReason::DepositReserveAsset - )); + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::DepositReserveAsset + )); } /// Fee is waived when origin is in waived location. #[test] fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations() { - assert!(TestXcmFeeManager::is_waived( - Some(&Location::new(1, [Parachain(2)])), - FeeReason::DepositReserveAsset - )); + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::DepositReserveAsset + )); } /// Fee is waived when origin is in waived location with Export message, but not to Ethereum. #[test] -fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations_with_export_to_paseo_reason( -) { - assert!(TestXcmFeeManager::is_waived( - Some(&Location::new(1, [Parachain(2)])), - FeeReason::Export { network: Polkadot, destination: Here } - )); +fn test_xcm_fee_manager_from_components_bh_origin_in_waived_locations_with_export_to_paseo_reason() +{ + assert!(TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(2)])), + FeeReason::Export { network: Polkadot, destination: Here } + )); } /// Fee is not waived when origin is in waived location but exported to Ethereum. #[test] fn test_xcm_fee_manager_from_components_bh_in_waived_locations_with_export_to_ethereum_reason() { - assert!(!TestXcmFeeManager::is_waived( - Some(&Location::new(1, [Parachain(1)])), - FeeReason::Export { network: EthereumNetwork::get(), destination: Here } - )); + assert!(!TestXcmFeeManager::is_waived( + Some(&Location::new(1, [Parachain(1)])), + FeeReason::Export { network: EthereumNetwork::get(), destination: Here } + )); } struct MockWaivedLocations; impl Contains for MockWaivedLocations { - fn contains(loc: &Location) -> bool { - loc == &Location::new(1, [Parachain(2)]) - } + fn contains(loc: &Location) -> bool { + loc == &Location::new(1, [Parachain(2)]) + } } struct MockFeeHandler; impl HandleFee for MockFeeHandler { - fn handle_fee(fee: Assets, _context: Option<&XcmContext>, _reason: FeeReason) -> Assets { - fee - } + fn handle_fee(fee: Assets, _context: Option<&XcmContext>, _reason: FeeReason) -> Assets { + fee + } } type TestXcmFeeManager = XcmFeeManagerFromComponentsBridgeHub; #[allow(clippy::too_many_arguments)] pub fn send_transfer_token_message_failure( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - initial_amount: u128, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - system_call_encode: Box) -> Vec>, - expected_error: Error, + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + initial_amount: u128, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + system_call_encode: Box) -> Vec>, + expected_error: Error, ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: From + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, + <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: From { - ExtBuilder::::default() - .with_collators(collator_session_key.collators()) - .with_session_keys(collator_session_key.session_keys()) - .with_para_id(runtime_para_id.into()) - .with_tracing() - .build() - .execute_with(|| { - assert_ok!(>::initialize( + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + assert_ok!(>::initialize( runtime_para_id.into(), assethub_parachain_id.into(), )); - let require_weight_at_most = - ::WeightInfo::set_pricing_parameters(); - - let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< - Runtime, - >::set_pricing_parameters { - params: { - PricingParametersOf:: { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { - local: (UNITS / 100).into(), // 0.01 DOT - remote: meth(1), - }, - multiplier: FixedU128::from_rational(1, 1), - } - }, - }); - - assert_ok!(RuntimeHelper::::execute_as_governance( + let require_weight_at_most = + ::WeightInfo::set_pricing_parameters(); + + let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< + Runtime, + >::set_pricing_parameters { + params: { + PricingParametersOf:: { + exchange_rate: FixedU128::from_rational(1, 75), + fee_per_gas: gwei(20), + rewards: Rewards { + local: (UNITS / 100).into(), // 0.01 PAS + remote: meth(1), + }, + multiplier: FixedU128::from_rational(1, 1), + } + }, + }); + + assert_ok!(RuntimeHelper::::execute_as_governance( set_pricing_parameters_call, require_weight_at_most ) .ensure_complete()); - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, initial_amount); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - assert_err!(outcome.ensure_complete(), expected_error); - }); + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, initial_amount); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + assert_err!(outcome.ensure_complete(), expected_error); + }); } #[test] fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { - let max_message_queue_weight = MessageQueueServiceWeight::get(); - let force_checkpoint = - ::WeightInfo::force_checkpoint(); - let submit_checkpoint = - ::WeightInfo::submit(); - max_message_queue_weight.all_gt(force_checkpoint); - max_message_queue_weight.all_gt(submit_checkpoint); + let max_message_queue_weight = MessageQueueServiceWeight::get(); + let force_checkpoint = + ::WeightInfo::force_checkpoint(); + let submit_checkpoint = + ::WeightInfo::submit(); + max_message_queue_weight.all_gt(force_checkpoint); + max_message_queue_weight.all_gt(submit_checkpoint); } #[test] fn ethereum_client_consensus_extrinsics_work() { - snowbridge_runtime_test_common::ethereum_extrinsic( - collator_session_keys(), - 1013, - construct_and_apply_extrinsic, - ); + snowbridge_runtime_test_common::ethereum_extrinsic( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); } #[test] fn ethereum_to_paseo_message_extrinsics_work() { - snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( - collator_session_keys(), - 1013, - construct_and_apply_extrinsic, - ); + snowbridge_runtime_test_common::ethereum_to_polkadot_message_extrinsics_work( + collator_session_keys(), + 1013, + construct_and_apply_extrinsic, + ); } #[test] fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { - // TODO: add test after dependencies are upgraded to >= 1.8 + // TODO: add test after dependencies are upgraded to >= 1.8 } fn construct_extrinsic( - sender: sp_keyring::AccountKeyring, - call: RuntimeCall, + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, ) -> UncheckedExtrinsic { - let account_id = AccountId32::from(sender.public()); - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(Era::immortal()), - frame_system::CheckNonce::::from( - frame_system::Pallet::::account(&account_id).nonce, - ), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(0), - frame_metadata_hash_extension::CheckMetadataHash::::new(false), - ); - let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); - let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + let account_id = AccountId32::from(sender.public()); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages, + (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + account_id.into(), + Signature::Sr25519(signature.clone()), + extra, + ) } fn construct_and_apply_extrinsic( - origin: sp_keyring::AccountKeyring, - call: RuntimeCall, + origin: sp_keyring::AccountKeyring, + call: RuntimeCall, ) -> sp_runtime::DispatchOutcome { - let xt = construct_extrinsic(origin, call); - let r = Executive::apply_extrinsic(xt); - r.unwrap() + let xt = construct_extrinsic(origin, call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() } // TODO remove when Ethereum network ID has been extracted as a param pub fn send_transfer_token_message( - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, ) -> Outcome - where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config, - XcmConfig: xcm_executor::Config, +where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config, + XcmConfig: xcm_executor::Config, { - let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); - let asset = Asset { - id: AssetId(Location::new( - 0, - [AccountKey20 { network: None, key: weth_contract_address.into() }], - )), - fun: Fungible(1000000000), - }; - let assets = vec![asset.clone()]; - - let inner_xcm = Xcm(vec![ - WithdrawAsset(Assets::from(assets.clone())), - ClearOrigin, - BuyExecution { fees: asset, weight_limit: Unlimited }, - DepositAsset { - assets: Wild(All), - beneficiary: Location::new( - 0, - [AccountKey20 { network: None, key: destination_address.into() }], - ), - }, - SetTopic([0; 32]), - ]); - - let fee = - Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; - - // prepare transfer token message - let xcm = Xcm(vec![ - WithdrawAsset(Assets::from(vec![fee.clone()])), - BuyExecution { fees: fee, weight_limit: Unlimited }, - ExportMessage { network: Ethereum { chain_id: 11155111 }, destination: Here, xcm: inner_xcm }, - ]); - - // execute XCM - let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); - XcmExecutor::::prepare_and_execute( - assethub_parachain_location, - xcm, - &mut hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - Weight::zero(), - ) + let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); + let asset = Asset { + id: AssetId(Location::new( + 0, + [AccountKey20 { network: None, key: weth_contract_address.into() }], + )), + fun: Fungible(1000000000), + }; + let assets = vec![asset.clone()]; + + let inner_xcm = Xcm(vec![ + WithdrawAsset(Assets::from(assets.clone())), + ClearOrigin, + BuyExecution { fees: asset, weight_limit: Unlimited }, + DepositAsset { + assets: Wild(All), + beneficiary: Location::new( + 0, + [AccountKey20 { network: None, key: destination_address.into() }], + ), + }, + SetTopic([0; 32]), + ]); + + let fee = + Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; + + // prepare transfer token message + let xcm = Xcm(vec![ + WithdrawAsset(Assets::from(vec![fee.clone()])), + BuyExecution { fees: fee, weight_limit: Unlimited }, + ExportMessage { + network: Ethereum { chain_id: 11155111 }, + destination: Here, + xcm: inner_xcm, + }, + ]); + + // execute XCM + let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); + XcmExecutor::::prepare_and_execute( + assethub_parachain_location, + xcm, + &mut hash, + RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), + Weight::zero(), + ) } pub fn send_transfer_token_message_success( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - snowbridge_pallet_outbound_queue: Box< - dyn Fn(Vec) -> Option>, - >, + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + assethub_parachain_id: u32, + weth_contract_address: H160, + destination_address: H160, + fee_amount: u128, + snowbridge_pallet_outbound_queue: Box< + dyn Fn(Vec) -> Option>, + >, ) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + pallet_message_queue::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - ::AccountId: From + AsRef<[u8]>, + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + parachain_info::Config + + pallet_collator_selection::Config + + pallet_message_queue::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config, + XcmConfig: xcm_executor::Config, + ValidatorIdOf: From>, + ::AccountId: From + AsRef<[u8]>, { - ExtBuilder::::default() - .with_collators(collator_session_key.collators()) - .with_session_keys(collator_session_key.session_keys()) - .with_para_id(runtime_para_id.into()) - .with_tracing() - .build() - .execute_with(|| { - >::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - ) - .unwrap(); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, 5_000_000_000_000); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - - assert_ok!(outcome.ensure_complete()); - - // check events - let mut events = >::events() - .into_iter() - .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); - assert!(events.any(|e| matches!( + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + >::initialize( + runtime_para_id.into(), + assethub_parachain_id.into(), + ) + .unwrap(); + + // fund asset hub sovereign account enough so it can pay fees + initial_fund::(assethub_parachain_id, 5_000_000_000_000); + + let outcome = send_transfer_token_message::( + assethub_parachain_id, + weth_contract_address, + destination_address, + fee_amount, + ); + + assert_ok!(outcome.ensure_complete()); + + // check events + let mut events = >::events() + .into_iter() + .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); + assert!(events.any(|e| matches!( e, snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } ))); - let block_number = >::block_number(); - let next_block_number = >::block_number() - .saturating_add(BlockNumberFor::::from(1u32)); + let block_number = >::block_number(); + let next_block_number = >::block_number() + .saturating_add(BlockNumberFor::::from(1u32)); - // finish current block - >::on_finalize(block_number); - >::on_finalize(block_number); - >::on_finalize(block_number); + // finish current block + >::on_finalize(block_number); + >::on_finalize(block_number); + >::on_finalize(block_number); - // start next block - >::set_block_number(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); + // start next block + >::set_block_number(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); + >::on_initialize(next_block_number); - // finish next block - >::on_finalize(next_block_number); - >::on_finalize(next_block_number); - let included_head = >::finalize(); + // finish next block + >::on_finalize(next_block_number); + >::on_finalize(next_block_number); + let included_head = >::finalize(); - let origin: ParaId = assethub_parachain_id.into(); - let channel_id: ChannelId = origin.into(); + let origin: ParaId = assethub_parachain_id.into(); + let channel_id: ChannelId = origin.into(); - let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); - assert_ok!(nonce); - assert_eq!(nonce.unwrap(), 1); + let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); + assert_ok!(nonce); + assert_eq!(nonce.unwrap(), 1); - let digest = included_head.digest(); + let digest = included_head.digest(); - let digest_items = digest.logs(); - assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); - }); + let digest_items = digest.logs(); + assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); + }); } diff --git a/system-parachains/bridge-hub-paseo/tests/tests.rs b/system-parachains/bridge-hub-paseo/tests/tests.rs new file mode 100644 index 0000000..2d15707 --- /dev/null +++ b/system-parachains/bridge-hub-paseo/tests/tests.rs @@ -0,0 +1,425 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Cumulus is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Cumulus. If not, see . + +use bp_bridge_hub_kusama::Perbill; +use bp_polkadot_core::Signature; +use bridge_hub_paseo_runtime::{ + bridge_to_kusama_config::{ + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, + BridgeHubKusamaLocation, BridgeParachainKusamaInstance, DeliveryRewardInBalance, + KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, + WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + }, + xcm_config::{ + DotRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, + RelayTreasuryPalletAccount, XcmConfig, + }, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, + SignedExtra, TransactionPayment, UncheckedExtrinsic, SLOT_DURATION, +}; +use bridge_hub_test_utils::{test_cases::from_parachain, SlotDurations}; +use codec::{Decode, Encode}; +use frame_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8}; +use parachains_common::{AccountId, AuraId, Balance}; +use sp_consensus_aura::SlotDuration; +use sp_keyring::AccountKeyring::Alice; +use sp_runtime::{ + generic::{Era, SignedPayload}, + AccountId32, +}; +use system_parachains_constants::paseo::{ + consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, +}; +use xcm::latest::prelude::*; +use xcm_executor::traits::ConvertLocation; + +// Para id of sibling chain used in tests. +pub const SIBLING_PARACHAIN_ID: u32 = 1000; + +// Runtime from tests PoV +type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< + Runtime, + AllPalletsWithoutSystem, + BridgeGrandpaKusamaInstance, + BridgeParachainKusamaInstance, + WithBridgeHubKusamaMessagesInstance, + WithBridgeHubKusamaMessageBridge, +>; + +parameter_types! { + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); +} + +fn construct_extrinsic( + sender: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> UncheckedExtrinsic { + let account_id = AccountId32::from(sender.public()); + let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(Era::immortal()), + frame_system::CheckNonce::::from( + frame_system::Pallet::::account(&account_id).nonce, + ), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + BridgeRejectObsoleteHeadersAndMessages, + (RefundBridgeHubKusamaMessages::default()), + frame_metadata_hash_extension::CheckMetadataHash::::new(false), + ); + let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); + let signature = payload.using_encoded(|e| sender.sign(e)); + UncheckedExtrinsic::new_signed( + call, + account_id.into(), + Signature::Sr25519(signature.clone()), + extra, + ) +} + +fn construct_and_apply_extrinsic( + relayer_at_target: sp_keyring::AccountKeyring, + call: RuntimeCall, +) -> sp_runtime::DispatchOutcome { + let xt = construct_extrinsic(relayer_at_target, call); + let r = Executive::apply_extrinsic(xt); + r.unwrap() +} + +fn construct_and_estimate_extrinsic_fee(batch: pallet_utility::Call) -> Balance { + let batch_call = RuntimeCall::Utility(batch); + let batch_info = batch_call.get_dispatch_info(); + let xt = construct_extrinsic(Alice, batch_call); + TransactionPayment::compute_fee(xt.encoded_size() as _, &batch_info, 0) +} + +fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { + bridge_hub_test_utils::CollatorSessionKeys::new( + AccountId::from(Alice), + AccountId::from(Alice), + SessionKeys { aura: AuraId::from(Alice.public()) }, + ) +} + +fn slot_durations() -> SlotDurations { + SlotDurations { + relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()), + para: SlotDuration::from_millis(SLOT_DURATION), + } +} + +bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!( + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + CheckingAccount, + WeightToFee, + ParachainSystem, + collator_session_keys(), + slot_durations(), + ExistentialDeposit::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event), + _ => None, + } + }), + 1002 +); + +#[test] +fn test_ed_is_one_tenth_of_relay() { + let relay_ed = paseo_runtime_constants::currency::EXISTENTIAL_DEPOSIT; + let bridge_hub_ed = ExistentialDeposit::get(); + assert_eq!(relay_ed / 10, bridge_hub_ed); +} + +#[test] +fn initialize_bridge_by_governance_works() { + bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::< + Runtime, + BridgeGrandpaKusamaInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_bridge_grandpa_pallet_mode_by_governance_works() { + // for Kusama finality + bridge_hub_test_utils::test_cases::change_bridge_grandpa_pallet_mode_by_governance_works::< + Runtime, + BridgeGrandpaKusamaInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_bridge_parachains_pallet_mode_by_governance_works() { + // for Kusama parachains finality + bridge_hub_test_utils::test_cases::change_bridge_parachains_pallet_mode_by_governance_works::< + Runtime, + BridgeParachainKusamaInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_bridge_messages_pallet_mode_by_governance_works() { + // for Kusama messages + bridge_hub_test_utils::test_cases::change_bridge_messages_pallet_mode_by_governance_works::< + Runtime, + WithBridgeHubKusamaMessagesInstance, + >(collator_session_keys(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID) +} + +#[test] +fn change_delivery_reward_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + DeliveryRewardInBalance, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (DeliveryRewardInBalance::key().to_vec(), DeliveryRewardInBalance::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn change_required_stake_by_governance_works() { + bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::< + Runtime, + RequiredStakeForStakeAndSlash, + Balance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + Box::new(|call| RuntimeCall::System(call).encode()), + || (RequiredStakeForStakeAndSlash::key().to_vec(), RequiredStakeForStakeAndSlash::get()), + |old_value| old_value.checked_mul(2).unwrap(), + ) +} + +#[test] +fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { + bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::< + Runtime, + XcmConfig, + WithBridgeHubKusamaMessagesInstance, + >( + collator_session_keys(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::BridgeKusamaMessages(event)) => Some(event), + _ => None, + } + }), + || ExportMessage { network: Kusama, destination: Parachain(AssetHubKusamaParaId::get().into()).into(), xcm: Xcm(vec![]) }, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), + // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` + Some((DotRelayLocation::get(), bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get()).into()), + || PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubKusamaLocation::get()), XCM_VERSION).expect("version saved!"), + ) +} + +#[test] +fn message_dispatch_routing_works() { + bridge_hub_test_utils::test_cases::message_dispatch_routing_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + ParachainSystem, + WithBridgeHubKusamaMessagesInstance, + RelayNetwork, + KusamaGlobalConsensusNetwork, + ConstU8<2>, + >( + collator_session_keys(), + slot_durations(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::ParachainSystem(event)) => Some(event), + _ => None, + } + }), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::XcmpQueue(event)) => Some(event), + _ => None, + } + }), + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + || (), + ) +} + +#[test] +fn relayed_incoming_message_works() { + from_parachain::relayed_incoming_message_works::( + collator_session_keys(), + slot_durations(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + BridgeHubKusamaChainId::get(), + SIBLING_PARACHAIN_ID, + Polkadot, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + || (), + construct_and_apply_extrinsic, + ) +} + +#[test] +pub fn complex_relay_extrinsic_works() { + from_parachain::complex_relay_extrinsic_works::( + collator_session_keys(), + slot_durations(), + bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, + bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, + SIBLING_PARACHAIN_ID, + BridgeHubKusamaChainId::get(), + Polkadot, + XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + || (), + construct_and_apply_extrinsic, + ); +} + +#[test] +pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get(), + || { + bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::< + Runtime, + XcmConfig, + WeightToFee, + >() + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `ExportMessage` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_delivery_transaction() { + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_delivery_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message delivery` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { + check_sane_fees_values( + "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots", + bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots::get(), + || { + from_parachain::can_calculate_fee_for_complex_message_confirmation_transaction::< + RuntimeTestsAdapter, + >(collator_session_keys(), construct_and_estimate_extrinsic_fee) + }, + Perbill::from_percent(33), + Some(-33), + &format!( + "Estimate fee for `single message confirmation` for runtime: {:?}", + ::Version::get() + ), + ) +} + +#[test] +fn treasury_pallet_account_not_none() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} + +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) +/// A helper function for comparing the actual value of a fee constant with its estimated value. The +/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the +/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the +/// actual value. +pub fn check_sane_fees_values( + const_name: &str, + actual: u128, + calculate_estimated_fee: fn() -> u128, + overestimate_in_percent: Perbill, + margin_overestimate_diff_in_percent_for_lowering: Option, + label: &str, +) { + let estimated = calculate_estimated_fee(); + let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated); + let diff_to_estimated = diff_as_percent(actual, estimated); + let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate); + + log::error!( + target: "bridges::estimate", + "{label}:\nconstant: {const_name}\n[+] actual: {actual}\n[+] estimated: {estimated} ({diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?})", + ); + + // check if estimated value is sane + assert!( + estimated <= actual, + "estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + assert!( + estimated_plus_overestimate <= actual, + "estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + + if let Some(margin_overestimate_diff_in_percent_for_lowering) = + margin_overestimate_diff_in_percent_for_lowering + { + assert!( + diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64, + "diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", + ); + } +} + +// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) +pub fn diff_as_percent(left: u128, right: u128) -> f64 { + let left = left as f64; + let right = right as f64; + ((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64 +} diff --git a/system-parachains/people-paseo/src/weights/block_weights.rs b/system-parachains/people-paseo/src/weights/block_weights.rs index c2824b5..e7fdb2a 100644 --- a/system-parachains/people-paseo/src/weights/block_weights.rs +++ b/system-parachains/people-paseo/src/weights/block_weights.rs @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Importing a block with 0 Extrinsics. pub const BlockExecutionWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(10_000_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0); } #[cfg(test)] diff --git a/system-parachains/people-paseo/src/weights/cumulus_pallet_parachain_system.rs b/system-parachains/people-paseo/src/weights/cumulus_pallet_parachain_system.rs index f6fab7f..e6ca8ce 100644 --- a/system-parachains/people-paseo/src/weights/cumulus_pallet_parachain_system.rs +++ b/system-parachains/people-paseo/src/weights/cumulus_pallet_parachain_system.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `cumulus_pallet_parachain_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_parachain_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -60,13 +60,13 @@ impl cumulus_pallet_parachain_system::WeightInfo for We /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84` + // Measured: `12` // Estimated: `3517` - // Minimum execution time: 2_453_000 picoseconds. - Weight::from_parts(2_553_000, 0) + // Minimum execution time: 2_200_000 picoseconds. + Weight::from_parts(2_270_000, 0) .saturating_add(Weight::from_parts(0, 3517)) - // Standard Error: 349_908 - .saturating_add(Weight::from_parts(207_948_706, 0).saturating_mul(n.into())) + // Standard Error: 22_140 + .saturating_add(Weight::from_parts(182_153_021, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) diff --git a/system-parachains/people-paseo/src/weights/cumulus_pallet_xcmp_queue.rs b/system-parachains/people-paseo/src/weights/cumulus_pallet_xcmp_queue.rs index 099c6c2..4ae73fb 100644 --- a/system-parachains/people-paseo/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/system-parachains/people-paseo/src/weights/cumulus_pallet_xcmp_queue.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `cumulus_pallet_xcmp_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=cumulus_pallet_xcmp_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +53,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 3_675_000 picoseconds. - Weight::from_parts(3_947_000, 0) + // Minimum execution time: 5_120_000 picoseconds. + Weight::from_parts(5_300_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,10 +71,10 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn enqueue_xcmp_message() -> Weight { // Proof Size summary in bytes: - // Measured: `118` + // Measured: `82` // Estimated: `3517` - // Minimum execution time: 9_726_000 picoseconds. - Weight::from_parts(10_236_000, 0) + // Minimum execution time: 13_990_000 picoseconds. + Weight::from_parts(14_220_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -85,8 +85,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `76` // Estimated: `1561` - // Minimum execution time: 2_604_000 picoseconds. - Weight::from_parts(2_794_000, 0) + // Minimum execution time: 3_110_000 picoseconds. + Weight::from_parts(3_250_000, 0) .saturating_add(Weight::from_parts(0, 1561)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -97,8 +97,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `111` // Estimated: `1596` - // Minimum execution time: 3_576_000 picoseconds. - Weight::from_parts(3_796_000, 0) + // Minimum execution time: 4_280_000 picoseconds. + Weight::from_parts(4_430_000, 0) .saturating_add(Weight::from_parts(0, 1596)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,8 +107,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_469_000 picoseconds. - Weight::from_parts(5_578_000, 0) + // Minimum execution time: 7_310_000 picoseconds. + Weight::from_parts(7_500_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1) @@ -127,11 +127,11 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn on_idle_good_msg() -> Weight { // Proof Size summary in bytes: - // Measured: `65747` - // Estimated: `69212` - // Minimum execution time: 103_916_000 picoseconds. - Weight::from_parts(107_673_000, 0) - .saturating_add(Weight::from_parts(0, 69212)) + // Measured: `65711` + // Estimated: `69176` + // Minimum execution time: 112_531_000 picoseconds. + Weight::from_parts(113_601_000, 0) + .saturating_add(Weight::from_parts(0, 69176)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -143,8 +143,8 @@ impl cumulus_pallet_xcmp_queue::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `65710` // Estimated: `69175` - // Minimum execution time: 50_415_000 picoseconds. - Weight::from_parts(52_088_000, 0) + // Minimum execution time: 55_230_000 picoseconds. + Weight::from_parts(55_871_000, 0) .saturating_add(Weight::from_parts(0, 69175)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/people-paseo/src/weights/extrinsic_weights.rs b/system-parachains/people-paseo/src/weights/extrinsic_weights.rs index 10c7bbf..332c3b3 100644 --- a/system-parachains/people-paseo/src/weights/extrinsic_weights.rs +++ b/system-parachains/people-paseo/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ // This file is part of Substrate. -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) 2022 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,7 +24,7 @@ pub mod constants { parameter_types! { /// Executing a NO-OP `System::remarks` Extrinsic. pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(250_000), 0); + Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0); } #[cfg(test)] diff --git a/system-parachains/people-paseo/src/weights/frame_system.rs b/system-parachains/people-paseo/src/weights/frame_system.rs index a123053..f15eb91 100644 --- a/system-parachains/people-paseo/src/weights/frame_system.rs +++ b/system-parachains/people-paseo/src/weights/frame_system.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=frame_system // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,22 +52,22 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_212_000 picoseconds. - Weight::from_parts(44_195_073, 0) + // Minimum execution time: 2_140_000 picoseconds. + Weight::from_parts(2_220_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 3 - .saturating_add(Weight::from_parts(274, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(352, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_359_000 picoseconds. - Weight::from_parts(121_418_736, 0) + // Minimum execution time: 5_690_000 picoseconds. + Weight::from_parts(5_780_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(1_520, 0).saturating_mul(b.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_694, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -77,8 +77,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 2_143_000 picoseconds. - Weight::from_parts(3_195_000, 0) + // Minimum execution time: 3_690_000 picoseconds. + Weight::from_parts(3_940_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -97,11 +97,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `164` - // Estimated: `1649` - // Minimum execution time: 78_647_864_000 picoseconds. - Weight::from_parts(83_016_370_000, 0) - .saturating_add(Weight::from_parts(0, 1649)) + // Measured: `127` + // Estimated: `1612` + // Minimum execution time: 118_903_125_000 picoseconds. + Weight::from_parts(123_147_987_000, 0) + .saturating_add(Weight::from_parts(0, 1612)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -112,11 +112,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_232_000 picoseconds. - Weight::from_parts(1_282_000, 0) + // Minimum execution time: 2_200_000 picoseconds. + Weight::from_parts(2_280_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_519 - .saturating_add(Weight::from_parts(741_851, 0).saturating_mul(i.into())) + // Standard Error: 2_823 + .saturating_add(Weight::from_parts(912_309, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -126,11 +126,11 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_252_000 picoseconds. - Weight::from_parts(1_352_000, 0) + // Minimum execution time: 2_260_000 picoseconds. + Weight::from_parts(2_320_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_981 - .saturating_add(Weight::from_parts(555_408, 0).saturating_mul(i.into())) + // Standard Error: 983 + .saturating_add(Weight::from_parts(663_398, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -138,13 +138,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `84 + p * (69 ±0)` - // Estimated: `86 + p * (70 ±0)` - // Minimum execution time: 2_654_000 picoseconds. - Weight::from_parts(4_180_974, 0) - .saturating_add(Weight::from_parts(0, 86)) - // Standard Error: 9_488 - .saturating_add(Weight::from_parts(1_069_154, 0).saturating_mul(p.into())) + // Measured: `76 + p * (69 ±0)` + // Estimated: `77 + p * (70 ±0)` + // Minimum execution time: 4_170_000 picoseconds. + Weight::from_parts(4_270_000, 0) + .saturating_add(Weight::from_parts(0, 77)) + // Standard Error: 1_414 + .saturating_add(Weight::from_parts(1_322_415, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) @@ -155,8 +155,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_214_000 picoseconds. - Weight::from_parts(10_786_000, 0) + // Minimum execution time: 18_930_000 picoseconds. + Weight::from_parts(20_060_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -176,11 +176,11 @@ impl frame_system::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn apply_authorized_upgrade() -> Weight { // Proof Size summary in bytes: - // Measured: `186` - // Estimated: `1671` - // Minimum execution time: 88_156_678_000 picoseconds. - Weight::from_parts(96_636_141_000, 0) - .saturating_add(Weight::from_parts(0, 1671)) + // Measured: `149` + // Estimated: `1634` + // Minimum execution time: 116_622_483_000 picoseconds. + Weight::from_parts(119_357_067_000, 0) + .saturating_add(Weight::from_parts(0, 1634)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_balances.rs b/system-parachains/people-paseo/src/weights/pallet_balances.rs index bae1870..a66c1cc 100644 --- a/system-parachains/people-paseo/src/weights/pallet_balances.rs +++ b/system-parachains/people-paseo/src/weights/pallet_balances.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_balances // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_986_000 picoseconds. - Weight::from_parts(38_007_000, 0) + // Minimum execution time: 51_240_000 picoseconds. + Weight::from_parts(51_560_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +65,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 28_975_000 picoseconds. - Weight::from_parts(29_834_000, 0) + // Minimum execution time: 40_040_000 picoseconds. + Weight::from_parts(40_511_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 10_596_000 picoseconds. - Weight::from_parts(10_856_000, 0) + // Minimum execution time: 15_990_000 picoseconds. + Weight::from_parts(16_550_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 14_772_000 picoseconds. - Weight::from_parts(15_252_000, 0) + // Minimum execution time: 21_570_000 picoseconds. + Weight::from_parts(21_891_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -101,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 38_938_000 picoseconds. - Weight::from_parts(40_060_000, 0) + // Minimum execution time: 52_510_000 picoseconds. + Weight::from_parts(53_180_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -113,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 36_975_000 picoseconds. - Weight::from_parts(37_576_000, 0) + // Minimum execution time: 50_210_000 picoseconds. + Weight::from_parts(50_761_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -125,8 +125,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `174` // Estimated: `3593` - // Minimum execution time: 13_040_000 picoseconds. - Weight::from_parts(13_390_000, 0) + // Minimum execution time: 19_360_000 picoseconds. + Weight::from_parts(19_930_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -138,11 +138,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (136 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 12_439_000 picoseconds. - Weight::from_parts(12_629_000, 0) + // Minimum execution time: 17_250_000 picoseconds. + Weight::from_parts(17_370_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 49_710 - .saturating_add(Weight::from_parts(12_855_431, 0).saturating_mul(u.into())) + // Standard Error: 12_266 + .saturating_add(Weight::from_parts(15_362_474, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) @@ -153,8 +153,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1501` - // Minimum execution time: 3_845_000 picoseconds. - Weight::from_parts(4_436_000, 0) + // Minimum execution time: 6_520_000 picoseconds. + Weight::from_parts(6_841_000, 0) .saturating_add(Weight::from_parts(0, 1501)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_collator_selection.rs b/system-parachains/people-paseo/src/weights/pallet_collator_selection.rs index f5eb0da..454092c 100644 --- a/system-parachains/people-paseo/src/weights/pallet_collator_selection.rs +++ b/system-parachains/people-paseo/src/weights/pallet_collator_selection.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_collator_selection` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_collator_selection // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -54,13 +54,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `b` is `[1, 20]`. fn set_invulnerables(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `196 + b * (79 ±0)` - // Estimated: `1187 + b * (2555 ±0)` - // Minimum execution time: 8_683_000 picoseconds. - Weight::from_parts(7_287_414, 0) - .saturating_add(Weight::from_parts(0, 1187)) - // Standard Error: 12_385 - .saturating_add(Weight::from_parts(2_826_094, 0).saturating_mul(b.into())) + // Measured: `197 + b * (79 ±0)` + // Estimated: `1188 + b * (2555 ±0)` + // Minimum execution time: 14_190_000 picoseconds. + Weight::from_parts(10_937_805, 0) + .saturating_add(Weight::from_parts(0, 1188)) + // Standard Error: 8_677 + .saturating_add(Weight::from_parts(3_916_619, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into()))) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into())) @@ -77,15 +77,15 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn add_invulnerable(b: u32, c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `794 + b * (32 ±0) + c * (53 ±0)` + // Measured: `795 + b * (32 ±0) + c * (53 ±0)` // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)` - // Minimum execution time: 30_106_000 picoseconds. - Weight::from_parts(34_394_275, 0) + // Minimum execution time: 43_670_000 picoseconds. + Weight::from_parts(43_035_011, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 31_833 - .saturating_add(Weight::from_parts(36_601, 0).saturating_mul(b.into())) - // Standard Error: 6_034 - .saturating_add(Weight::from_parts(139_478, 0).saturating_mul(c.into())) + // Standard Error: 5_966 + .saturating_add(Weight::from_parts(65_164, 0).saturating_mul(b.into())) + // Standard Error: 1_130 + .saturating_add(Weight::from_parts(85_765, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -100,11 +100,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `119 + b * (32 ±0)` // Estimated: `6287` - // Minimum execution time: 8_262_000 picoseconds. - Weight::from_parts(6_380_993, 0) + // Minimum execution time: 13_920_000 picoseconds. + Weight::from_parts(14_097_131, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 14_585 - .saturating_add(Weight::from_parts(366_470, 0).saturating_mul(b.into())) + // Standard Error: 847 + .saturating_add(Weight::from_parts(71_905, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -114,8 +114,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_135_000 picoseconds. - Weight::from_parts(3_425_000, 0) + // Minimum execution time: 5_050_000 picoseconds. + Weight::from_parts(5_230_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -133,13 +133,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + c * (182 ±0) + k * (115 ±0)` // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)` - // Minimum execution time: 7_612_000 picoseconds. - Weight::from_parts(7_792_000, 0) + // Minimum execution time: 11_310_000 picoseconds. + Weight::from_parts(11_580_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(5_084_810, 0).saturating_mul(c.into())) - // Standard Error: 153_128 - .saturating_add(Weight::from_parts(4_826_091, 0).saturating_mul(k.into())) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_976_256, 0).saturating_mul(c.into())) + // Standard Error: 180_859 + .saturating_add(Weight::from_parts(5_764_922, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) @@ -156,11 +156,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `319 + c * (49 ±0)` // Estimated: `6287` - // Minimum execution time: 19_259_000 picoseconds. - Weight::from_parts(24_163_743, 0) + // Minimum execution time: 29_880_000 picoseconds. + Weight::from_parts(30_707_589, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 7_063 - .saturating_add(Weight::from_parts(100_427, 0).saturating_mul(c.into())) + // Standard Error: 696 + .saturating_add(Weight::from_parts(71_379, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -177,13 +177,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[1, 99]`. fn register_as_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `764 + c * (52 ±0)` + // Measured: `765 + c * (52 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 24_887_000 picoseconds. - Weight::from_parts(30_444_592, 0) + // Minimum execution time: 40_610_000 picoseconds. + Weight::from_parts(42_206_170, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_059 - .saturating_add(Weight::from_parts(160_728, 0).saturating_mul(c.into())) + // Standard Error: 581 + .saturating_add(Weight::from_parts(89_595, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -203,13 +203,13 @@ impl pallet_collator_selection::WeightInfo for WeightIn /// The range of component `c` is `[3, 100]`. fn take_candidate_slot(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `904 + c * (53 ±0)` + // Measured: `905 + c * (53 ±0)` // Estimated: `6287 + c * (54 ±0)` - // Minimum execution time: 39_891_000 picoseconds. - Weight::from_parts(45_664_305, 0) + // Minimum execution time: 60_730_000 picoseconds. + Weight::from_parts(62_334_826, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 9_782 - .saturating_add(Weight::from_parts(145_773, 0).saturating_mul(c.into())) + // Standard Error: 1_195 + .saturating_add(Weight::from_parts(94_762, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into())) @@ -225,11 +225,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `347 + c * (48 ±0)` // Estimated: `6287` - // Minimum execution time: 21_492_000 picoseconds. - Weight::from_parts(24_715_893, 0) + // Minimum execution time: 32_510_000 picoseconds. + Weight::from_parts(33_664_142, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 6_042 - .saturating_add(Weight::from_parts(140_303, 0).saturating_mul(c.into())) + // Standard Error: 793 + .saturating_add(Weight::from_parts(79_554, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -243,8 +243,8 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `155` // Estimated: `6196` - // Minimum execution time: 33_530_000 picoseconds. - Weight::from_parts(51_207_000, 0) + // Minimum execution time: 45_790_000 picoseconds. + Weight::from_parts(46_310_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) @@ -267,11 +267,11 @@ impl pallet_collator_selection::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `2302 + c * (97 ±0) + r * (114 ±0)` // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)` - // Minimum execution time: 14_521_000 picoseconds. - Weight::from_parts(14_894_000, 0) + // Minimum execution time: 22_290_000 picoseconds. + Weight::from_parts(22_510_000, 0) .saturating_add(Weight::from_parts(0, 6287)) - // Standard Error: 275_017 - .saturating_add(Weight::from_parts(12_614_016, 0).saturating_mul(c.into())) + // Standard Error: 319_996 + .saturating_add(Weight::from_parts(14_036_037, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/people-paseo/src/weights/pallet_identity.rs b/system-parachains/people-paseo/src/weights/pallet_identity.rs index 7fc1469..f9abe98 100644 --- a/system-parachains/people-paseo/src/weights/pallet_identity.rs +++ b/system-parachains/people-paseo/src/weights/pallet_identity.rs @@ -13,26 +13,27 @@ // 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 `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-03-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ggwpez-ref-hw`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo-chain-spec.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: // ./target/production/paseo // benchmark // pallet -// --chain=./paseo-chain-spec.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_identity // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./paseo-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,31 +54,31 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `32 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 7_476_000 picoseconds. - Weight::from_parts(8_068_602, 0) + // Minimum execution time: 10_170_000 picoseconds. + Weight::from_parts(10_910_573, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 1_238 - .saturating_add(Weight::from_parts(82_244, 0).saturating_mul(r.into())) + // Standard Error: 1_475 + .saturating_add(Weight::from_parts(77_036, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn set_identity(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6978 + r * (5 ±0)` - // Estimated: `11037` - // Minimum execution time: 104_591_000 picoseconds. - Weight::from_parts(107_199_522, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 6_435 - .saturating_add(Weight::from_parts(148_902, 0).saturating_mul(r.into())) + // Measured: `442 + r * (5 ±0)` + // Estimated: `4303` + // Minimum execution time: 21_900_000 picoseconds. + Weight::from_parts(22_556_446, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_301 + .saturating_add(Weight::from_parts(73_485, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:100 w:100) @@ -86,12 +87,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn set_subs_new(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `101` - // Estimated: `11037 + s * (2589 ±0)` - // Minimum execution time: 8_067_000 picoseconds. - Weight::from_parts(18_616_651, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 3_834 - .saturating_add(Weight::from_parts(3_075_321, 0).saturating_mul(s.into())) + // Estimated: `6723 + s * (2589 ±0)` + // Minimum execution time: 11_530_000 picoseconds. + Weight::from_parts(26_340_120, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_559 + .saturating_add(Weight::from_parts(3_752_733, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,7 +100,7 @@ impl pallet_identity::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 2589).saturating_mul(s.into())) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:0 w:100) @@ -108,12 +109,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `194 + p * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 7_931_000 picoseconds. - Weight::from_parts(19_401_564, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 2_980 - .saturating_add(Weight::from_parts(1_292_066, 0).saturating_mul(p.into())) + // Estimated: `6723` + // Minimum execution time: 11_440_000 picoseconds. + Weight::from_parts(26_469_985, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_423 + .saturating_add(Weight::from_parts(1_527_524, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -121,22 +122,22 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:0 w:100) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. fn clear_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7070 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 50_902_000 picoseconds. - Weight::from_parts(51_250_065, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 12_441 - .saturating_add(Weight::from_parts(174_014, 0).saturating_mul(r.into())) - // Standard Error: 2_427 - .saturating_add(Weight::from_parts(1_298_613, 0).saturating_mul(s.into())) + // Measured: `534 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 32_480_000 picoseconds. + Weight::from_parts(34_550_972, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 3_821 + .saturating_add(Weight::from_parts(40_875, 0).saturating_mul(r.into())) + // Standard Error: 745 + .saturating_add(Weight::from_parts(1_506_296, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -144,32 +145,32 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::Registrars` (r:1 w:0) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn request_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6968 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 71_685_000 picoseconds. - Weight::from_parts(73_296_911, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 4_701 - .saturating_add(Weight::from_parts(152_413, 0).saturating_mul(r.into())) + // Measured: `432 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 32_880_000 picoseconds. + Weight::from_parts(33_710_626, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_752 + .saturating_add(Weight::from_parts(83_866, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. fn cancel_request(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `6999` - // Estimated: `11037` - // Minimum execution time: 69_785_000 picoseconds. - Weight::from_parts(71_089_142, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 3_819 - .saturating_add(Weight::from_parts(101_852, 0).saturating_mul(r.into())) + // Measured: `463` + // Estimated: `4303` + // Minimum execution time: 30_611_000 picoseconds. + Weight::from_parts(31_279_114, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_248 + .saturating_add(Weight::from_parts(51_954, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,11 +181,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_213_000 picoseconds. - Weight::from_parts(5_581_162, 0) + // Minimum execution time: 7_660_000 picoseconds. + Weight::from_parts(8_100_141, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 981 - .saturating_add(Weight::from_parts(78_901, 0).saturating_mul(r.into())) + // Standard Error: 1_070 + .saturating_add(Weight::from_parts(65_495, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -195,11 +196,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_337_000 picoseconds. - Weight::from_parts(5_799_042, 0) + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(8_386_766, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 939 - .saturating_add(Weight::from_parts(70_694, 0).saturating_mul(r.into())) + // Standard Error: 1_018 + .saturating_add(Weight::from_parts(70_921, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -210,58 +211,60 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 5_357_000 picoseconds. - Weight::from_parts(5_658_168, 0) + // Minimum execution time: 7_630_000 picoseconds. + Weight::from_parts(8_157_028, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 948 - .saturating_add(Weight::from_parts(72_410, 0).saturating_mul(r.into())) + // Standard Error: 993 + .saturating_add(Weight::from_parts(60_239, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:0) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. fn provide_judgement(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7046 + r * (57 ±0)` - // Estimated: `11037` - // Minimum execution time: 92_729_000 picoseconds. - Weight::from_parts(94_462_797, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 5_319 - .saturating_add(Weight::from_parts(107_982, 0).saturating_mul(r.into())) + // Measured: `510 + r * (57 ±0)` + // Estimated: `4303` + // Minimum execution time: 23_890_000 picoseconds. + Weight::from_parts(24_425_598, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 1_271 + .saturating_add(Weight::from_parts(82_894, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::SubsOf` (r:1 w:1) /// Proof: `Identity::SubsOf` (`max_values`: None, `max_size`: Some(3258), added: 5733, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, 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: `Identity::SuperOf` (r:0 w:100) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. fn kill_identity(r: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `7277 + r * (5 ±0) + s * (32 ±0)` - // Estimated: `11037` - // Minimum execution time: 64_407_000 picoseconds. - Weight::from_parts(67_522_869, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 15_370 - .saturating_add(Weight::from_parts(160_891, 0).saturating_mul(r.into())) - // Standard Error: 2_999 - .saturating_add(Weight::from_parts(1_313_042, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `773 + r * (5 ±0) + s * (32 ±0)` + // Estimated: `6723` + // Minimum execution time: 98_811_000 picoseconds. + Weight::from_parts(102_874_545, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 8_216 + .saturating_add(Weight::from_parts(87_859, 0).saturating_mul(r.into())) + // Standard Error: 1_603 + .saturating_add(Weight::from_parts(1_538_729, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) @@ -270,34 +273,34 @@ impl pallet_identity::WeightInfo for WeightInfo { fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `475 + s * (36 ±0)` - // Estimated: `11037` - // Minimum execution time: 23_539_000 picoseconds. - Weight::from_parts(27_045_777, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 1_594 - .saturating_add(Weight::from_parts(128_065, 0).saturating_mul(s.into())) + // Estimated: `6723` + // Minimum execution time: 30_600_000 picoseconds. + Weight::from_parts(35_674_099, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 1_256 + .saturating_add(Weight::from_parts(59_432, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `591 + s * (3 ±0)` - // Estimated: `11037` - // Minimum execution time: 11_418_000 picoseconds. - Weight::from_parts(14_873_630, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 914 - .saturating_add(Weight::from_parts(42_574, 0).saturating_mul(s.into())) + // Estimated: `4303` + // Minimum execution time: 15_420_000 picoseconds. + Weight::from_parts(17_843_179, 0) + .saturating_add(Weight::from_parts(0, 4303)) + // Standard Error: 610 + .saturating_add(Weight::from_parts(19_463, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::SuperOf` (r:1 w:1) /// Proof: `Identity::SuperOf` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`) /// Storage: `Identity::SubsOf` (r:1 w:1) @@ -306,12 +309,12 @@ impl pallet_identity::WeightInfo for WeightInfo { fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `638 + s * (35 ±0)` - // Estimated: `11037` - // Minimum execution time: 29_362_000 picoseconds. - Weight::from_parts(31_448_090, 0) - .saturating_add(Weight::from_parts(0, 11037)) - // Standard Error: 811 - .saturating_add(Weight::from_parts(88_172, 0).saturating_mul(s.into())) + // Estimated: `6723` + // Minimum execution time: 34_870_000 picoseconds. + Weight::from_parts(38_098_506, 0) + .saturating_add(Weight::from_parts(0, 6723)) + // Standard Error: 753 + .saturating_add(Weight::from_parts(44_603, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -326,11 +329,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `704 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 22_979_000 picoseconds. - Weight::from_parts(24_439_448, 0) + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(28_496_293, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 571 - .saturating_add(Weight::from_parts(82_739, 0).saturating_mul(s.into())) + // Standard Error: 766 + .saturating_add(Weight::from_parts(49_994, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -340,8 +343,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_105_000 picoseconds. - Weight::from_parts(6_441_000, 0) + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_370_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -351,8 +354,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80` // Estimated: `3517` - // Minimum execution time: 8_719_000 picoseconds. - Weight::from_parts(9_041_000, 0) + // Minimum execution time: 10_340_000 picoseconds. + Weight::from_parts(10_680_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -364,30 +367,30 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::PendingUsernames` (r:1 w:0) /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn set_username_for() -> Weight { // Proof Size summary in bytes: // Measured: `80` - // Estimated: `11037` - // Minimum execution time: 65_333_000 picoseconds. - Weight::from_parts(67_018_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 76_551_000 picoseconds. + Weight::from_parts(77_370_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `Identity::PendingUsernames` (r:1 w:1) /// Proof: `Identity::PendingUsernames` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) /// Storage: `Identity::AccountOfUsername` (r:0 w:1) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) fn accept_username() -> Weight { // Proof Size summary in bytes: // Measured: `115` - // Estimated: `11037` - // Minimum execution time: 19_237_000 picoseconds. - Weight::from_parts(19_746_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 23_930_000 picoseconds. + Weight::from_parts(24_590_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -397,8 +400,8 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `115` // Estimated: `3550` - // Minimum execution time: 16_277_000 picoseconds. - Weight::from_parts(20_932_000, 0) + // Minimum execution time: 14_430_000 picoseconds. + Weight::from_parts(15_291_000, 0) .saturating_add(Weight::from_parts(0, 3550)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -406,28 +409,28 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Storage: `Identity::AccountOfUsername` (r:1 w:0) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:1) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn set_primary_username() -> Weight { // Proof Size summary in bytes: - // Measured: `257` - // Estimated: `11037` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_349_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Measured: `258` + // Estimated: `4303` + // Minimum execution time: 20_460_000 picoseconds. + Weight::from_parts(20_770_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::AccountOfUsername` (r:1 w:1) /// Proof: `Identity::AccountOfUsername` (`max_values`: None, `max_size`: Some(81), added: 2556, mode: `MaxEncodedLen`) /// Storage: `Identity::IdentityOf` (r:1 w:0) - /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7572), added: 10047, mode: `MaxEncodedLen`) + /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(838), added: 3313, mode: `MaxEncodedLen`) fn remove_dangling_username() -> Weight { // Proof Size summary in bytes: // Measured: `98` - // Estimated: `11037` - // Minimum execution time: 10_637_000 picoseconds. - Weight::from_parts(10_971_000, 0) - .saturating_add(Weight::from_parts(0, 11037)) + // Estimated: `4303` + // Minimum execution time: 12_460_000 picoseconds. + Weight::from_parts(12_850_000, 0) + .saturating_add(Weight::from_parts(0, 4303)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_message_queue.rs b/system-parachains/people-paseo/src/weights/pallet_message_queue.rs index da13b11..6268f30 100644 --- a/system-parachains/people-paseo/src/weights/pallet_message_queue.rs +++ b/system-parachains/people-paseo/src/weights/pallet_message_queue.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_message_queue` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_message_queue // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +53,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn ready_ring_knit() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `223` // Estimated: `6044` - // Minimum execution time: 10_686_000 picoseconds. - Weight::from_parts(11_016_000, 0) + // Minimum execution time: 14_810_000 picoseconds. + Weight::from_parts(15_050_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,10 +67,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) fn ready_ring_unknit() -> Weight { // Proof Size summary in bytes: - // Measured: `255` + // Measured: `218` // Estimated: `6044` - // Minimum execution time: 9_324_000 picoseconds. - Weight::from_parts(9_874_000, 0) + // Minimum execution time: 12_990_000 picoseconds. + Weight::from_parts(13_270_000, 0) .saturating_add(Weight::from_parts(0, 6044)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -79,10 +79,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn service_queue_base() -> Weight { // Proof Size summary in bytes: - // Measured: `42` + // Measured: `6` // Estimated: `3517` - // Minimum execution time: 4_176_000 picoseconds. - Weight::from_parts(4_407_000, 0) + // Minimum execution time: 4_460_000 picoseconds. + Weight::from_parts(4_550_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,10 +91,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_789_000 picoseconds. - Weight::from_parts(6_069_000, 0) + // Minimum execution time: 6_770_000 picoseconds. + Weight::from_parts(6_890_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -103,10 +103,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn service_page_base_no_completion() -> Weight { // Proof Size summary in bytes: - // Measured: `109` + // Measured: `72` // Estimated: `69050` - // Minimum execution time: 5_969_000 picoseconds. - Weight::from_parts(6_240_000, 0) + // Minimum execution time: 7_090_000 picoseconds. + Weight::from_parts(7_170_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -119,8 +119,8 @@ impl pallet_message_queue::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 167_292_000 picoseconds. - Weight::from_parts(172_399_000, 0) + // Minimum execution time: 155_941_000 picoseconds. + Weight::from_parts(157_871_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -130,10 +130,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) fn bump_service_head() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `171` // Estimated: `3517` - // Minimum execution time: 6_310_000 picoseconds. - Weight::from_parts(6_680_000, 0) + // Minimum execution time: 8_390_000 picoseconds. + Weight::from_parts(8_780_000, 0) .saturating_add(Weight::from_parts(0, 3517)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -144,10 +144,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn reap_page() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 40_250_000 picoseconds. - Weight::from_parts(41_033_000, 0) + // Minimum execution time: 55_421_000 picoseconds. + Weight::from_parts(56_290_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -158,10 +158,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_removed() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 57_636_000 picoseconds. - Weight::from_parts(58_778_000, 0) + // Minimum execution time: 74_790_000 picoseconds. + Weight::from_parts(75_821_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -172,10 +172,10 @@ impl pallet_message_queue::WeightInfo for WeightInfo /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`) fn execute_overweight_page_updated() -> Weight { // Proof Size summary in bytes: - // Measured: `65704` + // Measured: `65667` // Estimated: `69050` - // Minimum execution time: 104_918_000 picoseconds. - Weight::from_parts(109_534_000, 0) + // Minimum execution time: 107_001_000 picoseconds. + Weight::from_parts(107_981_000, 0) .saturating_add(Weight::from_parts(0, 69050)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/system-parachains/people-paseo/src/weights/pallet_multisig.rs b/system-parachains/people-paseo/src/weights/pallet_multisig.rs index 77bf8d4..284066a 100644 --- a/system-parachains/people-paseo/src/weights/pallet_multisig.rs +++ b/system-parachains/people-paseo/src/weights/pallet_multisig.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_multisig // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,11 +52,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 10_547_000 picoseconds. - Weight::from_parts(13_504_530, 0) + // Minimum execution time: 13_090_000 picoseconds. + Weight::from_parts(13_559_872, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 43 - .saturating_add(Weight::from_parts(363, 0).saturating_mul(z.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(473, 0).saturating_mul(z.into())) } /// Storage: `Multisig::Multisigs` (r:1 w:1) /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`) @@ -66,13 +66,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 33_590_000 picoseconds. - Weight::from_parts(37_534_149, 0) + // Minimum execution time: 42_160_000 picoseconds. + Weight::from_parts(35_003_454, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_735 - .saturating_add(Weight::from_parts(94_337, 0).saturating_mul(s.into())) - // Standard Error: 65 - .saturating_add(Weight::from_parts(96, 0).saturating_mul(z.into())) + // Standard Error: 370 + .saturating_add(Weight::from_parts(78_069, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_465, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -84,13 +84,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 21_943_000 picoseconds. - Weight::from_parts(23_127_449, 0) + // Minimum execution time: 27_510_000 picoseconds. + Weight::from_parts(20_107_020, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 5_815 - .saturating_add(Weight::from_parts(32_010, 0).saturating_mul(s.into())) - // Standard Error: 56 - .saturating_add(Weight::from_parts(975, 0).saturating_mul(z.into())) + // Standard Error: 385 + .saturating_add(Weight::from_parts(81_571, 0).saturating_mul(s.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_442, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -104,13 +104,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `388 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 35_183_000 picoseconds. - Weight::from_parts(22_693_078, 0) + // Minimum execution time: 47_311_000 picoseconds. + Weight::from_parts(37_786_802, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 7_571 - .saturating_add(Weight::from_parts(192_205, 0).saturating_mul(s.into())) - // Standard Error: 74 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(z.into())) + // Standard Error: 447 + .saturating_add(Weight::from_parts(102_532, 0).saturating_mul(s.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(1_507, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -121,11 +121,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `263 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 20_701_000 picoseconds. - Weight::from_parts(21_204_358, 0) + // Minimum execution time: 32_231_000 picoseconds. + Weight::from_parts(33_396_272, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_948 - .saturating_add(Weight::from_parts(119_886, 0).saturating_mul(s.into())) + // Standard Error: 498 + .saturating_add(Weight::from_parts(83_284, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -136,11 +136,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `282` // Estimated: `6811` - // Minimum execution time: 11_627_000 picoseconds. - Weight::from_parts(12_970_988, 0) + // Minimum execution time: 17_960_000 picoseconds. + Weight::from_parts(18_711_852, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 3_773 - .saturating_add(Weight::from_parts(96_009, 0).saturating_mul(s.into())) + // Standard Error: 424 + .saturating_add(Weight::from_parts(80_456, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -151,11 +151,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 22_315_000 picoseconds. - Weight::from_parts(26_544_895, 0) + // Minimum execution time: 33_150_000 picoseconds. + Weight::from_parts(34_338_146, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 6_172 - .saturating_add(Weight::from_parts(76_388, 0).saturating_mul(s.into())) + // Standard Error: 534 + .saturating_add(Weight::from_parts(81_790, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_proxy.rs b/system-parachains/people-paseo/src/weights/pallet_proxy.rs index 110dc23..b6c5b0d 100644 --- a/system-parachains/people-paseo/src/weights/pallet_proxy.rs +++ b/system-parachains/people-paseo/src/weights/pallet_proxy.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_proxy // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -54,11 +54,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 8_934_000 picoseconds. - Weight::from_parts(9_238_509, 0) + // Minimum execution time: 15_460_000 picoseconds. + Weight::from_parts(16_025_809, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 10_563 - .saturating_add(Weight::from_parts(181_825, 0).saturating_mul(p.into())) + // Standard Error: 791 + .saturating_add(Weight::from_parts(31_899, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -73,13 +73,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `454 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 24_386_000 picoseconds. - Weight::from_parts(27_267_051, 0) + // Minimum execution time: 39_530_000 picoseconds. + Weight::from_parts(39_017_116, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 12_649 - .saturating_add(Weight::from_parts(173_626, 0).saturating_mul(a.into())) - // Standard Error: 13_069 - .saturating_add(Weight::from_parts(4_242, 0).saturating_mul(p.into())) + // Standard Error: 1_364 + .saturating_add(Weight::from_parts(168_242, 0).saturating_mul(a.into())) + // Standard Error: 1_409 + .saturating_add(Weight::from_parts(40_679, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -93,13 +93,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 16_835_000 picoseconds. - Weight::from_parts(22_955_043, 0) + // Minimum execution time: 27_260_000 picoseconds. + Weight::from_parts(27_734_700, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_199 - .saturating_add(Weight::from_parts(565, 0).saturating_mul(a.into())) - // Standard Error: 13_637 - .saturating_add(Weight::from_parts(22_041, 0).saturating_mul(p.into())) + // Standard Error: 1_166 + .saturating_add(Weight::from_parts(160_940, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(1_830, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -113,13 +113,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369 + a * (68 ±0)` // Estimated: `5698` - // Minimum execution time: 16_735_000 picoseconds. - Weight::from_parts(17_777_793, 0) + // Minimum execution time: 27_110_000 picoseconds. + Weight::from_parts(27_556_536, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_591 - .saturating_add(Weight::from_parts(253_707, 0).saturating_mul(a.into())) - // Standard Error: 14_042 - .saturating_add(Weight::from_parts(3_438, 0).saturating_mul(p.into())) + // Standard Error: 1_131 + .saturating_add(Weight::from_parts(161_653, 0).saturating_mul(a.into())) + // Standard Error: 1_168 + .saturating_add(Weight::from_parts(5_215, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -135,13 +135,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `386 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 22_484_000 picoseconds. - Weight::from_parts(18_927_811, 0) + // Minimum execution time: 35_810_000 picoseconds. + Weight::from_parts(35_426_638, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 13_286 - .saturating_add(Weight::from_parts(230_534, 0).saturating_mul(a.into())) - // Standard Error: 13_727 - .saturating_add(Weight::from_parts(155_424, 0).saturating_mul(p.into())) + // Standard Error: 1_167 + .saturating_add(Weight::from_parts(142_989, 0).saturating_mul(a.into())) + // Standard Error: 1_205 + .saturating_add(Weight::from_parts(34_318, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -152,11 +152,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_443_000 picoseconds. - Weight::from_parts(17_113_970, 0) + // Minimum execution time: 25_710_000 picoseconds. + Weight::from_parts(26_128_239, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 21_184 - .saturating_add(Weight::from_parts(284_878, 0).saturating_mul(p.into())) + // Standard Error: 867 + .saturating_add(Weight::from_parts(44_158, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -167,11 +167,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_623_000 picoseconds. - Weight::from_parts(17_692_513, 0) + // Minimum execution time: 25_700_000 picoseconds. + Weight::from_parts(26_214_188, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 10_493 - .saturating_add(Weight::from_parts(24_243, 0).saturating_mul(p.into())) + // Standard Error: 903 + .saturating_add(Weight::from_parts(51_793, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -182,8 +182,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `127 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 14_952_000 picoseconds. - Weight::from_parts(21_939_532, 0) + // Minimum execution time: 23_280_000 picoseconds. + Weight::from_parts(23_861_316, 0) .saturating_add(Weight::from_parts(0, 4706)) // Standard Error: 851 .saturating_add(Weight::from_parts(34_051, 0).saturating_mul(p.into())) @@ -197,8 +197,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `139` // Estimated: `4706` - // Minimum execution time: 16_014_000 picoseconds. - Weight::from_parts(19_498_552, 0) + // Minimum execution time: 26_780_000 picoseconds. + Weight::from_parts(27_483_607, 0) .saturating_add(Weight::from_parts(0, 4706)) // Standard Error: 831 .saturating_add(Weight::from_parts(9_777, 0).saturating_mul(p.into())) @@ -212,11 +212,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `164 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 15_323_000 picoseconds. - Weight::from_parts(15_142_983, 0) + // Minimum execution time: 24_090_000 picoseconds. + Weight::from_parts(24_764_858, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 9_540 - .saturating_add(Weight::from_parts(140_362, 0).saturating_mul(p.into())) + // Standard Error: 771 + .saturating_add(Weight::from_parts(35_188, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_session.rs b/system-parachains/people-paseo/src/weights/pallet_session.rs index dbc3ef9..951fd94 100644 --- a/system-parachains/people-paseo/src/weights/pallet_session.rs +++ b/system-parachains/people-paseo/src/weights/pallet_session.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_session // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,11 +53,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `297` - // Estimated: `3762` - // Minimum execution time: 12_839_000 picoseconds. - Weight::from_parts(14_412_000, 0) - .saturating_add(Weight::from_parts(0, 3762)) + // Measured: `298` + // Estimated: `3763` + // Minimum execution time: 19_851_000 picoseconds. + Weight::from_parts(20_160_000, 0) + .saturating_add(Weight::from_parts(0, 3763)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -67,11 +67,11 @@ impl pallet_session::WeightInfo for WeightInfo { /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: - // Measured: `279` - // Estimated: `3744` - // Minimum execution time: 8_893_000 picoseconds. - Weight::from_parts(9_354_000, 0) - .saturating_add(Weight::from_parts(0, 3744)) + // Measured: `280` + // Estimated: `3745` + // Minimum execution time: 14_400_000 picoseconds. + Weight::from_parts(14_980_000, 0) + .saturating_add(Weight::from_parts(0, 3745)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/system-parachains/people-paseo/src/weights/pallet_timestamp.rs b/system-parachains/people-paseo/src/weights/pallet_timestamp.rs index 51c4dfa..54d6f7a 100644 --- a/system-parachains/people-paseo/src/weights/pallet_timestamp.rs +++ b/system-parachains/people-paseo/src/weights/pallet_timestamp.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_timestamp // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,10 +53,10 @@ impl pallet_timestamp::WeightInfo for WeightInfo { /// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) fn set() -> Weight { // Proof Size summary in bytes: - // Measured: `86` + // Measured: `49` // Estimated: `1493` - // Minimum execution time: 5_498_000 picoseconds. - Weight::from_parts(5_858_000, 0) + // Minimum execution time: 7_030_000 picoseconds. + Weight::from_parts(7_290_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,8 +65,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `57` // Estimated: `0` - // Minimum execution time: 2_473_000 picoseconds. - Weight::from_parts(2_614_000, 0) + // Minimum execution time: 3_730_000 picoseconds. + Weight::from_parts(3_810_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/people-paseo/src/weights/pallet_utility.rs b/system-parachains/people-paseo/src/weights/pallet_utility.rs index 06ca92f..fd3b964 100644 --- a/system-parachains/people-paseo/src/weights/pallet_utility.rs +++ b/system-parachains/people-paseo/src/weights/pallet_utility.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_utility // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -52,18 +52,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_074_000 picoseconds. - Weight::from_parts(3_155_000, 0) + // Minimum execution time: 4_840_000 picoseconds. + Weight::from_parts(19_759_881, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 14_227 - .saturating_add(Weight::from_parts(3_461_383, 0).saturating_mul(c.into())) + // Standard Error: 1_783 + .saturating_add(Weight::from_parts(3_256_436, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_025_000 picoseconds. - Weight::from_parts(3_165_000, 0) + // Minimum execution time: 4_690_000 picoseconds. + Weight::from_parts(4_810_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -71,18 +71,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_034_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 4_800_000 picoseconds. + Weight::from_parts(10_130_008, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 30_865 - .saturating_add(Weight::from_parts(3_998_927, 0).saturating_mul(c.into())) + // Standard Error: 810 + .saturating_add(Weight::from_parts(3_493_316, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_486_000 picoseconds. - Weight::from_parts(5_618_000, 0) + // Minimum execution time: 6_780_000 picoseconds. + Weight::from_parts(6_990_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -90,10 +90,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_145_000 picoseconds. - Weight::from_parts(3_886_000, 0) + // Minimum execution time: 4_770_000 picoseconds. + Weight::from_parts(9_219_590, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 25_226 - .saturating_add(Weight::from_parts(3_512_146, 0).saturating_mul(c.into())) + // Standard Error: 902 + .saturating_add(Weight::from_parts(3_279_047, 0).saturating_mul(c.into())) } } diff --git a/system-parachains/people-paseo/src/weights/pallet_xcm.rs b/system-parachains/people-paseo/src/weights/pallet_xcm.rs index cfdda36..9ddc270 100644 --- a/system-parachains/people-paseo/src/weights/pallet_xcm.rs +++ b/system-parachains/people-paseo/src/weights/pallet_xcm.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/ +// --output=./people-paseo-weights/ // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -47,8 +47,6 @@ use core::marker::PhantomData; /// Weight functions for `pallet_xcm`. pub struct WeightInfo(PhantomData); impl pallet_xcm::WeightInfo for WeightInfo { - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -61,88 +59,46 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn send() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 16_224_000 picoseconds. - Weight::from_parts(17_216_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 22_770_000 picoseconds. + Weight::from_parts(23_410_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn teleport_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3593` - // Minimum execution time: 80_631_000 picoseconds. - Weight::from_parts(83_485_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 71_851_000 picoseconds. + Weight::from_parts(73_250_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) - /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) - /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `333` - // Estimated: `6196` - // Minimum execution time: 100_521_000 picoseconds. - Weight::from_parts(103_285_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Assets::Asset` (r:1 w:1) - /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`) - /// Storage: `Assets::Account` (r:2 w:2) - /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) - /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) - /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_assets() -> Weight { @@ -167,8 +123,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_597_000 picoseconds. - Weight::from_parts(4_828_000, 0) + // Minimum execution time: 7_690_000 picoseconds. + Weight::from_parts(7_971_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -178,8 +134,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_452_000 picoseconds. - Weight::from_parts(1_552_000, 0) + // Minimum execution time: 2_670_000 picoseconds. + Weight::from_parts(2_770_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -187,8 +143,6 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) /// Proof: `PolkadotXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -203,18 +157,16 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_subscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 20_471_000 picoseconds. - Weight::from_parts(23_495_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 29_420_000 picoseconds. + Weight::from_parts(30_080_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `PolkadotXcm::VersionNotifiers` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -229,12 +181,12 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn force_unsubscribe_version_notify() -> Weight { // Proof Size summary in bytes: - // Measured: `329` - // Estimated: `3794` - // Minimum execution time: 23_616_000 picoseconds. - Weight::from_parts(31_567_000, 0) - .saturating_add(Weight::from_parts(0, 3794)) - .saturating_add(T::DbWeight::get().reads(7)) + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 33_950_000 picoseconds. + Weight::from_parts(34_320_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::XcmExecutionSuspended` (r:0 w:1) @@ -243,8 +195,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_442_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 2_720_000 picoseconds. + Weight::from_parts(2_860_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -252,11 +204,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_supported_version() -> Weight { // Proof Size summary in bytes: - // Measured: `125` - // Estimated: `13490` - // Minimum execution time: 17_036_000 picoseconds. - Weight::from_parts(17_616_000, 0) - .saturating_add(Weight::from_parts(0, 13490)) + // Measured: `89` + // Estimated: `13454` + // Minimum execution time: 21_080_000 picoseconds. + Weight::from_parts(21_380_000, 0) + .saturating_add(Weight::from_parts(0, 13454)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -264,11 +216,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notifiers() -> Weight { // Proof Size summary in bytes: - // Measured: `129` - // Estimated: `13494` - // Minimum execution time: 17_026_000 picoseconds. - Weight::from_parts(18_638_000, 0) - .saturating_add(Weight::from_parts(0, 13494)) + // Measured: `93` + // Estimated: `13458` + // Minimum execution time: 21_130_000 picoseconds. + Weight::from_parts(21_671_000, 0) + .saturating_add(Weight::from_parts(0, 13458)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -276,17 +228,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn already_notified_target() -> Weight { // Proof Size summary in bytes: - // Measured: `140` - // Estimated: `15980` - // Minimum execution time: 27_461_000 picoseconds. - Weight::from_parts(27_962_000, 0) - .saturating_add(Weight::from_parts(0, 15980)) + // Measured: `106` + // Estimated: `15946` + // Minimum execution time: 23_400_000 picoseconds. + Weight::from_parts(23_830_000, 0) + .saturating_add(Weight::from_parts(0, 15946)) .saturating_add(T::DbWeight::get().reads(6)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:2 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -299,41 +249,39 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn notify_current_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `6118` - // Minimum execution time: 20_291_000 picoseconds. - Weight::from_parts(23_094_000, 0) - .saturating_add(Weight::from_parts(0, 6118)) - .saturating_add(T::DbWeight::get().reads(8)) + // Measured: `106` + // Estimated: `6046` + // Minimum execution time: 29_080_000 picoseconds. + Weight::from_parts(29_690_000, 0) + .saturating_add(Weight::from_parts(0, 6046)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:4 w:0) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn notify_target_migration_fail() -> Weight { // Proof Size summary in bytes: - // Measured: `172` - // Estimated: `11062` - // Minimum execution time: 11_238_000 picoseconds. - Weight::from_parts(11_838_000, 0) - .saturating_add(Weight::from_parts(0, 11062)) + // Measured: `136` + // Estimated: `11026` + // Minimum execution time: 13_850_000 picoseconds. + Weight::from_parts(14_260_000, 0) + .saturating_add(Weight::from_parts(0, 11026)) .saturating_add(T::DbWeight::get().reads(4)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) fn migrate_version_notify_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `136` - // Estimated: `13501` - // Minimum execution time: 17_176_000 picoseconds. - Weight::from_parts(18_297_000, 0) - .saturating_add(Weight::from_parts(0, 13501)) + // Measured: `100` + // Estimated: `13465` + // Minimum execution time: 21_370_000 picoseconds. + Weight::from_parts(21_670_000, 0) + .saturating_add(Weight::from_parts(0, 13465)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:5 w:2) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -346,12 +294,12 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn migrate_and_notify_old_targets() -> Weight { // Proof Size summary in bytes: - // Measured: `178` - // Estimated: `13543` - // Minimum execution time: 28_643_000 picoseconds. - Weight::from_parts(44_347_000, 0) - .saturating_add(Weight::from_parts(0, 13543)) - .saturating_add(T::DbWeight::get().reads(11)) + // Measured: `106` + // Estimated: `13471` + // Minimum execution time: 39_450_000 picoseconds. + Weight::from_parts(39_870_000, 0) + .saturating_add(Weight::from_parts(0, 13471)) + .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `PolkadotXcm::QueryCounter` (r:1 w:1) @@ -360,11 +308,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn new_query() -> Weight { // Proof Size summary in bytes: - // Measured: `69` - // Estimated: `1554` - // Minimum execution time: 4_427_000 picoseconds. - Weight::from_parts(4_687_000, 0) - .saturating_add(Weight::from_parts(0, 1554)) + // Measured: `32` + // Estimated: `1517` + // Minimum execution time: 4_710_000 picoseconds. + Weight::from_parts(4_850_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -372,11 +320,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) fn take_response() -> Weight { // Proof Size summary in bytes: - // Measured: `7706` - // Estimated: `11171` - // Minimum execution time: 24_687_000 picoseconds. - Weight::from_parts(39_109_000, 0) - .saturating_add(Weight::from_parts(0, 11171)) + // Measured: `7669` + // Estimated: `11134` + // Minimum execution time: 32_190_000 picoseconds. + Weight::from_parts(32_650_000, 0) + .saturating_add(Weight::from_parts(0, 11134)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -384,11 +332,11 @@ impl pallet_xcm::WeightInfo for WeightInfo { /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) fn claim_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `126` - // Estimated: `3591` - // Minimum execution time: 32_107_000 picoseconds. - Weight::from_parts(37_496_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 42_130_000 picoseconds. + Weight::from_parts(43_061_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index f48f5c1..79fec77 100644 --- a/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::fungible // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --output=./people-paseo-weights/xcm/pallet_xcm_benchmarks_fungible.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -53,8 +53,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `3593` - // Minimum execution time: 29_084_000 picoseconds. - Weight::from_parts(29_895_000, 0) + // Minimum execution time: 33_500_000 picoseconds. + Weight::from_parts(34_110_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,18 +65,16 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `153` // Estimated: `6196` - // Minimum execution time: 33_160_000 picoseconds. - Weight::from_parts(35_313_000, 0) + // Minimum execution time: 46_640_000 picoseconds. + Weight::from_parts(47_210_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: `System::Account` (r:3 w:3) + /// 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: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -89,13 +87,13 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn transfer_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `264` - // Estimated: `8799` - // Minimum execution time: 75_874_000 picoseconds. - Weight::from_parts(78_087_000, 0) - .saturating_add(Weight::from_parts(0, 8799)) - .saturating_add(T::DbWeight::get().reads(10)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `223` + // Estimated: `6196` + // Minimum execution time: 70_580_000 picoseconds. + Weight::from_parts(71_501_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `Benchmark::Override` (r:0 w:0) /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -109,36 +107,32 @@ impl WeightInfo { } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_reserve_withdraw() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 72_549_000 picoseconds. - Weight::from_parts(74_892_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 30_191_000 picoseconds. + Weight::from_parts(31_000_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn receive_teleported_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_774_000 picoseconds. - Weight::from_parts(2_935_000, 0) + // Minimum execution time: 3_620_000 picoseconds. + Weight::from_parts(3_760_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) @@ -147,23 +141,21 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `52` // Estimated: `3593` - // Minimum execution time: 23_115_000 picoseconds. - Weight::from_parts(24_056_000, 0) + // Minimum execution time: 25_940_000 picoseconds. + Weight::from_parts(26_410_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) + /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -171,38 +163,34 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn deposit_reserve_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `163` - // Estimated: `6196` - // Minimum execution time: 61_353_000 picoseconds. - Weight::from_parts(64_016_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `122` + // Estimated: `3593` + // Minimum execution time: 58_880_000 picoseconds. + Weight::from_parts(60_061_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(7)) + .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: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn initiate_teleport() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3593` - // Minimum execution time: 37_266_000 picoseconds. - Weight::from_parts(38_448_000, 0) - .saturating_add(Weight::from_parts(0, 3593)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_220_000 picoseconds. + Weight::from_parts(25_890_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 0c37706..2633003 100644 --- a/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/people-paseo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,23 +17,23 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-05-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `zur1-vm-benchpas-001`, CPU: `AMD EPYC 9354 32-Core Processor` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./paseo.ah.local.raw.json")`, DB CACHE: 1024 +//! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./people-paseo-chain-spec.json")`, DB CACHE: 1024 // Executed Command: -// ./polkadot-parachain +// ./target/production/paseo // benchmark // pallet -// --chain=./paseo.ah.local.raw.json +// --chain=./people-paseo-chain-spec.json // --steps=50 // --repeat=20 // --pallet=pallet_xcm_benchmarks::generic // --extrinsic=* // --wasm-execution=compiled // --heap-pages=4096 -// --output=./ah-weights/xcm/pallet_xcm_benchmarks_generic.rs +// --output=./people-paseo-weights/xcm/pallet_xcm_benchmarks_generic.rs // --header=./file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] @@ -49,140 +49,132 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 116_756_000 picoseconds. - Weight::from_parts(135_232_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_021_000 picoseconds. + Weight::from_parts(29_450_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_307_000 picoseconds. - Weight::from_parts(5_788_000, 0) + // Minimum execution time: 1_650_000 picoseconds. + Weight::from_parts(1_740_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `69` - // Estimated: `3534` - // Minimum execution time: 7_301_000 picoseconds. - Weight::from_parts(7_581_000, 0) - .saturating_add(Weight::from_parts(0, 3534)) + // Measured: `32` + // Estimated: `3497` + // Minimum execution time: 8_230_000 picoseconds. + Weight::from_parts(8_410_000, 0) + .saturating_add(Weight::from_parts(0, 3497)) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_579_000 picoseconds. - Weight::from_parts(7_060_000, 0) + // Minimum execution time: 8_080_000 picoseconds. + Weight::from_parts(8_320_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_831_000 picoseconds. - Weight::from_parts(7_702_000, 0) + // Minimum execution time: 2_470_000 picoseconds. + Weight::from_parts(2_570_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_613_000 picoseconds. - Weight::from_parts(1_723_000, 0) + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_650_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_542_000 picoseconds. - Weight::from_parts(1_803_000, 0) + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_650_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_053_000 picoseconds. - Weight::from_parts(3_124_000, 0) + // Minimum execution time: 1_510_000 picoseconds. + Weight::from_parts(1_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_643_000 picoseconds. - Weight::from_parts(1_953_000, 0) + // Minimum execution time: 1_660_000 picoseconds. + Weight::from_parts(1_760_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_540_000 picoseconds. + Weight::from_parts(1_610_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 48_224_000 picoseconds. - Weight::from_parts(51_617_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_160_000 picoseconds. + Weight::from_parts(26_070_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `126` - // Estimated: `3591` - // Minimum execution time: 9_464_000 picoseconds. - Weight::from_parts(10_486_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) + // Measured: `90` + // Estimated: `3555` + // Minimum execution time: 11_680_000 picoseconds. + Weight::from_parts(11_990_000, 0) + .saturating_add(Weight::from_parts(0, 3555)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,14 +182,12 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_562_000 picoseconds. - Weight::from_parts(1_743_000, 0) + // Minimum execution time: 1_560_000 picoseconds. + Weight::from_parts(1_630_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) @@ -210,12 +200,12 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `111` - // Estimated: `3576` - // Minimum execution time: 17_987_000 picoseconds. - Weight::from_parts(18_918_000, 0) - .saturating_add(Weight::from_parts(0, 3576)) - .saturating_add(T::DbWeight::get().reads(7)) + // Measured: `38` + // Estimated: `3503` + // Minimum execution time: 23_610_000 picoseconds. + Weight::from_parts(24_350_000, 0) + .saturating_add(Weight::from_parts(0, 3503)) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) @@ -224,8 +214,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_864_000 picoseconds. - Weight::from_parts(3_205_000, 0) + // Minimum execution time: 3_960_000 picoseconds. + Weight::from_parts(4_140_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -233,151 +223,132 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 19_309_000 picoseconds. - Weight::from_parts(19_620_000, 0) + // Minimum execution time: 2_090_000 picoseconds. + Weight::from_parts(2_200_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_925_000 picoseconds. - Weight::from_parts(10_906_000, 0) + // Minimum execution time: 1_710_000 picoseconds. + Weight::from_parts(1_820_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_752_000, 0) + // Minimum execution time: 1_490_000 picoseconds. + Weight::from_parts(1_620_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_583_000 picoseconds. - Weight::from_parts(1_643_000, 0) + // Minimum execution time: 1_530_000 picoseconds. + Weight::from_parts(1_620_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_753_000 picoseconds. - Weight::from_parts(1_814_000, 0) + // Minimum execution time: 1_760_000 picoseconds. + Weight::from_parts(1_910_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 52_539_000 picoseconds. - Weight::from_parts(58_057_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 29_350_000 picoseconds. + Weight::from_parts(29_990_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_296_000 picoseconds. - Weight::from_parts(4_427_000, 0) + // Minimum execution time: 4_471_000 picoseconds. + Weight::from_parts(4_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0) - /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `212` - // Estimated: `6196` - // Minimum execution time: 48_483_000 picoseconds. - Weight::from_parts(50_507_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `70` + // Estimated: `3535` + // Minimum execution time: 25_621_000 picoseconds. + Weight::from_parts(26_120_000, 0) + .saturating_add(Weight::from_parts(0, 3535)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_622_000 picoseconds. - Weight::from_parts(1_762_000, 0) + // Minimum execution time: 1_600_000 picoseconds. + Weight::from_parts(1_700_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_573_000 picoseconds. - Weight::from_parts(1_652_000, 0) + // Minimum execution time: 1_540_000 picoseconds. + Weight::from_parts(1_630_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_572_000 picoseconds. - Weight::from_parts(1_703_000, 0) + // Minimum execution time: 1_500_000 picoseconds. + Weight::from_parts(1_590_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - pub(crate) fn universal_origin() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `1489` - // Minimum execution time: 3_294_000 picoseconds. - Weight::from_parts(3_415_000, 0) - .saturating_add(Weight::from_parts(0, 1489)) - .saturating_add(T::DbWeight::get().reads(1)) - } pub(crate) fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_592_000 picoseconds. - Weight::from_parts(1_733_000, 0) + // Minimum execution time: 1_550_000 picoseconds. + Weight::from_parts(1_610_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_602_000 picoseconds. - Weight::from_parts(1_702_000, 0) + // Minimum execution time: 1_550_000 picoseconds. + Weight::from_parts(1_610_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/system-parachains/people-paseo/src/xcm_config.rs b/system-parachains/people-paseo/src/xcm_config.rs index 7983f8c..93ef09f 100644 --- a/system-parachains/people-paseo/src/xcm_config.rs +++ b/system-parachains/people-paseo/src/xcm_config.rs @@ -31,8 +31,8 @@ use parachains_common::{ }, TREASURY_PALLET_ID, }; -use polkadot_parachain_primitives::primitives::Sibling; use paseo_runtime_constants::system_parachain; +use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_builder::{