From 6b241b41afc943f3def004b13e7367aed4acf7e2 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Tue, 17 Jan 2023 06:26:34 -0300 Subject: [PATCH] XCM v3 Companion (#697) * Fixes * Undiener * Undiener * Undiener * Lockfile * Changes for send returning hash * Include message ID as params to execute_xcm * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Companion fixes * Formatting * Fixes * Formatting * Bump * Bump * Fixes * Formatting * Make the price of UMP/XCMP message sending configurable * cargo fmt * Remove InvertLocation * Formatting * Use ConstantPrice from polkadot-runtime-common * Fix naming * cargo fmt * Fixes * Fixes * Fixes * Add CallDispatcher * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Fixes * Remove unused import * Remove unused import * XCMv3 fixes (#1710) * Fixes XCMv3 related Fixes XCMv3 (removed query_holding) Fixes XCMv3 - should use _depositable_count? Fixes XCMv3 - removed TrustedReserve Fixes - missing weights for statemine/statemint/westmint [DO-NOT-CHERRY-PICK] tmp return query_holding to aviod conficts to master Fixes - missing functions for pallet_xcm_benchmarks::generic::Config Fixes for XCMv3 benchmarking Fix xcm - removed query_holding * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * Fix imports * Avoid consuming XCM message for NotApplicable scenario (#1787) * Avoid consuming message for NotApplicable scenario * Avoid consuming message for NotApplicable scenario tests * Add 10 message processing limit to DMP queue * Add 10 message limit to XCMP queue * Always increment the message_processed count whenever a message is processed * Fix formatting * Set an upper limit to the overweight message DMP queue * Add upper limit to XCMP overweight message queue * Fix for missing weight for `fn unpaid_execution()` * Fix - usage of `messages_processed` * Fixes * Fixes * Fixes * cargo fmt * Fixes * Fixes * Fixes * Fixes * Remove unused import * Fixes for gav-xcm-v3 (#1835) * Fix for FungiblesAdapter - trait changes: Contains -> AssetChecking * Fix for missing weight for `fn unpaid_execution()` * Used NonLocalMint for all NonZeroIssuance * Fix * Fixes * Fixes * Fixes * Fixes * Fixes * Fix tests * Fixes * Add SafeCallFilter * Add missing config items * Add TODO * Use () as the PriceForParentDelivery * Fixes * Fixes * Fixes * Fixes * Update transact_origin to transact_origin_and_runtime_call * Add ReachableDest config item to XCM pallet * Update SafeCallFilter to allow remark_with_event in runtime benchmarks * cargo fmt * Update substrate * Fix worst_case_holding * Fix DMQ queue unit tests * Remove unused label * cargo fmt * Actually process incoming XCMs * Fixes * Fixes * Fixes * Fixes - return back Weightless * Added measured benchmarks for `pallet_xcm` (#1968) * Fix Fix Fix * Fix * Fixes for transact benchmark * Fixes add pallet_xcm to benchmarks * Revert remark_with_event * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * Fixes * TMP * Fix for reserve_asset_deposited * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * Fix * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * Fix * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * Fix westmint * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * Fix * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * Fix for collectives * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm * Fixes for bridge-hubs * Fixes - return back Weightless * Fix - removed MigrateToTrackInactive for contracts-rococo Co-authored-by: command-bot <> * cargo fmt * Fix benchmarks * Bko gav xcm v3 (#1993) * Fix * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm statemine assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm statemint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm westmint assets pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm Co-authored-by: command-bot <> * Change AllowUnpaidExecutionFrom to be explicit * xcm-v3 benchmarks, weights, fixes for bridge-hubs (#2035) * Dumy weights to get compile * Change UniversalLocation according to https://github.com/paritytech/polkadot/pull/4097 (Location Inversion Removed) * Fix bridge-hubs weights * ".git/.scripts/bench-bot.sh" pallet statemine assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet statemint assets pallet_xcm * ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_xcm * ".git/.scripts/bench-bot.sh" pallet westmint assets pallet_xcm * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" pallet bridge-hub-rococo bridge-hubs pallet_xcm * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::generic * Change NetworkId to Option Co-authored-by: command-bot <> Co-authored-by: Keith Yeung * Add event for showing the hash of an UMP sent message (#1228) * Add UpwardMessageSent event in parachain-system * additional fixes * Message Id * Fix errors from merge * fmt * more fmt * Remove todo * more formatting * Fixes * Fixes * Fixes * Fixes * Allow explicit unpaid executions from the relay chains for system parachains (#2060) * Allow explicit unpaid executions from the relay chains for system parachains * Put origin-filtering barriers into WithComputedOrigin * Use ConstU32<8> * Small nits * formatting * cargo fmt * Allow receiving XCMs from any relay chain plurality * Fixes * update lockfile for {"polkadot", "substrate"} * Update polkadot * Add runtime-benchmarks feature Co-authored-by: Keith Yeung Co-authored-by: Branislav Kontur Co-authored-by: girazoki Co-authored-by: parity-processbot <> --- Cargo.lock | 528 +++++++++--------- .../pallets/xcmp-queue/src/benchmarking.rs | 2 +- cumulus/parachain-template/runtime/src/lib.rs | 1 + .../runtimes/assets/statemine/src/lib.rs | 44 +- .../assets/statemine/src/weights/mod.rs | 1 + .../statemine/src/weights/pallet_xcm.rs | 174 ++++++ .../assets/statemine/src/weights/xcm/mod.rs | 210 ++++--- .../xcm/pallet_xcm_benchmarks_fungible.rs | 35 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 110 +++- .../assets/statemine/src/xcm_config.rs | 187 ++++++- .../runtimes/assets/statemine/tests/tests.rs | 25 +- .../runtimes/assets/statemint/src/lib.rs | 46 +- .../statemint/src/weights/pallet_xcm.rs | 174 ++++++ .../assets/statemint/src/weights/xcm/mod.rs | 210 ++++--- .../xcm/pallet_xcm_benchmarks_fungible.rs | 35 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 110 +++- .../assets/statemint/src/xcm_config.rs | 187 ++++++- .../runtimes/assets/statemint/tests/tests.rs | 25 +- .../runtimes/assets/westmint/src/lib.rs | 44 +- .../assets/westmint/src/weights/xcm/mod.rs | 210 ++++--- .../contracts/contracts-rococo/src/lib.rs | 1 + .../contracts-rococo/src/xcm_config.rs | 77 ++- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 24 +- .../bridge-hub-kusama/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 173 ++++++ .../bridge-hub-kusama/src/weights/xcm/mod.rs | 210 ++++--- .../xcm/pallet_xcm_benchmarks_fungible.rs | 18 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 93 ++- .../bridge-hub-kusama/src/xcm_config.rs | 113 +++- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 24 +- .../bridge-hub-rococo/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 173 ++++++ .../bridge-hub-rococo/src/weights/xcm/mod.rs | 210 ++++--- .../xcm/pallet_xcm_benchmarks_fungible.rs | 18 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 93 ++- .../bridge-hub-rococo/src/xcm_config.rs | 114 +++- .../collectives-polkadot/src/impls.rs | 6 +- .../collectives-polkadot/src/lib.rs | 2 + .../collectives-polkadot/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 173 ++++++ .../collectives-polkadot/src/xcm_config.rs | 146 ++++- 41 files changed, 2996 insertions(+), 1033 deletions(-) create mode 100644 cumulus/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs create mode 100644 cumulus/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs create mode 100644 system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs create mode 100644 system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs diff --git a/Cargo.lock b/Cargo.lock index db165b1d1e..767147d5b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,7 +462,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -496,7 +496,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "beefy-gadget", "futures", @@ -515,7 +515,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "sp-api", "sp-beefy", @@ -1953,6 +1953,7 @@ dependencies = [ "sp-tracing", "sp-trie", "sp-version", + "xcm", ] [[package]] @@ -2020,6 +2021,7 @@ dependencies = [ "log", "pallet-balances", "parity-scale-codec", + "polkadot-runtime-common", "rand_chacha 0.3.1", "scale-info", "sp-core", @@ -2058,6 +2060,7 @@ dependencies = [ "sp-runtime", "sp-std", "sp-trie", + "xcm", ] [[package]] @@ -2107,6 +2110,8 @@ dependencies = [ "frame-support", "log", "parity-scale-codec", + "polkadot-runtime-common", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -3116,7 +3121,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", ] @@ -3139,7 +3144,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -3162,7 +3167,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -3209,7 +3214,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3220,7 +3225,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3237,7 +3242,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -3266,7 +3271,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "log", @@ -3282,7 +3287,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "bitflags", "frame-metadata", @@ -3314,7 +3319,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "Inflector", "cfg-expr", @@ -3328,7 +3333,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3340,7 +3345,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro2", "quote", @@ -3350,7 +3355,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "log", @@ -3368,7 +3373,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -3383,7 +3388,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "sp-api", @@ -3392,7 +3397,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "parity-scale-codec", @@ -4322,7 +4327,7 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -4419,7 +4424,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -5245,7 +5250,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "log", @@ -5264,7 +5269,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "anyhow", "jsonrpsee", @@ -5756,7 +5761,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "frame-benchmarking", @@ -5777,7 +5782,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -5795,7 +5800,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -5810,7 +5815,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -5826,7 +5831,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -5842,7 +5847,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -5857,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -5881,7 +5886,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5901,7 +5906,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -5916,7 +5921,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -5932,7 +5937,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "beefy-merkle-tree", @@ -5955,7 +5960,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -5973,7 +5978,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6017,7 +6022,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6034,7 +6039,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "bitflags", "frame-benchmarking", @@ -6063,7 +6068,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "bitflags", "parity-scale-codec", @@ -6075,7 +6080,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro2", "quote", @@ -6085,7 +6090,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6102,7 +6107,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6120,7 +6125,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6143,7 +6148,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6156,7 +6161,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6174,7 +6179,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6192,7 +6197,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6215,7 +6220,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6231,7 +6236,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6251,7 +6256,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6268,7 +6273,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6285,7 +6290,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6302,7 +6307,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6318,7 +6323,7 @@ dependencies = [ [[package]] name = "pallet-nfts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6335,7 +6340,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6351,7 +6356,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6368,7 +6373,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6388,7 +6393,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "sp-api", @@ -6398,7 +6403,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6415,12 +6420,13 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", + "log", "pallet-babe", "pallet-balances", "pallet-grandpa", @@ -6438,7 +6444,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6455,7 +6461,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6470,7 +6476,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6484,7 +6490,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6502,7 +6508,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6517,7 +6523,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6536,7 +6542,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6553,7 +6559,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6574,7 +6580,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6590,7 +6596,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6604,7 +6610,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6627,7 +6633,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6638,7 +6644,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "log", "sp-arithmetic", @@ -6647,7 +6653,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6664,7 +6670,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6693,7 +6699,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6711,7 +6717,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6730,7 +6736,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-support", "frame-system", @@ -6746,7 +6752,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6762,7 +6768,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6774,7 +6780,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6791,7 +6797,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6806,7 +6812,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6822,7 +6828,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6837,7 +6843,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-benchmarking", "frame-support", @@ -6852,8 +6858,9 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -6861,6 +6868,7 @@ dependencies = [ "scale-info", "serde", "sp-core", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -6870,7 +6878,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-benchmarking", "frame-support", @@ -6878,9 +6886,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] @@ -7031,6 +7041,7 @@ dependencies = [ "sp-std", "substrate-wasm-builder", "xcm", + "xcm-builder", "xcm-executor", ] @@ -7403,7 +7414,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-metrics", @@ -7418,7 +7429,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7432,7 +7443,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "fatality", @@ -7455,7 +7466,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "fatality", "futures", @@ -7476,7 +7487,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "clap 4.0.32", "frame-benchmarking-cli", @@ -7503,7 +7514,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "frame-benchmarking", @@ -7546,7 +7557,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "bitvec", @@ -7568,7 +7579,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "scale-info", @@ -7580,7 +7591,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "fatality", @@ -7605,7 +7616,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7619,7 +7630,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "futures-timer", @@ -7639,7 +7650,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "async-trait", @@ -7663,7 +7674,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "parity-scale-codec", @@ -7681,7 +7692,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "derive_more", @@ -7710,7 +7721,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "futures", @@ -7730,7 +7741,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "fatality", @@ -7749,7 +7760,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7764,7 +7775,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -7783,7 +7794,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-metrics", @@ -7798,7 +7809,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "futures-timer", @@ -7815,7 +7826,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "fatality", "futures", @@ -7834,7 +7845,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -7851,7 +7862,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "fatality", @@ -7869,7 +7880,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "assert_matches", @@ -7901,7 +7912,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-primitives", @@ -7917,7 +7928,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "lru", @@ -7932,7 +7943,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "lazy_static", "log", @@ -7950,7 +7961,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bs58", "futures", @@ -7969,7 +7980,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -7992,7 +8003,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bounded-vec", "futures", @@ -8014,7 +8025,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8024,7 +8035,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -8042,7 +8053,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -8065,7 +8076,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -8098,7 +8109,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -8121,7 +8132,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "frame-support", @@ -8218,7 +8229,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -8233,7 +8244,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "hex-literal", @@ -8259,7 +8270,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8291,7 +8302,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -8380,7 +8391,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -8428,7 +8439,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -8442,7 +8453,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bs58", "parity-scale-codec", @@ -8454,7 +8465,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitflags", "bitvec", @@ -8497,7 +8508,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "beefy-gadget", @@ -8604,7 +8615,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8625,7 +8636,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8635,7 +8646,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8660,7 +8671,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8721,7 +8732,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-benchmarking", "frame-system", @@ -9447,7 +9458,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "beefy-merkle-tree", "frame-benchmarking", @@ -9533,7 +9544,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -9757,7 +9768,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "log", "sp-core", @@ -9768,7 +9779,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -9795,7 +9806,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "futures-timer", @@ -9818,7 +9829,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9834,7 +9845,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9849,7 +9860,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9860,7 +9871,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -9900,7 +9911,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "fnv", "futures", @@ -9926,7 +9937,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "hash-db", "kvdb", @@ -9951,7 +9962,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -9976,7 +9987,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -10005,7 +10016,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "fork-tree", @@ -10043,7 +10054,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "jsonrpsee", @@ -10065,7 +10076,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10078,7 +10089,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -10101,7 +10112,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "lru", "parity-scale-codec", @@ -10125,7 +10136,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10138,7 +10149,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "log", "sc-allocator", @@ -10151,7 +10162,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "cfg-if", "libc", @@ -10168,7 +10179,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ahash", "array-bytes 4.2.0", @@ -10208,7 +10219,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "finality-grandpa", "futures", @@ -10228,7 +10239,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ansi_term", "futures", @@ -10243,7 +10254,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10258,7 +10269,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10300,7 +10311,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "cid", "futures", @@ -10319,7 +10330,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "bitflags", @@ -10345,7 +10356,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ahash", "futures", @@ -10363,7 +10374,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10384,7 +10395,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10416,7 +10427,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10435,7 +10446,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10465,7 +10476,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "libp2p", @@ -10478,7 +10489,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10487,7 +10498,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "jsonrpsee", @@ -10516,7 +10527,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10535,7 +10546,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "http", "jsonrpsee", @@ -10550,7 +10561,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10576,7 +10587,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "directories", @@ -10641,7 +10652,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "log", "parity-scale-codec", @@ -10652,7 +10663,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10671,7 +10682,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "libc", @@ -10690,7 +10701,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "chrono", "futures", @@ -10709,7 +10720,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ansi_term", "atty", @@ -10740,7 +10751,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10751,13 +10762,14 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", + "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -10777,7 +10789,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -10791,7 +10803,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "backtrace", "futures", @@ -11220,7 +11232,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "enumn", "parity-scale-codec", @@ -11297,7 +11309,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "hash-db", "log", @@ -11315,7 +11327,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "blake2", "proc-macro-crate", @@ -11327,7 +11339,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11340,7 +11352,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "integer-sqrt", "num-traits", @@ -11354,7 +11366,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11367,7 +11379,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "parity-scale-codec", @@ -11379,7 +11391,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11396,7 +11408,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "sp-api", @@ -11408,7 +11420,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "log", @@ -11426,7 +11438,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -11444,7 +11456,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "parity-scale-codec", @@ -11462,7 +11474,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "merlin", @@ -11485,7 +11497,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11497,7 +11509,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11510,7 +11522,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11552,7 +11564,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "blake2", "byteorder", @@ -11566,7 +11578,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro2", "quote", @@ -11577,7 +11589,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11586,7 +11598,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro2", "quote", @@ -11596,7 +11608,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "environmental", "parity-scale-codec", @@ -11607,7 +11619,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "finality-grandpa", "log", @@ -11625,7 +11637,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11639,7 +11651,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "bytes", "ed25519", @@ -11664,7 +11676,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "lazy_static", "sp-core", @@ -11675,7 +11687,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures", @@ -11692,7 +11704,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "thiserror", "zstd", @@ -11701,7 +11713,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11719,7 +11731,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11733,7 +11745,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "sp-api", "sp-core", @@ -11743,7 +11755,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "backtrace", "lazy_static", @@ -11753,7 +11765,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "rustc-hash", "serde", @@ -11763,7 +11775,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "either", "hash256-std-hasher", @@ -11785,7 +11797,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11803,7 +11815,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "Inflector", "proc-macro-crate", @@ -11815,7 +11827,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "serde", "serde_json", @@ -11824,7 +11836,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11838,7 +11850,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -11850,7 +11862,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "hash-db", "log", @@ -11870,12 +11882,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11888,7 +11900,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "futures-timer", @@ -11903,7 +11915,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "sp-std", @@ -11915,7 +11927,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "sp-api", "sp-runtime", @@ -11924,7 +11936,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "log", @@ -11940,7 +11952,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ahash", "hash-db", @@ -11963,7 +11975,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11980,7 +11992,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11991,7 +12003,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "impl-trait-for-tuples", "log", @@ -12004,7 +12016,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "parity-scale-codec", "scale-info", @@ -12325,7 +12337,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "platforms", ] @@ -12333,7 +12345,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12352,7 +12364,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "hyper", "log", @@ -12364,7 +12376,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "async-trait", "jsonrpsee", @@ -12377,7 +12389,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "jsonrpsee", "log", @@ -12396,7 +12408,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12422,7 +12434,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12432,7 +12444,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12443,7 +12455,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "ansi_term", "build-helper", @@ -12560,7 +12572,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -12917,7 +12929,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12928,7 +12940,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -13058,7 +13070,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#946507ba9ef13e263534176b7b74e26fc56efbd4" +source = "git+https://github.com/paritytech/substrate?branch=master#7ff6fa2bfa47f288216fdc6e1585f69756c5ec75" dependencies = [ "clap 4.0.32", "frame-remote-externalities", @@ -13968,7 +13980,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -14012,6 +14024,7 @@ dependencies = [ "pallet-society", "pallet-staking", "pallet-staking-reward-curve", + "pallet-state-trie-migration", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -14058,7 +14071,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -14449,24 +14462,27 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-runtime", + "serde", + "sp-core", + "sp-weights", "xcm-procedural", ] [[package]] name = "xcm-builder" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", @@ -14483,8 +14499,9 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "impl-trait-for-tuples", @@ -14495,13 +14512,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", ] [[package]] name = "xcm-procedural" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#dfa8c5ae321e0523f88fdc43afc6d743812ee49e" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "Inflector", "proc-macro2", diff --git a/cumulus/pallets/xcmp-queue/src/benchmarking.rs b/cumulus/pallets/xcmp-queue/src/benchmarking.rs index 5d34d499db..5ac78bee76 100644 --- a/cumulus/pallets/xcmp-queue/src/benchmarking.rs +++ b/cumulus/pallets/xcmp-queue/src/benchmarking.rs @@ -22,7 +22,7 @@ use frame_system::RawOrigin; benchmarks! { set_config_with_u32 {}: update_resume_threshold(RawOrigin::Root, 100) - set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, 3_000_000) + set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_ref_time(3_000_000)) } impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); diff --git a/cumulus/parachain-template/runtime/src/lib.rs b/cumulus/parachain-template/runtime/src/lib.rs index 2b15450811..c59cc57a83 100644 --- a/cumulus/parachain-template/runtime/src/lib.rs +++ b/cumulus/parachain-template/runtime/src/lib.rs @@ -387,6 +387,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = (); + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/statemine/src/lib.rs b/cumulus/parachains/runtimes/assets/statemine/src/lib.rs index 93a87c3396..a7ac8aef9a 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/lib.rs @@ -471,6 +471,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -684,6 +685,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM + [pallet_xcm, PolkadotXcm] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -870,7 +872,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::KsmLocation; + use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -879,12 +881,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(KsmLocation::get()) } - fn worst_case_holding() -> MultiAssets { + fn worst_case_holding(depositable_count: u32) -> MultiAssets { // A mix of fungible, non-fungible, and concrete assets. - const HOLDING_FUNGIBLES: u32 = 100; - const HOLDING_NON_FUNGIBLES: u32 = 100; + let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; + let holding_fungibles = holding_non_fungibles.saturating_sub(1); let fungibles_amount: u128 = 100; - let mut assets = (0..HOLDING_FUNGIBLES) + let mut assets = (0..holding_fungibles) .map(|i| { MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), @@ -893,17 +895,17 @@ impl_runtime_apis! { .into() }) .chain(core::iter::once(MultiAsset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) - .chain((0..HOLDING_NON_FUNGIBLES).map(|i| MultiAsset { + .chain((0..holding_non_fungibles).map(|i| MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); - assets.push(MultiAsset{ - id: Concrete(KsmLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }); - assets.into() + assets.push(MultiAsset { + id: Concrete(KsmLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }); + assets.into() } } @@ -912,8 +914,7 @@ impl_runtime_apis! { KsmLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(KsmLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } @@ -922,7 +923,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -939,8 +939,16 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn transact_origin() -> Result { - Ok(KsmLocation::get()) + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((KsmLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { @@ -953,6 +961,10 @@ impl_runtime_apis! { let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } } type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; diff --git a/cumulus/parachains/runtimes/assets/statemine/src/weights/mod.rs b/cumulus/parachains/runtimes/assets/statemine/src/weights/mod.rs index 080584f2cf..5dd6ffd662 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/weights/mod.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/weights/mod.rs @@ -11,6 +11,7 @@ pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_uniques; pub mod pallet_utility; +pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/cumulus/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs b/cumulus/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..1b862af534 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs @@ -0,0 +1,174 @@ +// Copyright 2021 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 . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=statemine-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/assets/statemine/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn send() -> Weight { + // Minimum execution time: 26_577 nanoseconds. + Weight::from_ref_time(27_239_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn teleport_assets() -> Weight { + // Minimum execution time: 32_703 nanoseconds. + Weight::from_ref_time(33_200_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 25_142 nanoseconds. + Weight::from_ref_time(25_808_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Benchmark Override (r:0 w:0) + fn execute() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 15_036 nanoseconds. + Weight::from_ref_time(15_456_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) + fn force_default_xcm_version() -> Weight { + // Minimum execution time: 4_404 nanoseconds. + Weight::from_ref_time(4_598_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm QueryCounter (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_subscribe_version_notify() -> Weight { + // Minimum execution time: 30_942 nanoseconds. + Weight::from_ref_time(31_608_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_unsubscribe_version_notify() -> Weight { + // Minimum execution time: 32_327 nanoseconds. + Weight::from_ref_time(32_698_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: PolkadotXcm SupportedVersion (r:4 w:2) + fn migrate_supported_version() -> Weight { + // Minimum execution time: 13_522 nanoseconds. + Weight::from_ref_time(13_862_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) + fn migrate_version_notifiers() -> Weight { + // Minimum execution time: 13_621 nanoseconds. + Weight::from_ref_time(14_028_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + fn already_notified_target() -> Weight { + // Minimum execution time: 15_511 nanoseconds. + Weight::from_ref_time(15_825_000) + .saturating_add(T::DbWeight::get().reads(5)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn notify_current_targets() -> Weight { + // Minimum execution time: 27_062 nanoseconds. + Weight::from_ref_time(27_514_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) + fn notify_target_migration_fail() -> Weight { + // Minimum execution time: 7_062 nanoseconds. + Weight::from_ref_time(7_325_000) + .saturating_add(T::DbWeight::get().reads(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + fn migrate_version_notify_targets() -> Weight { + // Minimum execution time: 14_362 nanoseconds. + Weight::from_ref_time(14_724_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn migrate_and_notify_old_targets() -> Weight { + // Minimum execution time: 32_435 nanoseconds. + Weight::from_ref_time(33_042_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 7972667cf0..d38e1c62e5 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -21,168 +21,220 @@ use crate::Runtime; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -use sp_std::{cmp, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - DoubleEncoded, -}; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; + fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - let weight = match self { + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), - }; - weight.ref_time() + } } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - weight.saturating_mul(self.inner().into_iter().count() as u64).ref_time() + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().into_iter().count() as u64) } } pub struct StatemineXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for StatemineXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { - u64::MAX + fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { + // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 + Weight::from_ref_time(1_000_000_000 as u64) } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, - _require_weight_at_most: &u64, + _require_weight_at_most: &Weight, _call: &DoubleEncoded, - ) -> XCMWeight { - XcmGeneric::::transact().ref_time() + ) -> Weight { + XcmGeneric::::transact() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> XCMWeight { + ) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn clear_origin() -> XCMWeight { - XcmGeneric::::clear_origin().ref_time() + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { - XcmGeneric::::descend_origin().ref_time() + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { - Weight::MAX.ref_time() + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) } fn initiate_teleport( assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } - fn query_holding( - _query_id: &u64, - _dest: &MultiLocation, - _assets: &MultiAssetFilter, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::query_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 2b11d541d1..52ae41f2d6 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,25 +18,26 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 // Executed Command: -// ./artifacts/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=statemine-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json +// --chain=statemine-dev // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --template=./templates/xcm-bench-template.hbs +// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,13 +51,13 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(32_154_000 as u64) + Weight::from_ref_time(31_498_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(37_328_000 as u64) + Weight::from_ref_time(39_782_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,16 +69,16 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(53_253_000 as u64) + Weight::from_ref_time(55_814_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(6_378_000 as u64) + Weight::from_ref_time(7_366_000 as u64) } // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(33_783_000 as u64) + Weight::from_ref_time(59_346_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -89,7 +90,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(51_293_000 as u64) + Weight::from_ref_time(49_991_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +101,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(28_390_000 as u64) + Weight::from_ref_time(26_751_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 3e7d6b33dc..96040ac7e8 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,25 +18,26 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 // Executed Command: -// ./artifacts/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=statemine-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --pallet=pallet_xcm_benchmarks::generic -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json +// --chain=statemine-dev // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --template=./templates/xcm-bench-template.hbs +// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,58 +55,59 @@ impl WeightInfo { // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - pub(crate) fn query_holding() -> Weight { - Weight::from_ref_time(892_211_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(337_149_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(8_728_000 as u64) + Weight::from_ref_time(7_033_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(16_766_000 as u64) + Weight::from_ref_time(17_915_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(19_546_000 as u64) + Weight::from_ref_time(20_973_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_907_000 as u64) + Weight::from_ref_time(7_210_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_393_000 as u64) + Weight::from_ref_time(5_940_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_453_000 as u64) + Weight::from_ref_time(5_869_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_417_000 as u64) + Weight::from_ref_time(5_860_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_700_000 as u64) + Weight::from_ref_time(6_556_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_365_000 as u64) + Weight::from_ref_time(5_862_000 as u64) } + // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(15_258_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(21_918_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(21_485_000 as u64) + Weight::from_ref_time(22_211_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(5_334_000 as u64) + Weight::from_ref_time(5_844_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -114,13 +116,13 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(18_035_000 as u64) + Weight::from_ref_time(28_788_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(7_661_000 as u64) + Weight::from_ref_time(8_975_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +132,60 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(1_090_619_000 as u64) + Weight::from_ref_time(417_939_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn burn_asset() -> Weight { + Weight::from_ref_time(137_412_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(16_437_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(5_890_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(5_859_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn query_pallet() -> Weight { + Weight::from_ref_time(25_004_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn expect_pallet() -> Weight { + Weight::from_ref_time(7_708_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn report_transact_status() -> Weight { + Weight::from_ref_time(22_445_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + pub(crate) fn clear_transact_status() -> Weight { + Weight::from_ref_time(5_822_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(5_763_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(5_766_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(5_907_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(5_996_000 as u64) + } } diff --git a/cumulus/parachains/runtimes/assets/statemine/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/statemine/src/xcm_config.rs index 98fe638125..a86828e0fe 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -14,12 +14,13 @@ // limitations under the License. use super::{ - AccountId, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -32,22 +33,26 @@ use polkadot_parachain::primitives::Sibling; use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, - LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, +}; +use xcm_executor::{ + traits::{JustTry, WithOriginFilter}, + XcmExecutor, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Kusama; + pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + pub const Local: MultiLocation = Here.into_location(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); @@ -84,7 +89,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, @@ -96,7 +101,7 @@ pub type FungiblesTransactor = FungiblesAdapter< AccountId, // We only want to allow teleports of known assets. We use non-zero issuance as an indication // that this asset is known. - parachains_common::impls::NonZeroIssuance, + LocalMint>, // The account to use for tracking teleports. CheckingAccount, >; @@ -129,13 +134,14 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; pub XcmAssetFeesReceiver: Option = Authorship::author(); } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { + pub type ParentOrParentsPlurality: impl Contains = { MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; pub type ParentOrSiblings: impl Contains = { MultiLocation { parents: 1, interior: Here } | @@ -143,17 +149,122 @@ match_types! { }; } +/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly +/// account for proof size weights. +/// +/// Calls that are allowed through this filter must: +/// 1. Have a fixed weight; +/// 2. Cannot lead to another call being made; +/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. +pub struct SafeCallFilter; +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } + + match call { + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | + RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | + RuntimeCall::Assets( + pallet_assets::Call::create { .. } | + pallet_assets::Call::force_create { .. } | + pallet_assets::Call::start_destroy { .. } | + pallet_assets::Call::destroy_accounts { .. } | + pallet_assets::Call::destroy_approvals { .. } | + pallet_assets::Call::finish_destroy { .. } | + pallet_assets::Call::mint { .. } | + pallet_assets::Call::burn { .. } | + pallet_assets::Call::transfer { .. } | + pallet_assets::Call::transfer_keep_alive { .. } | + pallet_assets::Call::force_transfer { .. } | + pallet_assets::Call::freeze { .. } | + pallet_assets::Call::thaw { .. } | + pallet_assets::Call::freeze_asset { .. } | + pallet_assets::Call::thaw_asset { .. } | + pallet_assets::Call::transfer_ownership { .. } | + pallet_assets::Call::set_team { .. } | + pallet_assets::Call::clear_metadata { .. } | + pallet_assets::Call::force_clear_metadata { .. } | + pallet_assets::Call::force_asset_status { .. } | + pallet_assets::Call::approve_transfer { .. } | + pallet_assets::Call::cancel_approval { .. } | + pallet_assets::Call::force_cancel_approval { .. } | + pallet_assets::Call::transfer_approved { .. } | + pallet_assets::Call::touch { .. } | + pallet_assets::Call::refund { .. }, + ) | + RuntimeCall::Uniques( + pallet_uniques::Call::create { .. } | + pallet_uniques::Call::force_create { .. } | + pallet_uniques::Call::destroy { .. } | + pallet_uniques::Call::mint { .. } | + pallet_uniques::Call::burn { .. } | + pallet_uniques::Call::transfer { .. } | + pallet_uniques::Call::freeze { .. } | + pallet_uniques::Call::thaw { .. } | + pallet_uniques::Call::freeze_collection { .. } | + pallet_uniques::Call::thaw_collection { .. } | + pallet_uniques::Call::transfer_ownership { .. } | + pallet_uniques::Call::set_team { .. } | + pallet_uniques::Call::approve_transfer { .. } | + pallet_uniques::Call::cancel_approval { .. } | + pallet_uniques::Call::force_item_status { .. } | + pallet_uniques::Call::set_attribute { .. } | + pallet_uniques::Call::clear_attribute { .. } | + pallet_uniques::Call::set_metadata { .. } | + pallet_uniques::Call::clear_metadata { .. } | + pallet_uniques::Call::set_collection_metadata { .. } | + pallet_uniques::Call::clear_collection_metadata { .. } | + pallet_uniques::Call::set_accept_ownership { .. } | + pallet_uniques::Call::set_collection_max_supply { .. } | + pallet_uniques::Call::set_price { .. } | + pallet_uniques::Call::buy_item { .. }, + ) => true, + _ => false, + } + } +} + pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -174,7 +285,7 @@ impl xcm_executor::Config for XcmConfig { // For KSM, users must use teleport where allowed (e.g. with the Relay Chain). type IsReserve = (); type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< crate::weights::xcm::StatemineXcmWeight, @@ -186,7 +297,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, @@ -204,6 +315,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. @@ -214,11 +334,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -237,11 +362,19 @@ impl pallet_xcm::Config for Runtime { MaxInstructions, >; - type LocationInverter = LocationInverter; + 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; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/statemine/tests/tests.rs b/cumulus/parachains/runtimes/assets/statemine/tests/tests.rs index 18caaaf3f7..9614fd8006 100644 --- a/cumulus/parachains/runtimes/assets/statemine/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/statemine/tests/tests.rs @@ -62,13 +62,13 @@ fn test_asset_xcm_trader() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = 4_000_000_000u64; + let bought = Weight::from_ref_time(4_000_000_000u64); // Lets calculate amount needed let asset_amount_needed = AssetFeeAsExistentialDepositMultiplierFeeCharger::charge_weight_in_fungibles( local_asset_id, - Weight::from_ref_time(bought), + bought, ) .expect("failed to compute"); @@ -138,7 +138,7 @@ fn test_asset_xcm_trader_with_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = 4_000_000_000u64; + let bought = Weight::from_ref_time(4_000_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -152,7 +152,7 @@ fn test_asset_xcm_trader_with_refund() { ); // lets calculate amount needed - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); @@ -166,8 +166,7 @@ fn test_asset_xcm_trader_with_refund() { let weight_used = bought / 2; // Make sure refurnd works. - let amount_refunded = - WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used)); + let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); assert_eq!( trader.refund_weight(bought - weight_used), @@ -178,7 +177,7 @@ fn test_asset_xcm_trader_with_refund() { drop(trader); // We only should have paid for half of the bought weight - let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used)); + let fees_paid = WeightToFee::weight_to_fee(&weight_used); assert_eq!( Assets::balance(1, AccountId::from(ALICE)), @@ -217,7 +216,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy small amount - let bought = 500_000_000u64; + let bought = Weight::from_ref_time(500_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -230,7 +229,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); assert!( amount_bought < ExistentialDeposit::get(), @@ -277,7 +276,7 @@ fn test_that_buying_ed_refund_does_not_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are gonna buy ED - let bought: u64 = ExistentialDeposit::get().try_into().unwrap(); + let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); let asset_multilocation = MultiLocation::new( 0, @@ -290,7 +289,7 @@ fn test_that_buying_ed_refund_does_not_refund() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); assert!( amount_bought < ExistentialDeposit::get(), @@ -358,10 +357,10 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are going to buy 4e9 weight - let bought = 4_000_000_000u64; + let bought = Weight::from_ref_time(4_000_000_000u64); // lets calculate amount needed - let asset_amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let asset_amount_needed = WeightToFee::weight_to_fee(&bought); let asset_multilocation = MultiLocation::new( 0, diff --git a/cumulus/parachains/runtimes/assets/statemint/src/lib.rs b/cumulus/parachains/runtimes/assets/statemint/src/lib.rs index 2e8d8ea774..4af9a72348 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/lib.rs @@ -468,6 +468,7 @@ impl parachain_info::Config for Runtime {} impl cumulus_pallet_aura_ext::Config for Runtime {} impl cumulus_pallet_xcmp_queue::Config for Runtime { + type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; @@ -478,7 +479,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { EnsureXcm>, >; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -682,6 +683,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM + [pallet_xcm, PolkadotXcm] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -868,7 +870,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::DotLocation; + use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -877,12 +879,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(DotLocation::get()) } - fn worst_case_holding() -> MultiAssets { + fn worst_case_holding(depositable_count: u32) -> MultiAssets { // A mix of fungible, non-fungible, and concrete assets. - const HOLDING_FUNGIBLES: u32 = 100; - const HOLDING_NON_FUNGIBLES: u32 = 100; + let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; + let holding_fungibles = holding_non_fungibles - 1; let fungibles_amount: u128 = 100; - let mut assets = (0..HOLDING_FUNGIBLES) + let mut assets = (0..holding_fungibles) .map(|i| { MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), @@ -891,17 +893,17 @@ impl_runtime_apis! { .into() }) .chain(core::iter::once(MultiAsset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) - .chain((0..HOLDING_NON_FUNGIBLES).map(|i| MultiAsset { + .chain((0..holding_non_fungibles).map(|i| MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); - assets.push(MultiAsset{ - id: Concrete(DotLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }); - assets.into() + assets.push(MultiAsset { + id: Concrete(DotLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }); + assets.into() } } @@ -910,8 +912,7 @@ impl_runtime_apis! { DotLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(DotLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -919,7 +920,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -936,8 +936,16 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn transact_origin() -> Result { - Ok(DotLocation::get()) + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((DotLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { @@ -950,6 +958,10 @@ impl_runtime_apis! { let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } } type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; diff --git a/cumulus/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs b/cumulus/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..69729e7f38 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs @@ -0,0 +1,174 @@ +// Copyright 2021 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 . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=statemint-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/assets/statemint/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn send() -> Weight { + // Minimum execution time: 27_694 nanoseconds. + Weight::from_ref_time(28_545_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn teleport_assets() -> Weight { + // Minimum execution time: 33_053 nanoseconds. + Weight::from_ref_time(33_789_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 24_781 nanoseconds. + Weight::from_ref_time(25_259_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Benchmark Override (r:0 w:0) + fn execute() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 15_439 nanoseconds. + Weight::from_ref_time(15_750_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) + fn force_default_xcm_version() -> Weight { + // Minimum execution time: 4_576 nanoseconds. + Weight::from_ref_time(4_758_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm QueryCounter (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_subscribe_version_notify() -> Weight { + // Minimum execution time: 31_540 nanoseconds. + Weight::from_ref_time(32_380_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_unsubscribe_version_notify() -> Weight { + // Minimum execution time: 32_627 nanoseconds. + Weight::from_ref_time(32_934_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: PolkadotXcm SupportedVersion (r:4 w:2) + fn migrate_supported_version() -> Weight { + // Minimum execution time: 13_968 nanoseconds. + Weight::from_ref_time(14_356_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) + fn migrate_version_notifiers() -> Weight { + // Minimum execution time: 14_263 nanoseconds. + Weight::from_ref_time(14_540_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + fn already_notified_target() -> Weight { + // Minimum execution time: 15_825 nanoseconds. + Weight::from_ref_time(16_101_000) + .saturating_add(T::DbWeight::get().reads(5)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn notify_current_targets() -> Weight { + // Minimum execution time: 27_436 nanoseconds. + Weight::from_ref_time(28_083_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) + fn notify_target_migration_fail() -> Weight { + // Minimum execution time: 7_187 nanoseconds. + Weight::from_ref_time(7_399_000) + .saturating_add(T::DbWeight::get().reads(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + fn migrate_version_notify_targets() -> Weight { + // Minimum execution time: 14_904 nanoseconds. + Weight::from_ref_time(15_191_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn migrate_and_notify_old_targets() -> Weight { + // Minimum execution time: 33_269 nanoseconds. + Weight::from_ref_time(34_064_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index 1a0ffcdb22..ed48d43317 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -21,168 +21,220 @@ use crate::Runtime; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -use sp_std::{cmp, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - DoubleEncoded, -}; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; + fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - let weight = match self { + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), - }; - weight.ref_time() + } } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - weight.saturating_mul(self.inner().into_iter().count() as u64).ref_time() + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().into_iter().count() as u64) } } pub struct StatemintXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for StatemintXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { - u64::MAX + fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { + // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 + Weight::from_ref_time(1_000_000_000 as u64) } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, - _require_weight_at_most: &u64, + _require_weight_at_most: &Weight, _call: &DoubleEncoded, - ) -> XCMWeight { - XcmGeneric::::transact().ref_time() + ) -> Weight { + XcmGeneric::::transact() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> XCMWeight { + ) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn clear_origin() -> XCMWeight { - XcmGeneric::::clear_origin().ref_time() + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { - XcmGeneric::::descend_origin().ref_time() + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { - Weight::MAX.ref_time() + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) } fn initiate_teleport( assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } - fn query_holding( - _query_id: &u64, - _dest: &MultiLocation, - _assets: &MultiAssetFilter, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::query_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 338aafb1d3..286623a5ab 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,25 +18,26 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 // Executed Command: -// ./artifacts/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=statemint-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --pallet=pallet_xcm_benchmarks::fungible -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json +// --chain=statemint-dev // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --template=./templates/xcm-bench-template.hbs +// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -50,13 +51,13 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(31_628_000 as u64) + Weight::from_ref_time(30_093_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(36_286_000 as u64) + Weight::from_ref_time(38_287_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,16 +69,16 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(51_189_000 as u64) + Weight::from_ref_time(55_153_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(6_157_000 as u64) + Weight::from_ref_time(7_127_000 as u64) } // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(32_614_000 as u64) + Weight::from_ref_time(31_534_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -89,7 +90,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(49_945_000 as u64) + Weight::from_ref_time(50_137_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +101,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(26_905_000 as u64) + Weight::from_ref_time(26_702_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 91d5d5cd10..27c0586878 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,25 +18,26 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 // Executed Command: -// ./artifacts/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --template=./templates/xcm-bench-template.hbs -// --chain=statemint-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --pallet=pallet_xcm_benchmarks::generic -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json +// --chain=statemint-dev // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --template=./templates/xcm-bench-template.hbs +// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -54,58 +55,59 @@ impl WeightInfo { // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - pub(crate) fn query_holding() -> Weight { - Weight::from_ref_time(684_287_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(331_611_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(8_580_000 as u64) + Weight::from_ref_time(6_432_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(16_082_000 as u64) + Weight::from_ref_time(17_465_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(19_394_000 as u64) + Weight::from_ref_time(21_163_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_833_000 as u64) + Weight::from_ref_time(7_024_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_128_000 as u64) + Weight::from_ref_time(5_758_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_081_000 as u64) + Weight::from_ref_time(5_832_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_196_000 as u64) + Weight::from_ref_time(5_763_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_199_000 as u64) + Weight::from_ref_time(6_560_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_078_000 as u64) + Weight::from_ref_time(5_765_000 as u64) } + // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(14_742_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(21_465_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(20_490_000 as u64) + Weight::from_ref_time(21_284_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(5_024_000 as u64) + Weight::from_ref_time(5_723_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -114,13 +116,13 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(17_473_000 as u64) + Weight::from_ref_time(27_907_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(7_230_000 as u64) + Weight::from_ref_time(7_971_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +132,60 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(897_033_000 as u64) + Weight::from_ref_time(384_329_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn burn_asset() -> Weight { + Weight::from_ref_time(127_341_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(15_151_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(5_828_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(5_758_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn query_pallet() -> Weight { + Weight::from_ref_time(23_974_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn expect_pallet() -> Weight { + Weight::from_ref_time(7_579_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn report_transact_status() -> Weight { + Weight::from_ref_time(21_711_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + pub(crate) fn clear_transact_status() -> Weight { + Weight::from_ref_time(5_798_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(5_876_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(5_690_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(5_668_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(6_005_000 as u64) + } } diff --git a/cumulus/parachains/runtimes/assets/statemint/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/statemint/src/xcm_config.rs index 0095e4fd1e..8b76134da3 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -14,12 +14,13 @@ // limitations under the License. use super::{ - AccountId, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, + XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -32,22 +33,26 @@ use polkadot_parachain::primitives::Sibling; use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, - LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, +}; +use xcm_executor::{ + traits::{JustTry, WithOriginFilter}, + XcmExecutor, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + pub const Local: MultiLocation = MultiLocation::here(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); @@ -84,7 +89,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, @@ -96,7 +101,7 @@ pub type FungiblesTransactor = FungiblesAdapter< AccountId, // We only want to allow teleports of known assets. We use non-zero issuance as an indication // that this asset is known. - parachains_common::impls::NonZeroIssuance, + LocalMint>, // The account to use for tracking teleports. CheckingAccount, >; @@ -129,13 +134,14 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; pub XcmAssetFeesReceiver: Option = Authorship::author(); } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { + pub type ParentOrParentsPlurality: impl Contains = { MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; pub type ParentOrSiblings: impl Contains = { MultiLocation { parents: 1, interior: Here } | @@ -143,17 +149,122 @@ match_types! { }; } +/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly +/// account for proof size weights. +/// +/// Calls that are allowed through this filter must: +/// 1. Have a fixed weight; +/// 2. Cannot lead to another call being made; +/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. +pub struct SafeCallFilter; +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } + + match call { + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | + RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | + RuntimeCall::Assets( + pallet_assets::Call::create { .. } | + pallet_assets::Call::force_create { .. } | + pallet_assets::Call::start_destroy { .. } | + pallet_assets::Call::destroy_accounts { .. } | + pallet_assets::Call::destroy_approvals { .. } | + pallet_assets::Call::finish_destroy { .. } | + pallet_assets::Call::mint { .. } | + pallet_assets::Call::burn { .. } | + pallet_assets::Call::transfer { .. } | + pallet_assets::Call::transfer_keep_alive { .. } | + pallet_assets::Call::force_transfer { .. } | + pallet_assets::Call::freeze { .. } | + pallet_assets::Call::thaw { .. } | + pallet_assets::Call::freeze_asset { .. } | + pallet_assets::Call::thaw_asset { .. } | + pallet_assets::Call::transfer_ownership { .. } | + pallet_assets::Call::set_team { .. } | + pallet_assets::Call::clear_metadata { .. } | + pallet_assets::Call::force_clear_metadata { .. } | + pallet_assets::Call::force_asset_status { .. } | + pallet_assets::Call::approve_transfer { .. } | + pallet_assets::Call::cancel_approval { .. } | + pallet_assets::Call::force_cancel_approval { .. } | + pallet_assets::Call::transfer_approved { .. } | + pallet_assets::Call::touch { .. } | + pallet_assets::Call::refund { .. }, + ) | + RuntimeCall::Uniques( + pallet_uniques::Call::create { .. } | + pallet_uniques::Call::force_create { .. } | + pallet_uniques::Call::destroy { .. } | + pallet_uniques::Call::mint { .. } | + pallet_uniques::Call::burn { .. } | + pallet_uniques::Call::transfer { .. } | + pallet_uniques::Call::freeze { .. } | + pallet_uniques::Call::thaw { .. } | + pallet_uniques::Call::freeze_collection { .. } | + pallet_uniques::Call::thaw_collection { .. } | + pallet_uniques::Call::transfer_ownership { .. } | + pallet_uniques::Call::set_team { .. } | + pallet_uniques::Call::approve_transfer { .. } | + pallet_uniques::Call::cancel_approval { .. } | + pallet_uniques::Call::force_item_status { .. } | + pallet_uniques::Call::set_attribute { .. } | + pallet_uniques::Call::clear_attribute { .. } | + pallet_uniques::Call::set_metadata { .. } | + pallet_uniques::Call::clear_metadata { .. } | + pallet_uniques::Call::set_collection_metadata { .. } | + pallet_uniques::Call::clear_collection_metadata { .. } | + pallet_uniques::Call::set_accept_ownership { .. } | + pallet_uniques::Call::set_collection_max_supply { .. } | + pallet_uniques::Call::set_price { .. } | + pallet_uniques::Call::buy_item { .. }, + ) => true, + _ => false, + } + } +} + pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -174,7 +285,7 @@ impl xcm_executor::Config for XcmConfig { // For DOT, users must use teleport where allowed (e.g. with the Relay Chain). type IsReserve = (); type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< crate::weights::xcm::StatemintXcmWeight, @@ -186,7 +297,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, @@ -204,6 +315,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. @@ -214,11 +334,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -236,11 +361,19 @@ impl pallet_xcm::Config for Runtime { RuntimeCall, MaxInstructions, >; - type LocationInverter = LocationInverter; + 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; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/assets/statemint/tests/tests.rs b/cumulus/parachains/runtimes/assets/statemint/tests/tests.rs index 50c0f904eb..b52383f3d3 100644 --- a/cumulus/parachains/runtimes/assets/statemint/tests/tests.rs +++ b/cumulus/parachains/runtimes/assets/statemint/tests/tests.rs @@ -65,13 +65,13 @@ fn test_asset_xcm_trader() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = 400_000_000_000u64; + let bought = Weight::from_ref_time(400_000_000_000u64); // Lets calculate amount needed let asset_amount_needed = AssetFeeAsExistentialDepositMultiplierFeeCharger::charge_weight_in_fungibles( local_asset_id, - Weight::from_ref_time(bought), + bought, ) .expect("failed to compute"); @@ -144,7 +144,7 @@ fn test_asset_xcm_trader_with_refund() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = 400_000_000_000u64; + let bought = Weight::from_ref_time(400_000_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -158,7 +158,7 @@ fn test_asset_xcm_trader_with_refund() { ); // lets calculate amount needed - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); @@ -172,8 +172,7 @@ fn test_asset_xcm_trader_with_refund() { let weight_used = bought / 2; // Make sure refurnd works. - let amount_refunded = - WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used)); + let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); assert_eq!( trader.refund_weight(bought - weight_used), @@ -184,7 +183,7 @@ fn test_asset_xcm_trader_with_refund() { drop(trader); // We only should have paid for half of the bought weight - let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used)); + let fees_paid = WeightToFee::weight_to_fee(&weight_used); assert_eq!( Assets::balance(1, AccountId::from(ALICE)), @@ -226,7 +225,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = 50_000_000_000u64; + let bought = Weight::from_ref_time(50_000_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -239,7 +238,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); assert!( amount_bought < ExistentialDeposit::get(), @@ -286,7 +285,7 @@ fn test_that_buying_ed_refund_does_not_refund() { RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); // We are gonna buy ED - let bought: u64 = ExistentialDeposit::get().try_into().unwrap(); + let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); let asset_multilocation = MultiLocation::new( 0, @@ -299,7 +298,7 @@ fn test_that_buying_ed_refund_does_not_refund() { ), ); - let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let amount_bought = WeightToFee::weight_to_fee(&bought); assert!( amount_bought < ExistentialDeposit::get(), @@ -370,10 +369,10 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // Because of the ED being higher in statemine // and not to complicate things, we use a little // bit more of weight - let bought = 400_000_000_000u64; + let bought = Weight::from_ref_time(400_000_000_000u64); // lets calculate amount needed - let asset_amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought)); + let asset_amount_needed = WeightToFee::weight_to_fee(&bought); let asset_multilocation = MultiLocation::new( 0, diff --git a/cumulus/parachains/runtimes/assets/westmint/src/lib.rs b/cumulus/parachains/runtimes/assets/westmint/src/lib.rs index 2d2ff8a0bf..56dbfd3de8 100644 --- a/cumulus/parachains/runtimes/assets/westmint/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/westmint/src/lib.rs @@ -460,6 +460,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -694,6 +695,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM + [pallet_xcm, PolkadotXcm] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -879,7 +881,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::WestendLocation; + use xcm_config::{MaxAssetsIntoHolding, WestendLocation}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -888,12 +890,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(WestendLocation::get()) } - fn worst_case_holding() -> MultiAssets { + fn worst_case_holding(depositable_count: u32) -> MultiAssets { // A mix of fungible, non-fungible, and concrete assets. - const HOLDING_FUNGIBLES: u32 = 100; - const HOLDING_NON_FUNGIBLES: u32 = 100; + let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; + let holding_fungibles = holding_non_fungibles - 1; let fungibles_amount: u128 = 100; - let mut assets = (0..HOLDING_FUNGIBLES) + let mut assets = (0..holding_fungibles) .map(|i| { MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), @@ -902,17 +904,17 @@ impl_runtime_apis! { .into() }) .chain(core::iter::once(MultiAsset { id: Concrete(Here.into()), fun: Fungible(u128::MAX) })) - .chain((0..HOLDING_NON_FUNGIBLES).map(|i| MultiAsset { + .chain((0..holding_non_fungibles).map(|i| MultiAsset { id: Concrete(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) .collect::>(); - assets.push(MultiAsset{ - id: Concrete(WestendLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }); - assets.into() + assets.push(MultiAsset { + id: Concrete(WestendLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }); + assets.into() } } @@ -921,8 +923,7 @@ impl_runtime_apis! { WestendLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(WestendLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } @@ -931,7 +932,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -948,8 +948,16 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn transact_origin() -> Result { - Ok(WestendLocation::get()) + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((WestendLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { @@ -962,6 +970,10 @@ impl_runtime_apis! { let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } } type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; diff --git a/cumulus/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 5f6bf034fd..ee63ee3f2a 100644 --- a/cumulus/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -21,168 +21,220 @@ use crate::Runtime; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -use sp_std::{cmp, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - DoubleEncoded, -}; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; + fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - let weight = match self { + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), - }; - weight.ref_time() + } } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - weight.saturating_mul(self.inner().into_iter().count() as u64).ref_time() + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().into_iter().count() as u64) } } pub struct WestmintXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for WestmintXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { - u64::MAX + fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { + // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 + Weight::from_ref_time(1_000_000_000 as u64) } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, - _require_weight_at_most: &u64, + _require_weight_at_most: &Weight, _call: &DoubleEncoded, - ) -> XCMWeight { - XcmGeneric::::transact().ref_time() + ) -> Weight { + XcmGeneric::::transact() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> XCMWeight { + ) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn clear_origin() -> XCMWeight { - XcmGeneric::::clear_origin().ref_time() + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { - XcmGeneric::::descend_origin().ref_time() + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { - Weight::MAX.ref_time() + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) } fn initiate_teleport( assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } - fn query_holding( - _query_id: &u64, - _dest: &MultiLocation, - _assets: &MultiAssetFilter, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::query_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 831677b479..1fe75d7677 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -382,6 +382,7 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] [pallet_contracts, Contracts] + [pallet_xcm, PolkadotXcm] ); } diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 14619efb02..c71a60107e 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -14,12 +14,13 @@ // limitations under the License. use super::{ - AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{EitherOfDiverse, Everything, Nothing}, + traits::{ConstU32, EitherOfDiverse, Everything, Nothing}, + weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; @@ -27,22 +28,20 @@ use parachains_common::xcm_config::{DenyReserveTransferToRelayChain, DenyThenTry use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + UsingComponents, WithComputedOrigin, }; use xcm_executor::XcmExecutor; parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Any; + pub const RelayNetwork: Option = None; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); - pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub const ExecutiveBody: BodyId = BodyId::Executive; } @@ -104,14 +103,14 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); pub const MaxInstructions: u32 = 100; } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { + pub type ParentOrParentsPlurality: impl Contains = { MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; pub type ParentOrSiblings: impl Contains = { MultiLocation { parents: 1, interior: Here } | @@ -123,13 +122,21 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -141,7 +148,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = UsingComponents; @@ -149,6 +156,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = ConstU32<8>; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// Converts a local signed origin into an XCM multilocation. @@ -159,11 +175,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -177,11 +198,20 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + 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>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { @@ -201,6 +231,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { >; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 492cad5da9..8ed397c613 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -305,6 +305,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = RootOrExecutiveSimpleMajority; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -440,6 +441,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM + [pallet_xcm, PolkadotXcm] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -616,7 +618,7 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(KsmRelayLocation::get()) } - fn worst_case_holding() -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> MultiAssets { // just concrete assets according to relay chain. let assets: Vec = vec![ MultiAsset { @@ -633,8 +635,7 @@ impl_runtime_apis! { KsmRelayLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(KsmRelayLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -642,7 +643,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -659,8 +659,16 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn transact_origin() -> Result { - Ok(KsmRelayLocation::get()) + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((KsmRelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { @@ -673,6 +681,10 @@ impl_runtime_apis! { let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } } type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index 869c03be68..d5722374de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -27,6 +27,7 @@ pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_utility; +pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..672b3f7542 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -0,0 +1,173 @@ +// Copyright 2021 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 . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=bridge-hub-kusama-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn send() -> Weight { + // Minimum execution time: 26_824 nanoseconds. + Weight::from_ref_time(27_272_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn teleport_assets() -> Weight { + // Minimum execution time: 32_322 nanoseconds. + Weight::from_ref_time(32_760_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Benchmark Override (r:0 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: Benchmark Override (r:0 w:0) + fn execute() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 14_919 nanoseconds. + Weight::from_ref_time(15_388_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) + fn force_default_xcm_version() -> Weight { + // Minimum execution time: 4_754 nanoseconds. + Weight::from_ref_time(4_857_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm QueryCounter (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_subscribe_version_notify() -> Weight { + // Minimum execution time: 31_107 nanoseconds. + Weight::from_ref_time(31_928_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_unsubscribe_version_notify() -> Weight { + // Minimum execution time: 31_745 nanoseconds. + Weight::from_ref_time(32_243_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: PolkadotXcm SupportedVersion (r:4 w:2) + fn migrate_supported_version() -> Weight { + // Minimum execution time: 13_855 nanoseconds. + Weight::from_ref_time(14_060_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) + fn migrate_version_notifiers() -> Weight { + // Minimum execution time: 13_693 nanoseconds. + Weight::from_ref_time(13_984_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + fn already_notified_target() -> Weight { + // Minimum execution time: 15_148 nanoseconds. + Weight::from_ref_time(15_399_000) + .saturating_add(T::DbWeight::get().reads(5)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn notify_current_targets() -> Weight { + // Minimum execution time: 26_582 nanoseconds. + Weight::from_ref_time(27_284_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) + fn notify_target_migration_fail() -> Weight { + // Minimum execution time: 6_961 nanoseconds. + Weight::from_ref_time(7_139_000) + .saturating_add(T::DbWeight::get().reads(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + fn migrate_version_notify_targets() -> Weight { + // Minimum execution time: 14_094 nanoseconds. + Weight::from_ref_time(14_474_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn migrate_and_notify_old_targets() -> Weight { + // Minimum execution time: 31_931 nanoseconds. + Weight::from_ref_time(32_628_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index 5051255d82..82b2918796 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs @@ -21,168 +21,220 @@ use crate::Runtime; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -use sp_std::{cmp, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - DoubleEncoded, -}; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; + fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - let weight = match self { + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), - }; - weight.ref_time() + } } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - weight.saturating_mul(self.inner().into_iter().count() as u64).ref_time() + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().into_iter().count() as u64) } } pub struct BridgeHubKusamaXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for BridgeHubKusamaXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { - u64::MAX + fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { + // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 + Weight::from_ref_time(1_000_000_000 as u64) } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, - _require_weight_at_most: &u64, + _require_weight_at_most: &Weight, _call: &DoubleEncoded, - ) -> XCMWeight { - XcmGeneric::::transact().ref_time() + ) -> Weight { + XcmGeneric::::transact() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> XCMWeight { + ) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn clear_origin() -> XCMWeight { - XcmGeneric::::clear_origin().ref_time() + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { - XcmGeneric::::descend_origin().ref_time() + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { - Weight::MAX.ref_time() + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) } fn initiate_teleport( assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } - fn query_holding( - _query_id: &u64, - _dest: &MultiLocation, - _assets: &MultiAssetFilter, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::query_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index d85ace695e..6e262a7af4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -50,13 +50,13 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(26_021_000 as u64) + Weight::from_ref_time(27_070_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(35_776_000 as u64) + Weight::from_ref_time(38_614_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,16 +68,16 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(52_799_000 as u64) + Weight::from_ref_time(55_875_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(5_784_000 as u64) + Weight::from_ref_time(7_121_000 as u64) } // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(28_148_000 as u64) + Weight::from_ref_time(30_450_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -89,7 +89,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(45_600_000 as u64) + Weight::from_ref_time(49_122_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(23_402_000 as u64) + Weight::from_ref_time(25_016_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index cece506130..526bdad2de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-kusama-dev"), DB CACHE: 1024 // Executed Command: @@ -54,58 +54,59 @@ impl WeightInfo { // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - pub(crate) fn query_holding() -> Weight { - Weight::from_ref_time(21_401_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(28_638_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(5_320_000 as u64) + Weight::from_ref_time(5_869_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(16_749_000 as u64) + Weight::from_ref_time(18_018_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(19_670_000 as u64) + Weight::from_ref_time(21_240_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(5_373_000 as u64) + Weight::from_ref_time(6_118_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_100_000 as u64) + Weight::from_ref_time(5_855_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_288_000 as u64) + Weight::from_ref_time(5_901_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_315_000 as u64) + Weight::from_ref_time(5_762_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_432_000 as u64) + Weight::from_ref_time(6_717_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_254_000 as u64) + Weight::from_ref_time(5_924_000 as u64) } + // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(15_047_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(22_264_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(21_288_000 as u64) + Weight::from_ref_time(21_620_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(5_120_000 as u64) + Weight::from_ref_time(5_795_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -114,13 +115,13 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(17_992_000 as u64) + Weight::from_ref_time(29_039_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(7_321_000 as u64) + Weight::from_ref_time(8_794_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +131,60 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(22_846_000 as u64) + Weight::from_ref_time(26_793_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn burn_asset() -> Weight { + Weight::from_ref_time(7_912_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(6_981_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(6_880_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(6_802_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn query_pallet() -> Weight { + Weight::from_ref_time(31_039_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + pub(crate) fn expect_pallet() -> Weight { + Weight::from_ref_time(9_291_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn report_transact_status() -> Weight { + Weight::from_ref_time(28_012_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn clear_transact_status() -> Weight { + Weight::from_ref_time(7_491_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(7_373_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(7_490_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(11_585_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(7_582_000 as u64) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index ba15eed589..c2e95c6ed4 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -15,12 +15,12 @@ // along with Cumulus. If not, see . use super::{ - AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -30,21 +30,23 @@ use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - IsConcrete, LocationInverter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Kusama; + pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -108,20 +110,67 @@ match_types! { MultiLocation { parents: 1, interior: X1(_) } }; } +/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly +/// account for proof size weights. +/// +/// Calls that are allowed through this filter must: +/// 1. Have a fixed weight; +/// 2. Cannot lead to another call being made; +/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. +pub struct SafeCallFilter; +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } + + match call { + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | + RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, + _ => false, + } + } +} pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - // Allow anything to pay for execution. - AllowTopLevelPaidExecutionFrom, + WithComputedOrigin< + ( + // Allow anything to pay for execution. + AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -136,7 +185,7 @@ impl xcm_executor::Config for XcmConfig { type IsReserve = (); /// Only allow teleportation of KSM. type IsTeleporter = ConcreteNativeAssetFrom; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< crate::weights::xcm::BridgeHubKusamaXcmWeight, @@ -149,6 +198,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. @@ -159,11 +217,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -181,11 +244,19 @@ impl pallet_xcm::Config for Runtime { RuntimeCall, MaxInstructions, >; - type LocationInverter = LocationInverter; + 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; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/lib.rs index d296a7a6a5..56860b07ce 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -335,6 +335,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -468,6 +469,7 @@ mod benches { [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] // XCM + [pallet_xcm, PolkadotXcm] // NOTE: Make sure you point to the individual modules below. [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] @@ -644,7 +646,7 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(RelayLocation::get()) } - fn worst_case_holding() -> MultiAssets { + fn worst_case_holding(_depositable_count: u32) -> MultiAssets { // just concrete assets according to relay chain. let assets: Vec = vec![ MultiAsset { @@ -661,8 +663,7 @@ impl_runtime_apis! { RelayLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(RelayLocation::get()) }, )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { @@ -670,7 +671,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -687,8 +687,16 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn transact_origin() -> Result { - Ok(RelayLocation::get()) + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((RelayLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { @@ -701,6 +709,10 @@ impl_runtime_apis! { let ticket = MultiLocation { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } + + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { + Err(BenchmarkError::Skip) + } } type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs index 869c03be68..d5722374de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs @@ -27,6 +27,7 @@ pub mod pallet_multisig; pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_utility; +pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; pub mod xcm; diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..7d0e4a3546 --- /dev/null +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs @@ -0,0 +1,173 @@ +// Copyright 2021 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 . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=bridge-hub-rococo-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn send() -> Weight { + // Minimum execution time: 27_797 nanoseconds. + Weight::from_ref_time(28_356_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn teleport_assets() -> Weight { + // Minimum execution time: 32_656 nanoseconds. + Weight::from_ref_time(33_011_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Benchmark Override (r:0 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: Benchmark Override (r:0 w:0) + fn execute() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 15_101 nanoseconds. + Weight::from_ref_time(15_535_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) + fn force_default_xcm_version() -> Weight { + // Minimum execution time: 4_700 nanoseconds. + Weight::from_ref_time(4_896_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm QueryCounter (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_subscribe_version_notify() -> Weight { + // Minimum execution time: 31_532 nanoseconds. + Weight::from_ref_time(32_180_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_unsubscribe_version_notify() -> Weight { + // Minimum execution time: 32_515 nanoseconds. + Weight::from_ref_time(33_097_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: PolkadotXcm SupportedVersion (r:4 w:2) + fn migrate_supported_version() -> Weight { + // Minimum execution time: 13_811 nanoseconds. + Weight::from_ref_time(14_149_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) + fn migrate_version_notifiers() -> Weight { + // Minimum execution time: 13_708 nanoseconds. + Weight::from_ref_time(14_067_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + fn already_notified_target() -> Weight { + // Minimum execution time: 15_277 nanoseconds. + Weight::from_ref_time(15_626_000) + .saturating_add(T::DbWeight::get().reads(5)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn notify_current_targets() -> Weight { + // Minimum execution time: 29_263 nanoseconds. + Weight::from_ref_time(29_831_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) + fn notify_target_migration_fail() -> Weight { + // Minimum execution time: 7_787 nanoseconds. + Weight::from_ref_time(7_858_000) + .saturating_add(T::DbWeight::get().reads(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + fn migrate_version_notify_targets() -> Weight { + // Minimum execution time: 15_252 nanoseconds. + Weight::from_ref_time(15_558_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn migrate_and_notify_old_targets() -> Weight { + // Minimum execution time: 35_105 nanoseconds. + Weight::from_ref_time(35_719_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 4d0d2c6ca9..0b911aec2d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -21,168 +21,220 @@ use crate::Runtime; use frame_support::weights::Weight; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; -use sp_std::{cmp, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - DoubleEncoded, -}; +use sp_std::prelude::*; +use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight; + fn weigh_multi_assets(&self, weight: Weight) -> Weight; } const MAX_ASSETS: u32 = 100; impl WeighMultiAssets for MultiAssetFilter { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - let weight = match self { + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + match self { Self::Definite(assets) => weight.saturating_mul(assets.inner().into_iter().count() as u64), Self::Wild(_) => weight.saturating_mul(MAX_ASSETS as u64), - }; - weight.ref_time() + } } } impl WeighMultiAssets for MultiAssets { - fn weigh_multi_assets(&self, weight: Weight) -> XCMWeight { - weight.saturating_mul(self.inner().into_iter().count() as u64).ref_time() + fn weigh_multi_assets(&self, weight: Weight) -> Weight { + weight.saturating_mul(self.inner().into_iter().count() as u64) } } pub struct BridgeHubRococoXcmWeight(core::marker::PhantomData); impl XcmWeightInfo for BridgeHubRococoXcmWeight { - fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { + fn withdraw_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::withdraw_asset()) } // Currently there is no trusted reserve - fn reserve_asset_deposited(_assets: &MultiAssets) -> XCMWeight { - u64::MAX + fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { + // TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974 + Weight::from_ref_time(1_000_000_000 as u64) } - fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { + fn receive_teleported_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &Weight, + _querier: &Option, + ) -> Weight { + XcmGeneric::::query_response() } - fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { + fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_asset()) } fn transfer_reserve_asset( assets: &MultiAssets, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::transfer_reserve_asset()) } fn transact( _origin_type: &OriginKind, - _require_weight_at_most: &u64, + _require_weight_at_most: &Weight, _call: &DoubleEncoded, - ) -> XCMWeight { - XcmGeneric::::transact().ref_time() + ) -> Weight { + XcmGeneric::::transact() } fn hrmp_new_channel_open_request( _sender: &u32, _max_message_size: &u32, _max_capacity: &u32, - ) -> XCMWeight { + ) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_accepted(_recipient: &u32) -> XCMWeight { + fn hrmp_channel_accepted(_recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> XCMWeight { + fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight { // XCM Executor does not currently support HRMP channel operations - Weight::MAX.ref_time() + Weight::MAX } - fn clear_origin() -> XCMWeight { - XcmGeneric::::clear_origin().ref_time() + fn clear_origin() -> Weight { + XcmGeneric::::clear_origin() } - fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { - XcmGeneric::::descend_origin().ref_time() + fn descend_origin(_who: &InteriorMultiLocation) -> Weight { + XcmGeneric::::descend_origin() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { - Weight::MAX.ref_time() + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, _reserve: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmGeneric::::initiate_reserve_withdraw()) } fn initiate_teleport( assets: &MultiAssetFilter, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { // Hardcoded till the XCM pallet is fixed - let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time(); + let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); - cmp::min(hardcoded_weight, weight) + hardcoded_weight.min(weight) } - fn query_holding( - _query_id: &u64, - _dest: &MultiLocation, - _assets: &MultiAssetFilter, - _max_response_weight: &u64, - ) -> XCMWeight { - XcmGeneric::::query_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() + } + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() + } + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() + } + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() + } + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() + } + fn clear_error() -> Weight { + XcmGeneric::::clear_error() + } + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() + } + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() + } + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() + } + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() + } + fn burn_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> Weight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> Weight { + XcmGeneric::::expect_pallet() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() + } + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() + } + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn alias_origin(_: &MultiLocation) -> Weight { + // XCM Executor does not currently support alias origin operations + Weight::MAX } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 75b9db0ff8..4b60676e23 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::fungible` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -50,13 +50,13 @@ pub struct WeightInfo(PhantomData); impl WeightInfo { // Storage: System Account (r:1 w:1) pub(crate) fn withdraw_asset() -> Weight { - Weight::from_ref_time(27_085_000 as u64) + Weight::from_ref_time(27_244_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) pub(crate) fn transfer_asset() -> Weight { - Weight::from_ref_time(37_130_000 as u64) + Weight::from_ref_time(38_254_000 as u64) .saturating_add(T::DbWeight::get().reads(2 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } @@ -68,16 +68,16 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn transfer_reserve_asset() -> Weight { - Weight::from_ref_time(54_004_000 as u64) + Weight::from_ref_time(55_608_000 as u64) .saturating_add(T::DbWeight::get().reads(8 as u64)) .saturating_add(T::DbWeight::get().writes(4 as u64)) } pub(crate) fn receive_teleported_asset() -> Weight { - Weight::from_ref_time(6_208_000 as u64) + Weight::from_ref_time(7_053_000 as u64) } // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(29_191_000 as u64) + Weight::from_ref_time(29_030_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } @@ -89,7 +89,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn deposit_reserve_asset() -> Weight { - Weight::from_ref_time(48_966_000 as u64) + Weight::from_ref_time(48_233_000 as u64) .saturating_add(T::DbWeight::get().reads(7 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } @@ -100,7 +100,7 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_teleport() -> Weight { - Weight::from_ref_time(23_337_000 as u64) + Weight::from_ref_time(24_691_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 08c5d03941..259b483882 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,8 +18,8 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 // Executed Command: @@ -54,58 +54,59 @@ impl WeightInfo { // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) - pub(crate) fn query_holding() -> Weight { - Weight::from_ref_time(23_077_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(27_691_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } pub(crate) fn buy_execution() -> Weight { - Weight::from_ref_time(5_595_000 as u64) + Weight::from_ref_time(5_927_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(16_593_000 as u64) + Weight::from_ref_time(17_594_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(19_522_000 as u64) + Weight::from_ref_time(20_743_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(5_612_000 as u64) + Weight::from_ref_time(5_960_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_455_000 as u64) + Weight::from_ref_time(5_857_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_404_000 as u64) + Weight::from_ref_time(5_819_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_402_000 as u64) + Weight::from_ref_time(5_826_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_725_000 as u64) + Weight::from_ref_time(6_641_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_417_000 as u64) + Weight::from_ref_time(5_754_000 as u64) } + // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(14_868_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(21_742_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: PolkadotXcm AssetTraps (r:1 w:1) pub(crate) fn claim_asset() -> Weight { - Weight::from_ref_time(20_838_000 as u64) + Weight::from_ref_time(20_833_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) .saturating_add(T::DbWeight::get().writes(1 as u64)) } pub(crate) fn trap() -> Weight { - Weight::from_ref_time(5_354_000 as u64) + Weight::from_ref_time(5_773_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -114,13 +115,13 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn subscribe_version() -> Weight { - Weight::from_ref_time(17_989_000 as u64) + Weight::from_ref_time(28_365_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1) pub(crate) fn unsubscribe_version() -> Weight { - Weight::from_ref_time(7_304_000 as u64) + Weight::from_ref_time(7_961_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +131,60 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn initiate_reserve_withdraw() -> Weight { - Weight::from_ref_time(22_875_000 as u64) + Weight::from_ref_time(24_970_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn burn_asset() -> Weight { + Weight::from_ref_time(7_400_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(6_018_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(5_862_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(5_857_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn query_pallet() -> Weight { + Weight::from_ref_time(24_420_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } + pub(crate) fn expect_pallet() -> Weight { + Weight::from_ref_time(7_212_000 as u64) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + pub(crate) fn report_transact_status() -> Weight { + Weight::from_ref_time(22_227_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + pub(crate) fn clear_transact_status() -> Weight { + Weight::from_ref_time(5_890_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(5_684_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(5_763_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(5_812_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(6_043_000 as u64) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 9064389f6f..5e2511d6eb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -15,12 +15,12 @@ // along with Cumulus. If not, see . use super::{ - AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -30,21 +30,23 @@ use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - IsConcrete, LocationInverter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Any; + pub const RelayNetwork: Option = Some(NetworkId::Rococo); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -108,19 +110,67 @@ match_types! { }; } +/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly +/// account for proof size weights. +/// +/// Calls that are allowed through this filter must: +/// 1. Have a fixed weight; +/// 2. Cannot lead to another call being made; +/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. +pub struct SafeCallFilter; +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } + + match call { + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | + RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, + _ => false, + } + } +} + pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - // Allow anything to pay for execution. - AllowTopLevelPaidExecutionFrom, + WithComputedOrigin< + ( + // Allow anything to pay for execution. + AllowTopLevelPaidExecutionFrom, + // Parent and its exec plurality get free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -135,7 +185,7 @@ impl xcm_executor::Config for XcmConfig { type IsReserve = (); /// Only allow teleportation of NativeToken of relay chain. type IsTeleporter = ConcreteNativeAssetFrom; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = WeightInfoBounds< crate::weights::xcm::BridgeHubRococoXcmWeight, @@ -148,6 +198,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. @@ -158,11 +217,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -180,11 +244,19 @@ impl pallet_xcm::Config for Runtime { RuntimeCall, MaxInstructions, >; - type LocationInverter = LocationInverter; + 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; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/system-parachains/collectives/collectives-polkadot/src/impls.rs b/system-parachains/collectives/collectives-polkadot/src/impls.rs index 9373f1ef8f..d8c7d4247a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/impls.rs +++ b/system-parachains/collectives/collectives-polkadot/src/impls.rs @@ -21,7 +21,7 @@ use frame_support::{ }; use pallet_alliance::{ProposalIndex, ProposalProvider}; use sp_std::{marker::PhantomData, prelude::*}; -use xcm::latest::{Fungibility, Junction, NetworkId, Parent}; +use xcm::latest::{Fungibility, Junction, Parent}; type AccountIdOf = ::AccountId; @@ -65,8 +65,8 @@ where ::RuntimeOrigin::signed(temp_account.into()), Box::new(Parent.into()), Box::new( - Junction::AccountId32 { network: NetworkId::Any, id: treasury_acc.into() } - .into() + Junction::AccountId32 { network: None, id: treasury_acc.into() } + .into_location() .into(), ), Box::new((Parent, imbalance).into()), diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 731ec3715d..588087977d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -371,6 +371,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = RootOrExecutiveSimpleMajority; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -586,6 +587,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] + [pallet_xcm, PolkadotXcm] ); } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs index bf736022ca..76fbc081bc 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/mod.rs @@ -11,6 +11,7 @@ pub mod pallet_proxy; pub mod pallet_session; pub mod pallet_timestamp; pub mod pallet_utility; +pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs new file mode 100644 index 0000000000..ec9974dd29 --- /dev/null +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -0,0 +1,173 @@ +// Copyright 2021 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 . + +//! Autogenerated weights for `pallet_xcm` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024 + +// Executed Command: +// /home/benchbot/cargo_target_dir/production/polkadot-parachain +// benchmark +// pallet +// --steps=50 +// --repeat=20 +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json +// --pallet=pallet_xcm +// --chain=collectives-polkadot-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `pallet_xcm`. +pub struct WeightInfo(PhantomData); +impl pallet_xcm::WeightInfo for WeightInfo { + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn send() -> Weight { + // Minimum execution time: 27_016 nanoseconds. + Weight::from_ref_time(27_587_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn teleport_assets() -> Weight { + // Minimum execution time: 33_807 nanoseconds. + Weight::from_ref_time(34_960_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: Benchmark Override (r:0 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: Benchmark Override (r:0 w:0) + fn execute() -> Weight { + // Minimum execution time: 18_446_744_073_709_551 nanoseconds. + Weight::from_ref_time(18_446_744_073_709_551_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 15_322 nanoseconds. + Weight::from_ref_time(15_782_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm SafeXcmVersion (r:0 w:1) + fn force_default_xcm_version() -> Weight { + // Minimum execution time: 4_390 nanoseconds. + Weight::from_ref_time(4_564_000) + .saturating_add(T::DbWeight::get().writes(1)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm QueryCounter (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_subscribe_version_notify() -> Weight { + // Minimum execution time: 31_238 nanoseconds. + Weight::from_ref_time(32_021_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(5)) + } + // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + // Storage: PolkadotXcm Queries (r:0 w:1) + fn force_unsubscribe_version_notify() -> Weight { + // Minimum execution time: 32_459 nanoseconds. + Weight::from_ref_time(32_802_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + // Storage: PolkadotXcm SupportedVersion (r:4 w:2) + fn migrate_supported_version() -> Weight { + // Minimum execution time: 13_433 nanoseconds. + Weight::from_ref_time(13_890_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifiers (r:4 w:2) + fn migrate_version_notifiers() -> Weight { + // Minimum execution time: 13_798 nanoseconds. + Weight::from_ref_time(14_104_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0) + fn already_notified_target() -> Weight { + // Minimum execution time: 15_012 nanoseconds. + Weight::from_ref_time(15_360_000) + .saturating_add(T::DbWeight::get().reads(5)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn notify_current_targets() -> Weight { + // Minimum execution time: 26_911 nanoseconds. + Weight::from_ref_time(27_686_000) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0) + fn notify_target_migration_fail() -> Weight { + // Minimum execution time: 7_067 nanoseconds. + Weight::from_ref_time(7_207_000) + .saturating_add(T::DbWeight::get().reads(3)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + fn migrate_version_notify_targets() -> Weight { + // Minimum execution time: 13_882 nanoseconds. + Weight::from_ref_time(14_067_000) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) + } + // Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2) + // Storage: PolkadotXcm SupportedVersion (r:1 w:0) + // Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1) + // Storage: PolkadotXcm SafeXcmVersion (r:1 w:0) + // Storage: ParachainSystem HostConfiguration (r:1 w:0) + // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) + fn migrate_and_notify_old_targets() -> Weight { + // Minimum execution time: 32_227 nanoseconds. + Weight::from_ref_time(33_068_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 1192306daa..a97c767757 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -14,12 +14,13 @@ // limitations under the License. use super::{ - AccountId, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, - RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, + Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, + weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -29,21 +30,22 @@ use parachains_common::{ use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WithComputedOrigin, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub const RelayNetwork: Option = Some(NetworkId::Polkadot); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); + pub const Local: MultiLocation = Here.into_location(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -99,14 +101,15 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: u64 = 1_000_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024); pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_types! { - pub type ParentOrParentsExecutivePlurality: impl Contains = { + pub type ParentOrParentsPlurality: impl Contains = { MultiLocation { parents: 1, interior: Here } | - MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) } + MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; pub type ParentOrSiblings: impl Contains = { MultiLocation { parents: 1, interior: Here } | @@ -114,19 +117,90 @@ match_types! { }; } +/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly +/// account for proof size weights. +/// +/// Calls that are allowed through this filter must: +/// 1. Have a fixed weight; +/// 2. Cannot lead to another call being made; +/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters. +pub struct SafeCallFilter; +impl Contains for SafeCallFilter { + fn contains(call: &RuntimeCall) -> bool { + #[cfg(feature = "runtime-benchmarks")] + { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { + return true + } + } + + match call { + RuntimeCall::System( + frame_system::Call::set_heap_pages { .. } | + frame_system::Call::set_code { .. } | + frame_system::Call::set_code_without_checks { .. } | + frame_system::Call::kill_prefix { .. }, + ) | + RuntimeCall::ParachainSystem(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Balances(..) | + RuntimeCall::CollatorSelection( + pallet_collator_selection::Call::set_desired_candidates { .. } | + pallet_collator_selection::Call::set_candidacy_bond { .. } | + pallet_collator_selection::Call::register_as_candidate { .. } | + pallet_collator_selection::Call::leave_intent { .. }, + ) | + RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | + RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | + RuntimeCall::Alliance( + pallet_alliance::Call::vote { .. } | + pallet_alliance::Call::close_old_weight { .. } | + pallet_alliance::Call::disband { .. } | + pallet_alliance::Call::set_rule { .. } | + pallet_alliance::Call::announce { .. } | + pallet_alliance::Call::remove_announcement { .. } | + pallet_alliance::Call::join_alliance { .. } | + pallet_alliance::Call::nominate_ally { .. } | + pallet_alliance::Call::elevate_ally { .. } | + pallet_alliance::Call::give_retirement_notice { .. } | + pallet_alliance::Call::retire { .. } | + pallet_alliance::Call::kick_member { .. } | + pallet_alliance::Call::close { .. } | + pallet_alliance::Call::abdicate_fellow_status { .. }, + ) | + RuntimeCall::AllianceMotion( + pallet_collective::Call::vote { .. } | + pallet_collective::Call::close_old_weight { .. } | + pallet_collective::Call::disapprove_proposal { .. } | + pallet_collective::Call::close { .. }, + ) => true, + _ => false, + } + } +} + pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - // Allow anything to pay for execution. - AllowTopLevelPaidExecutionFrom, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; @@ -141,7 +215,7 @@ impl xcm_executor::Config for XcmConfig { type IsReserve = (); /// Only allow teleportation of DOT. type IsTeleporter = ConcreteNativeAssetFrom; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -150,6 +224,15 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = AllPalletsWithSystem; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. @@ -160,11 +243,16 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // We want to disallow users sending (arbitrary) XCMs from this chain. @@ -178,11 +266,19 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location. type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + 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; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime {