From 8f48998279c7cddd539405eb1902ba27d3d97197 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 23 Oct 2021 23:26:04 +0200 Subject: [PATCH 001/119] Fixes --- Cargo.lock | 449 ++++++++++---------- Cargo.toml | 90 ++++ pallets/dmp-queue/src/lib.rs | 2 +- pallets/parachain-system/src/lib.rs | 2 +- pallets/xcmp-queue/src/mock.rs | 1 + parachain-template/runtime/src/lib.rs | 3 + polkadot-parachains/pallets/ping/src/lib.rs | 4 +- polkadot-parachains/rococo/src/lib.rs | 3 + polkadot-parachains/shell/src/lib.rs | 3 + polkadot-parachains/statemine/src/lib.rs | 3 + polkadot-parachains/statemint/src/lib.rs | 3 + polkadot-parachains/westmint/src/lib.rs | 3 + 12 files changed, 333 insertions(+), 233 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 273249468f3..decd42d333d 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#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "beefy-primitives", "fnv", @@ -490,7 +490,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -510,12 +510,12 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -706,7 +706,6 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "finality-grandpa", "frame-support", @@ -722,7 +721,6 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-runtime", "frame-support", @@ -734,7 +732,6 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "bp-runtime", @@ -750,7 +747,6 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-messages", "bp-runtime", @@ -768,7 +764,6 @@ dependencies = [ [[package]] name = "bp-rialto" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-messages", "bp-runtime", @@ -783,7 +778,6 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -800,7 +794,6 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-support", "hash-db", @@ -818,7 +811,6 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -833,7 +825,6 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -848,7 +839,6 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -2444,7 +2434,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", ] @@ -2462,7 +2452,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -2508,7 +2498,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -2522,7 +2512,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -2550,7 +2540,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "bitflags", "frame-metadata", @@ -2577,7 +2567,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2589,7 +2579,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -2601,7 +2591,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro2", "quote", @@ -2611,7 +2601,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "log", @@ -2628,7 +2618,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -2643,7 +2633,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "sp-api", @@ -2652,7 +2642,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "sp-api", @@ -3604,7 +3594,6 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -4574,7 +4563,6 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derive_more", "futures 0.3.17", @@ -5058,7 +5046,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5072,7 +5060,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5088,7 +5076,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5104,7 +5092,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5119,7 +5107,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5143,7 +5131,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5163,7 +5151,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5178,7 +5166,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "beefy-primitives", "frame-support", @@ -5194,7 +5182,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5219,7 +5207,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5237,7 +5225,6 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5254,7 +5241,6 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5276,7 +5262,6 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "bp-message-dispatch", @@ -5324,7 +5309,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5341,7 +5326,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5357,7 +5342,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5381,7 +5366,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5399,7 +5384,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5414,7 +5399,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5437,7 +5422,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5453,7 +5438,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5473,7 +5458,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5490,7 +5475,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5507,7 +5492,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5525,7 +5510,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5541,7 +5526,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5558,7 +5543,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5573,7 +5558,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5587,7 +5572,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5604,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5627,7 +5612,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5642,7 +5627,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5656,7 +5641,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5670,7 +5655,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5686,7 +5671,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5707,7 +5692,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5723,7 +5708,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5737,7 +5722,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5760,7 +5745,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -5771,7 +5756,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "sp-arithmetic", @@ -5780,7 +5765,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5809,7 +5794,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5827,7 +5812,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5846,7 +5831,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-support", "frame-system", @@ -5863,7 +5848,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5880,7 +5865,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5891,7 +5876,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5922,7 +5907,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5938,7 +5923,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-benchmarking", "frame-support", @@ -5953,7 +5938,6 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-support", "frame-system", @@ -5971,7 +5955,6 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.8" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-benchmarking", "frame-support", @@ -6491,7 +6474,6 @@ checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" [[package]] name = "polkadot-approval-distribution" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6505,7 +6487,6 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6518,7 +6499,6 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derive_more", "futures 0.3.17", @@ -6540,7 +6520,6 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "lru 0.7.0", @@ -6560,7 +6539,6 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-benchmarking-cli", "futures 0.3.17", @@ -6580,7 +6558,6 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6678,7 +6655,6 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "always-assert", "derive_more", @@ -6699,7 +6675,6 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -6712,7 +6687,6 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derive_more", "futures 0.3.17", @@ -6734,7 +6708,6 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6748,7 +6721,6 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -6768,7 +6740,6 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "futures 0.3.17", @@ -6787,7 +6758,6 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "parity-scale-codec", @@ -6805,7 +6775,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "derive_more", @@ -6833,7 +6802,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -6853,7 +6821,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -6871,7 +6838,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -6886,7 +6852,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "futures 0.3.17", @@ -6904,7 +6869,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -6919,7 +6883,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -6936,7 +6899,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "derive_more", @@ -6955,7 +6917,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-participation" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "polkadot-node-primitives", @@ -6968,7 +6929,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "futures 0.3.17", @@ -6985,7 +6945,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -7000,7 +6959,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "always-assert", "assert_matches", @@ -7031,7 +6989,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "memory-lru", @@ -7049,7 +7006,6 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-std", "lazy_static", @@ -7067,7 +7023,6 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7078,7 +7033,6 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "derive_more", @@ -7096,7 +7050,6 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bounded-vec", "futures 0.3.17", @@ -7118,7 +7071,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7128,7 +7080,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "futures 0.3.17", @@ -7146,7 +7097,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derive_more", "futures 0.3.17", @@ -7165,7 +7115,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "derive_more", @@ -7192,7 +7141,6 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7213,7 +7161,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "futures 0.3.17", @@ -7230,7 +7177,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -7241,7 +7187,6 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derive_more", "frame-support", @@ -7258,7 +7203,6 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitvec 0.20.1", "frame-system", @@ -7288,7 +7232,6 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7319,7 +7262,6 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7396,7 +7338,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7443,7 +7384,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "bitflags", "bitvec 0.20.1", @@ -7482,7 +7422,6 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "async-trait", "beefy-gadget", @@ -7580,7 +7519,6 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "arrayvec 0.5.2", "derive_more", @@ -7601,7 +7539,6 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7611,7 +7548,6 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -7636,7 +7572,6 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7697,7 +7632,6 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-benchmarking", "frame-system", @@ -8420,7 +8354,6 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bp-messages", @@ -8609,7 +8542,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "sp-core", @@ -8620,7 +8553,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "derive_more", @@ -8647,7 +8580,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -8670,7 +8603,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8686,7 +8619,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8702,7 +8635,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -8713,7 +8646,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "chrono", "fdlimit", @@ -8751,7 +8684,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "fnv", "futures 0.3.17", @@ -8779,7 +8712,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "hash-db", "kvdb", @@ -8804,7 +8737,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "futures 0.3.17", @@ -8857,7 +8790,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "derive_more", @@ -8900,7 +8833,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "derive_more", "futures 0.3.17", @@ -8924,7 +8857,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8937,7 +8870,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "futures 0.3.17", @@ -8963,7 +8896,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "sc-client-api", "sp-authorship", @@ -8974,7 +8907,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "lazy_static", "libsecp256k1 0.6.0", @@ -9000,7 +8933,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "derive_more", "environmental", @@ -9018,7 +8951,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "parity-scale-codec", @@ -9034,7 +8967,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9052,7 +8985,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "derive_more", @@ -9089,7 +9022,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "derive_more", "finality-grandpa", @@ -9113,7 +9046,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "ansi_term 0.12.1", "futures 0.3.17", @@ -9130,7 +9063,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "derive_more", @@ -9145,7 +9078,7 @@ dependencies = [ [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "hash-db", "parity-scale-codec", @@ -9163,7 +9096,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-std", "async-trait", @@ -9214,7 +9147,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -9230,7 +9163,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "bytes 1.0.1", "fnv", @@ -9257,7 +9190,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "libp2p", @@ -9270,7 +9203,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9279,7 +9212,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "hash-db", @@ -9310,7 +9243,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -9335,7 +9268,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "jsonrpc-core", @@ -9352,7 +9285,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "directories", @@ -9417,7 +9350,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "parity-scale-codec", @@ -9431,7 +9364,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9453,7 +9386,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "chrono", "futures 0.3.17", @@ -9471,7 +9404,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9502,7 +9435,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -9513,7 +9446,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "intervalier", @@ -9540,7 +9473,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "derive_more", "futures 0.3.17", @@ -9554,7 +9487,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -9902,7 +9835,6 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slot-range-helper" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "enumn", "parity-scale-codec", @@ -10005,7 +9937,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "hash-db", "log", @@ -10022,7 +9954,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -10034,7 +9966,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10047,7 +9979,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "integer-sqrt", "num-traits", @@ -10062,7 +9994,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10075,7 +10007,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "parity-scale-codec", @@ -10087,7 +10019,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "sp-api", @@ -10099,7 +10031,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "log", @@ -10117,7 +10049,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "futures 0.3.17", @@ -10136,7 +10068,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "parity-scale-codec", @@ -10154,7 +10086,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "merlin", @@ -10177,7 +10109,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10188,7 +10120,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10200,7 +10132,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "base58", "blake2-rfc", @@ -10246,7 +10178,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -10255,7 +10187,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro2", "quote", @@ -10265,7 +10197,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "environmental", "parity-scale-codec", @@ -10276,7 +10208,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "finality-grandpa", "log", @@ -10294,7 +10226,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10308,7 +10240,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "hash-db", @@ -10332,7 +10264,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "lazy_static", "sp-core", @@ -10343,7 +10275,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "derive_more", @@ -10360,7 +10292,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "zstd", ] @@ -10368,7 +10300,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10383,7 +10315,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -10394,7 +10326,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "sp-api", "sp-core", @@ -10404,7 +10336,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "backtrace", ] @@ -10412,7 +10344,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "rustc-hash", "serde", @@ -10422,7 +10354,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "either", "hash256-std-hasher", @@ -10444,7 +10376,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10461,7 +10393,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -10473,7 +10405,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "serde", "serde_json", @@ -10482,7 +10414,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10496,7 +10428,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "scale-info", @@ -10507,7 +10439,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "hash-db", "log", @@ -10530,12 +10462,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10548,7 +10480,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "log", "sp-core", @@ -10561,7 +10493,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -10577,7 +10509,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "sp-std", @@ -10589,7 +10521,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "sp-api", "sp-runtime", @@ -10598,7 +10530,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "log", @@ -10614,7 +10546,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "hash-db", "memory-db", @@ -10629,7 +10561,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10645,7 +10577,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10656,7 +10588,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10980,7 +10912,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.17", @@ -11002,7 +10934,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-std", "derive_more", @@ -11016,7 +10948,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "async-trait", "futures 0.3.17", @@ -11043,7 +10975,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "futures 0.3.17", "substrate-test-utils-derive", @@ -11053,7 +10985,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#66296a0af0aede07c27104e6174a3534b15f14aa" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -11064,7 +10996,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -11426,7 +11358,7 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "regex", "serde", "serde_json", @@ -12095,7 +12027,6 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -12340,7 +12271,6 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12353,7 +12283,6 @@ dependencies = [ [[package]] name = "xcm-builder" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-support", "frame-system", @@ -12373,7 +12302,6 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.12" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "frame-benchmarking", "frame-support", @@ -12391,7 +12319,6 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#fc32642c5011721916cb0f9e083800c281979980" dependencies = [ "proc-macro2", "quote", @@ -12461,3 +12388,67 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "polkadot" +version = "0.9.12" + +[[patch.unused]] +name = "polkadot-simnet" +version = "0.9.12" + +[[patch.unused]] +name = "polkadot-simnet-node" +version = "0.9.12" + +[[patch.unused]] +name = "polkadot-simnet-test" +version = "0.9.12" + +[[patch.unused]] +name = "polkadot-test-malus" +version = "0.9.12" + +[[patch.unused]] +name = "polkadot-voter-bags" +version = "0.9.0" + +[[patch.unused]] +name = "remote-ext-tests-bags-list" +version = "0.9.12" + +[[patch.unused]] +name = "staking-miner" +version = "0.9.12" + +[[patch.unused]] +name = "test-parachain-adder" +version = "0.9.12" + +[[patch.unused]] +name = "test-parachain-adder-collator" +version = "0.9.12" + +[[patch.unused]] +name = "test-parachain-halt" +version = "0.9.12" + +[[patch.unused]] +name = "test-parachains" +version = "0.9.12" + +[[patch.unused]] +name = "xcm-executor-integration-tests" +version = "0.9.12" + +[[patch.unused]] +name = "xcm-simulator" +version = "0.9.12" + +[[patch.unused]] +name = "xcm-simulator-example" +version = "0.9.12" + +[[patch.unused]] +name = "xcm-simulator-fuzzer" +version = "0.9.9" diff --git a/Cargo.toml b/Cargo.toml index c89e88b214e..2197b1352d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,3 +41,93 @@ members = [ [profile.release] panic = "unwind" +[patch."https://github.com/paritytech/polkadot"] +polkadot-cli ={path = "/Users/gav/Core/polkadot/cli" } +polkadot-node-core-pvf ={path = "/Users/gav/Core/polkadot/node/core/pvf" } +polkadot-core-primitives ={path = "/Users/gav/Core/polkadot/core-primitives" } +polkadot-node-subsystem-util ={path = "/Users/gav/Core/polkadot/node/subsystem-util" } +metered-channel ={path = "/Users/gav/Core/polkadot/node/metered-channel" } +polkadot-node-jaeger ={path = "/Users/gav/Core/polkadot/node/jaeger" } +polkadot-node-primitives ={path = "/Users/gav/Core/polkadot/node/primitives" } +polkadot-parachain ={path = "/Users/gav/Core/polkadot/parachain" } +polkadot-primitives ={path = "/Users/gav/Core/polkadot/primitives" } +polkadot-erasure-coding ={path = "/Users/gav/Core/polkadot/erasure-coding" } +polkadot-node-metrics ={path = "/Users/gav/Core/polkadot/node/metrics" } +polkadot-node-network-protocol ={path = "/Users/gav/Core/polkadot/node/network/protocol" } +polkadot-node-subsystem ={path = "/Users/gav/Core/polkadot/node/subsystem" } +polkadot-node-subsystem-types ={path = "/Users/gav/Core/polkadot/node/subsystem-types" } +polkadot-overseer-gen ={path = "/Users/gav/Core/polkadot/node/overseer/overseer-gen" } +polkadot-overseer-gen-proc-macro ={path = "/Users/gav/Core/polkadot/node/overseer/overseer-gen/proc-macro" } +polkadot-statement-table ={path = "/Users/gav/Core/polkadot/statement-table" } +polkadot-overseer ={path = "/Users/gav/Core/polkadot/node/overseer" } +polkadot-node-subsystem-test-helpers ={path = "/Users/gav/Core/polkadot/node/subsystem-test-helpers" } +test-parachain-adder ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/adder" } +test-parachain-halt ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/halt" } +polkadot-service ={path = "/Users/gav/Core/polkadot/node/service" } +kusama-runtime ={path = "/Users/gav/Core/polkadot/runtime/kusama" } +pallet-xcm ={path = "/Users/gav/Core/polkadot/xcm/pallet-xcm" } +xcm ={path = "/Users/gav/Core/polkadot/xcm" } +xcm-procedural ={path = "/Users/gav/Core/polkadot/xcm/procedural" } +xcm-executor ={path = "/Users/gav/Core/polkadot/xcm/xcm-executor" } +polkadot-runtime-parachains ={path = "/Users/gav/Core/polkadot/runtime/parachains" } +xcm-builder ={path = "/Users/gav/Core/polkadot/xcm/xcm-builder" } +polkadot-runtime-common ={path = "/Users/gav/Core/polkadot/runtime/common" } +slot-range-helper ={path = "/Users/gav/Core/polkadot/runtime/common/slot_range_helper" } +polkadot-approval-distribution ={path = "/Users/gav/Core/polkadot/node/network/approval-distribution" } +polkadot-availability-bitfield-distribution ={path = "/Users/gav/Core/polkadot/node/network/bitfield-distribution" } +polkadot-availability-distribution ={path = "/Users/gav/Core/polkadot/node/network/availability-distribution" } +polkadot-availability-recovery ={path = "/Users/gav/Core/polkadot/node/network/availability-recovery" } +polkadot-client ={path = "/Users/gav/Core/polkadot/node/client" } +polkadot-runtime ={path = "/Users/gav/Core/polkadot/runtime/polkadot" } +rococo-runtime ={path = "/Users/gav/Core/polkadot/runtime/rococo" } +bp-messages ={path = "/Users/gav/Core/polkadot/bridges/primitives/messages" } +bp-runtime ={path = "/Users/gav/Core/polkadot/bridges/primitives/runtime" } +bp-rococo ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-rococo" } +bp-polkadot-core ={path = "/Users/gav/Core/polkadot/bridges/primitives/polkadot-core" } +bp-wococo ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-wococo" } +bridge-runtime-common ={path = "/Users/gav/Core/polkadot/bridges/bin/runtime-common" } +bp-message-dispatch ={path = "/Users/gav/Core/polkadot/bridges/primitives/message-dispatch" } +pallet-bridge-dispatch ={path = "/Users/gav/Core/polkadot/bridges/modules/dispatch" } +pallet-bridge-grandpa ={path = "/Users/gav/Core/polkadot/bridges/modules/grandpa" } +bp-header-chain ={path = "/Users/gav/Core/polkadot/bridges/primitives/header-chain" } +bp-test-utils ={path = "/Users/gav/Core/polkadot/bridges/primitives/test-utils" } +pallet-bridge-messages ={path = "/Users/gav/Core/polkadot/bridges/modules/messages" } +bp-rialto ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-rialto" } +westend-runtime ={path = "/Users/gav/Core/polkadot/runtime/westend" } +pallet-xcm-benchmarks ={path = "/Users/gav/Core/polkadot/xcm/pallet-xcm-benchmarks" } +polkadot-collator-protocol ={path = "/Users/gav/Core/polkadot/node/network/collator-protocol" } +polkadot-dispute-distribution ={path = "/Users/gav/Core/polkadot/node/network/dispute-distribution" } +polkadot-gossip-support ={path = "/Users/gav/Core/polkadot/node/network/gossip-support" } +polkadot-network-bridge ={path = "/Users/gav/Core/polkadot/node/network/bridge" } +polkadot-node-collation-generation ={path = "/Users/gav/Core/polkadot/node/collation-generation" } +polkadot-node-core-approval-voting ={path = "/Users/gav/Core/polkadot/node/core/approval-voting" } +polkadot-node-core-av-store ={path = "/Users/gav/Core/polkadot/node/core/av-store" } +polkadot-node-core-backing ={path = "/Users/gav/Core/polkadot/node/core/backing" } +polkadot-node-core-bitfield-signing ={path = "/Users/gav/Core/polkadot/node/core/bitfield-signing" } +polkadot-node-core-candidate-validation ={path = "/Users/gav/Core/polkadot/node/core/candidate-validation" } +polkadot-node-core-chain-api ={path = "/Users/gav/Core/polkadot/node/core/chain-api" } +polkadot-node-core-chain-selection ={path = "/Users/gav/Core/polkadot/node/core/chain-selection" } +polkadot-node-core-dispute-coordinator ={path = "/Users/gav/Core/polkadot/node/core/dispute-coordinator" } +polkadot-node-core-dispute-participation ={path = "/Users/gav/Core/polkadot/node/core/dispute-participation" } +polkadot-node-core-parachains-inherent ={path = "/Users/gav/Core/polkadot/node/core/parachains-inherent" } +polkadot-node-core-provisioner ={path = "/Users/gav/Core/polkadot/node/core/provisioner" } +polkadot-node-core-runtime-api ={path = "/Users/gav/Core/polkadot/node/core/runtime-api" } +polkadot-rpc ={path = "/Users/gav/Core/polkadot/rpc" } +polkadot-statement-distribution ={path = "/Users/gav/Core/polkadot/node/network/statement-distribution" } +polkadot-test-client ={path = "/Users/gav/Core/polkadot/node/test/client" } +polkadot-test-runtime ={path = "/Users/gav/Core/polkadot/runtime/test-runtime" } +polkadot-test-service ={path = "/Users/gav/Core/polkadot/node/test/service" } +xcm-executor-integration-tests ={path = "/Users/gav/Core/polkadot/xcm/xcm-executor/integration-tests" } +xcm-simulator ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator" } +xcm-simulator-example ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator/example" } +xcm-simulator-fuzzer ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator/fuzzer" } +polkadot-test-malus ={path = "/Users/gav/Core/polkadot/node/malus" } +polkadot-simnet ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/common" } +polkadot-simnet-node ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/node" } +polkadot-simnet-test ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/test" } +test-parachains ={path = "/Users/gav/Core/polkadot/parachain/test-parachains" } +test-parachain-adder-collator ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/adder/collator" } +staking-miner ={path = "/Users/gav/Core/polkadot/utils/staking-miner" } +remote-ext-tests-bags-list ={path = "/Users/gav/Core/polkadot/utils/remote-ext-tests/bags-list" } +polkadot-voter-bags ={path = "/Users/gav/Core/polkadot/utils/voter-bags" } +polkadot ={path = "/Users/gav/Core/polkadot" } diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 251d3acbb38..8766f618d6c 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -473,7 +473,7 @@ mod tests { fn msg(weight: Weight) -> Xcm { Xcm(vec![Transact { - origin_type: OriginKind::Native, + origin_kind: OriginKind::Native, require_weight_at_most: weight, call: vec![].into(), }]) diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index 9f2e044c720..198a7646f3e 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -660,7 +660,7 @@ impl GetChannelInfo for Pallet { // None then it must be that this is an edge-case where a message is attempted to be // sent at the first block. It should be safe to assume that there are no channels // opened at all so early. At least, relying on this assumption seems to be a better - // tradeoff, compared to introducing an error variant that the clients should be + // trade-off, compared to introducing an error variant that the clients should be // prepared to handle. let index = match channels.binary_search_by_key(&id, |item| item.0) { Err(_) => return ChannelStatus::Closed, diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 3496db5aa32..51f19bf4a50 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -110,6 +110,7 @@ parameter_types! { pub Ancestry: MultiLocation = X1(Parachain(1u32.into())).into(); pub UnitWeightCost: Weight = 1_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } /// Means for transacting assets on this chain. diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index 9012dcf1500..bcdefa48f92 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -457,6 +457,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_type! { @@ -490,6 +491,8 @@ impl Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } parameter_types! { diff --git a/polkadot-parachains/pallets/ping/src/lib.rs b/polkadot-parachains/pallets/ping/src/lib.rs index 9960d66c504..621c3afd923 100644 --- a/polkadot-parachains/pallets/ping/src/lib.rs +++ b/polkadot-parachains/pallets/ping/src/lib.rs @@ -91,7 +91,7 @@ pub mod pallet { match T::XcmSender::send_xcm( (1, Junction::Parachain(para.into())), Xcm(vec![Transact { - origin_type: OriginKind::Native, + origin_kind: OriginKind::Native, require_weight_at_most: 1_000, call: ::Call::from(Call::::ping { seq, @@ -167,7 +167,7 @@ pub mod pallet { match T::XcmSender::send_xcm( (1, Junction::Parachain(para.into())), Xcm(vec![Transact { - origin_type: OriginKind::Native, + origin_kind: OriginKind::Native, require_weight_at_most: 1_000, call: ::Call::from(Call::::pong { seq, diff --git a/polkadot-parachains/rococo/src/lib.rs b/polkadot-parachains/rococo/src/lib.rs index d835cd4aa3e..c45306d4e36 100644 --- a/polkadot-parachains/rococo/src/lib.rs +++ b/polkadot-parachains/rococo/src/lib.rs @@ -380,6 +380,7 @@ pub type Barrier = ( parameter_types! { pub StatemintLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000))); + pub MaxAssetsIntoHolding: u32 = 64; } pub type Reserves = (NativeAsset, AssetsFrom); @@ -401,6 +402,8 @@ impl Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/polkadot-parachains/shell/src/lib.rs b/polkadot-parachains/shell/src/lib.rs index 84823d52b58..a202afd63d4 100644 --- a/polkadot-parachains/shell/src/lib.rs +++ b/polkadot-parachains/shell/src/lib.rs @@ -197,6 +197,7 @@ parameter_types! { // One XCM operation is 1_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } pub struct XcmConfig; @@ -215,6 +216,8 @@ impl Config for XcmConfig { type AssetTrap = (); // don't trap for now type AssetClaims = (); // don't claim for now type SubscriptionService = (); // don't handle subscriptions for now + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/statemine/src/lib.rs b/polkadot-parachains/statemine/src/lib.rs index 474a9f93fd4..d3d257056f5 100644 --- a/polkadot-parachains/statemine/src/lib.rs +++ b/polkadot-parachains/statemine/src/lib.rs @@ -549,6 +549,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_type! { @@ -582,6 +583,8 @@ impl Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } parameter_types! { diff --git a/polkadot-parachains/statemint/src/lib.rs b/polkadot-parachains/statemint/src/lib.rs index ade13cc1e55..b4e99ece7f2 100644 --- a/polkadot-parachains/statemint/src/lib.rs +++ b/polkadot-parachains/statemint/src/lib.rs @@ -526,6 +526,7 @@ parameter_types! { // One XCM operation is 1_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_type! { @@ -558,6 +559,8 @@ impl Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } parameter_types! { diff --git a/polkadot-parachains/westmint/src/lib.rs b/polkadot-parachains/westmint/src/lib.rs index ace9ce9afac..7c1853c1743 100644 --- a/polkadot-parachains/westmint/src/lib.rs +++ b/polkadot-parachains/westmint/src/lib.rs @@ -512,6 +512,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { pub UnitWeightCost: Weight = 1_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_type! { @@ -544,6 +545,8 @@ impl Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } parameter_types! { From 2ac537ee1f2bdbb2fd3063981c8c0e3b12718d08 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 23 Oct 2021 23:32:37 +0200 Subject: [PATCH 002/119] Undiener --- Cargo.toml | 90 ------------------------------------------------------ 1 file changed, 90 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2197b1352d5..c89e88b214e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,93 +41,3 @@ members = [ [profile.release] panic = "unwind" -[patch."https://github.com/paritytech/polkadot"] -polkadot-cli ={path = "/Users/gav/Core/polkadot/cli" } -polkadot-node-core-pvf ={path = "/Users/gav/Core/polkadot/node/core/pvf" } -polkadot-core-primitives ={path = "/Users/gav/Core/polkadot/core-primitives" } -polkadot-node-subsystem-util ={path = "/Users/gav/Core/polkadot/node/subsystem-util" } -metered-channel ={path = "/Users/gav/Core/polkadot/node/metered-channel" } -polkadot-node-jaeger ={path = "/Users/gav/Core/polkadot/node/jaeger" } -polkadot-node-primitives ={path = "/Users/gav/Core/polkadot/node/primitives" } -polkadot-parachain ={path = "/Users/gav/Core/polkadot/parachain" } -polkadot-primitives ={path = "/Users/gav/Core/polkadot/primitives" } -polkadot-erasure-coding ={path = "/Users/gav/Core/polkadot/erasure-coding" } -polkadot-node-metrics ={path = "/Users/gav/Core/polkadot/node/metrics" } -polkadot-node-network-protocol ={path = "/Users/gav/Core/polkadot/node/network/protocol" } -polkadot-node-subsystem ={path = "/Users/gav/Core/polkadot/node/subsystem" } -polkadot-node-subsystem-types ={path = "/Users/gav/Core/polkadot/node/subsystem-types" } -polkadot-overseer-gen ={path = "/Users/gav/Core/polkadot/node/overseer/overseer-gen" } -polkadot-overseer-gen-proc-macro ={path = "/Users/gav/Core/polkadot/node/overseer/overseer-gen/proc-macro" } -polkadot-statement-table ={path = "/Users/gav/Core/polkadot/statement-table" } -polkadot-overseer ={path = "/Users/gav/Core/polkadot/node/overseer" } -polkadot-node-subsystem-test-helpers ={path = "/Users/gav/Core/polkadot/node/subsystem-test-helpers" } -test-parachain-adder ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/adder" } -test-parachain-halt ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/halt" } -polkadot-service ={path = "/Users/gav/Core/polkadot/node/service" } -kusama-runtime ={path = "/Users/gav/Core/polkadot/runtime/kusama" } -pallet-xcm ={path = "/Users/gav/Core/polkadot/xcm/pallet-xcm" } -xcm ={path = "/Users/gav/Core/polkadot/xcm" } -xcm-procedural ={path = "/Users/gav/Core/polkadot/xcm/procedural" } -xcm-executor ={path = "/Users/gav/Core/polkadot/xcm/xcm-executor" } -polkadot-runtime-parachains ={path = "/Users/gav/Core/polkadot/runtime/parachains" } -xcm-builder ={path = "/Users/gav/Core/polkadot/xcm/xcm-builder" } -polkadot-runtime-common ={path = "/Users/gav/Core/polkadot/runtime/common" } -slot-range-helper ={path = "/Users/gav/Core/polkadot/runtime/common/slot_range_helper" } -polkadot-approval-distribution ={path = "/Users/gav/Core/polkadot/node/network/approval-distribution" } -polkadot-availability-bitfield-distribution ={path = "/Users/gav/Core/polkadot/node/network/bitfield-distribution" } -polkadot-availability-distribution ={path = "/Users/gav/Core/polkadot/node/network/availability-distribution" } -polkadot-availability-recovery ={path = "/Users/gav/Core/polkadot/node/network/availability-recovery" } -polkadot-client ={path = "/Users/gav/Core/polkadot/node/client" } -polkadot-runtime ={path = "/Users/gav/Core/polkadot/runtime/polkadot" } -rococo-runtime ={path = "/Users/gav/Core/polkadot/runtime/rococo" } -bp-messages ={path = "/Users/gav/Core/polkadot/bridges/primitives/messages" } -bp-runtime ={path = "/Users/gav/Core/polkadot/bridges/primitives/runtime" } -bp-rococo ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-rococo" } -bp-polkadot-core ={path = "/Users/gav/Core/polkadot/bridges/primitives/polkadot-core" } -bp-wococo ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-wococo" } -bridge-runtime-common ={path = "/Users/gav/Core/polkadot/bridges/bin/runtime-common" } -bp-message-dispatch ={path = "/Users/gav/Core/polkadot/bridges/primitives/message-dispatch" } -pallet-bridge-dispatch ={path = "/Users/gav/Core/polkadot/bridges/modules/dispatch" } -pallet-bridge-grandpa ={path = "/Users/gav/Core/polkadot/bridges/modules/grandpa" } -bp-header-chain ={path = "/Users/gav/Core/polkadot/bridges/primitives/header-chain" } -bp-test-utils ={path = "/Users/gav/Core/polkadot/bridges/primitives/test-utils" } -pallet-bridge-messages ={path = "/Users/gav/Core/polkadot/bridges/modules/messages" } -bp-rialto ={path = "/Users/gav/Core/polkadot/bridges/primitives/chain-rialto" } -westend-runtime ={path = "/Users/gav/Core/polkadot/runtime/westend" } -pallet-xcm-benchmarks ={path = "/Users/gav/Core/polkadot/xcm/pallet-xcm-benchmarks" } -polkadot-collator-protocol ={path = "/Users/gav/Core/polkadot/node/network/collator-protocol" } -polkadot-dispute-distribution ={path = "/Users/gav/Core/polkadot/node/network/dispute-distribution" } -polkadot-gossip-support ={path = "/Users/gav/Core/polkadot/node/network/gossip-support" } -polkadot-network-bridge ={path = "/Users/gav/Core/polkadot/node/network/bridge" } -polkadot-node-collation-generation ={path = "/Users/gav/Core/polkadot/node/collation-generation" } -polkadot-node-core-approval-voting ={path = "/Users/gav/Core/polkadot/node/core/approval-voting" } -polkadot-node-core-av-store ={path = "/Users/gav/Core/polkadot/node/core/av-store" } -polkadot-node-core-backing ={path = "/Users/gav/Core/polkadot/node/core/backing" } -polkadot-node-core-bitfield-signing ={path = "/Users/gav/Core/polkadot/node/core/bitfield-signing" } -polkadot-node-core-candidate-validation ={path = "/Users/gav/Core/polkadot/node/core/candidate-validation" } -polkadot-node-core-chain-api ={path = "/Users/gav/Core/polkadot/node/core/chain-api" } -polkadot-node-core-chain-selection ={path = "/Users/gav/Core/polkadot/node/core/chain-selection" } -polkadot-node-core-dispute-coordinator ={path = "/Users/gav/Core/polkadot/node/core/dispute-coordinator" } -polkadot-node-core-dispute-participation ={path = "/Users/gav/Core/polkadot/node/core/dispute-participation" } -polkadot-node-core-parachains-inherent ={path = "/Users/gav/Core/polkadot/node/core/parachains-inherent" } -polkadot-node-core-provisioner ={path = "/Users/gav/Core/polkadot/node/core/provisioner" } -polkadot-node-core-runtime-api ={path = "/Users/gav/Core/polkadot/node/core/runtime-api" } -polkadot-rpc ={path = "/Users/gav/Core/polkadot/rpc" } -polkadot-statement-distribution ={path = "/Users/gav/Core/polkadot/node/network/statement-distribution" } -polkadot-test-client ={path = "/Users/gav/Core/polkadot/node/test/client" } -polkadot-test-runtime ={path = "/Users/gav/Core/polkadot/runtime/test-runtime" } -polkadot-test-service ={path = "/Users/gav/Core/polkadot/node/test/service" } -xcm-executor-integration-tests ={path = "/Users/gav/Core/polkadot/xcm/xcm-executor/integration-tests" } -xcm-simulator ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator" } -xcm-simulator-example ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator/example" } -xcm-simulator-fuzzer ={path = "/Users/gav/Core/polkadot/xcm/xcm-simulator/fuzzer" } -polkadot-test-malus ={path = "/Users/gav/Core/polkadot/node/malus" } -polkadot-simnet ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/common" } -polkadot-simnet-node ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/node" } -polkadot-simnet-test ={path = "/Users/gav/Core/polkadot/node/test/polkadot-simnet/test" } -test-parachains ={path = "/Users/gav/Core/polkadot/parachain/test-parachains" } -test-parachain-adder-collator ={path = "/Users/gav/Core/polkadot/parachain/test-parachains/adder/collator" } -staking-miner ={path = "/Users/gav/Core/polkadot/utils/staking-miner" } -remote-ext-tests-bags-list ={path = "/Users/gav/Core/polkadot/utils/remote-ext-tests/bags-list" } -polkadot-voter-bags ={path = "/Users/gav/Core/polkadot/utils/voter-bags" } -polkadot ={path = "/Users/gav/Core/polkadot" } From 138f06d54cf387c26558eece6b521fa8862b2cee Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 24 Oct 2021 11:22:58 +0200 Subject: [PATCH 003/119] Undiener --- Cargo.lock | 8 ++++---- client/network/src/tests.rs | 7 ------- pallets/xcmp-queue/src/mock.rs | 2 ++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index decd42d333d..cfce9411bbc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2472,7 +2472,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "Inflector", "chrono", @@ -8225,7 +8225,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "env_logger 0.9.0", "jsonrpsee-proc-macros", @@ -10904,7 +10904,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "platforms", ] @@ -11451,7 +11451,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#632b32300eb9376767c2ae7b38e79b3f7f5329b1" +source = "git+https://github.com/paritytech/substrate?branch=master#969a70d1864fc5d5f6c378bcfd03f1b3ea434049" dependencies = [ "jsonrpsee-ws-client", "log", diff --git a/client/network/src/tests.rs b/client/network/src/tests.rs index 7124ebca85d..f3177dbe3a6 100644 --- a/client/network/src/tests.rs +++ b/client/network/src/tests.rs @@ -484,13 +484,6 @@ sp_api::mock_impl_runtime_apis! { BTreeMap::new() } - fn assumed_validation_data( - _: ParaId, - _: Hash, - ) -> Option<(PersistedValidationData, ValidationCodeHash)> { - None - } - fn validation_code_by_hash(_: ValidationCodeHash) -> Option { None } diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 51f19bf4a50..c0dea9bd1fa 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -146,6 +146,8 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = (); type AssetClaims = (); type SubscriptionService = (); + type PalletInstancesInfo = AllPallets; + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; } pub type XcmRouter = ( From 535b2545dc020e0e0bc13c56bdde0f1e3eaa714e Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 24 Oct 2021 11:38:46 +0200 Subject: [PATCH 004/119] Undiener --- client/network/src/tests.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/network/src/tests.rs b/client/network/src/tests.rs index f3177dbe3a6..7124ebca85d 100644 --- a/client/network/src/tests.rs +++ b/client/network/src/tests.rs @@ -484,6 +484,13 @@ sp_api::mock_impl_runtime_apis! { BTreeMap::new() } + fn assumed_validation_data( + _: ParaId, + _: Hash, + ) -> Option<(PersistedValidationData, ValidationCodeHash)> { + None + } + fn validation_code_by_hash(_: ValidationCodeHash) -> Option { None } From 9f5c19ffa5cd72068b415ab0b5ba7c9e6bb0f38f Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 26 Oct 2021 12:55:21 +0200 Subject: [PATCH 005/119] Lockfile --- Cargo.lock | 137 ++++++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfce9411bbc..bbf74a6884f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -706,6 +706,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "finality-grandpa", "frame-support", @@ -721,6 +722,7 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-runtime", "frame-support", @@ -732,6 +734,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "bp-runtime", @@ -747,6 +750,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-messages", "bp-runtime", @@ -764,6 +768,7 @@ dependencies = [ [[package]] name = "bp-rialto" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-messages", "bp-runtime", @@ -778,6 +783,7 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -794,6 +800,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-support", "hash-db", @@ -811,6 +818,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -825,6 +833,7 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -839,6 +848,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -3594,6 +3604,7 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -4563,6 +4574,7 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derive_more", "futures 0.3.17", @@ -5225,6 +5237,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5241,6 +5254,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5262,6 +5276,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "bp-message-dispatch", @@ -5938,6 +5953,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-support", "frame-system", @@ -5955,6 +5971,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.8" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-benchmarking", "frame-support", @@ -6474,6 +6491,7 @@ checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" [[package]] name = "polkadot-approval-distribution" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6487,6 +6505,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "polkadot-node-network-protocol", @@ -6499,6 +6518,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derive_more", "futures 0.3.17", @@ -6520,6 +6540,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "lru 0.7.0", @@ -6539,6 +6560,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-benchmarking-cli", "futures 0.3.17", @@ -6558,6 +6580,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -6655,6 +6678,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "always-assert", "derive_more", @@ -6675,6 +6699,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -6687,6 +6712,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derive_more", "futures 0.3.17", @@ -6708,6 +6734,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -6721,6 +6748,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -6740,6 +6768,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "futures 0.3.17", @@ -6758,6 +6787,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "parity-scale-codec", @@ -6775,6 +6805,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "derive_more", @@ -6802,6 +6833,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -6821,6 +6853,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -6838,6 +6871,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -6852,6 +6886,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "futures 0.3.17", @@ -6869,6 +6904,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "polkadot-node-subsystem", @@ -6883,6 +6919,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -6899,6 +6936,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "derive_more", @@ -6917,6 +6955,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-participation" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "polkadot-node-primitives", @@ -6929,6 +6968,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "futures 0.3.17", @@ -6945,6 +6985,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "futures 0.3.17", @@ -6959,6 +7000,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "always-assert", "assert_matches", @@ -6989,6 +7031,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "memory-lru", @@ -7006,6 +7049,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-std", "lazy_static", @@ -7023,6 +7067,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7033,6 +7078,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "derive_more", @@ -7050,6 +7096,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bounded-vec", "futures 0.3.17", @@ -7071,6 +7118,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7080,6 +7128,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "futures 0.3.17", @@ -7097,6 +7146,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derive_more", "futures 0.3.17", @@ -7115,6 +7165,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "derive_more", @@ -7141,6 +7192,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", @@ -7161,6 +7213,7 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "futures 0.3.17", @@ -7177,6 +7230,7 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -7187,6 +7241,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derive_more", "frame-support", @@ -7203,6 +7258,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitvec 0.20.1", "frame-system", @@ -7232,6 +7288,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7262,6 +7319,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7338,6 +7396,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7384,6 +7443,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "bitflags", "bitvec 0.20.1", @@ -7422,6 +7482,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "async-trait", "beefy-gadget", @@ -7519,6 +7580,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "arrayvec 0.5.2", "derive_more", @@ -7539,6 +7601,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -7548,6 +7611,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -7572,6 +7636,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -7632,6 +7697,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-benchmarking", "frame-system", @@ -8354,6 +8420,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bp-messages", @@ -9835,6 +9902,7 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slot-range-helper" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "enumn", "parity-scale-codec", @@ -12027,6 +12095,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "beefy-primitives", "bitvec 0.20.1", @@ -12271,6 +12340,7 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12283,6 +12353,7 @@ dependencies = [ [[package]] name = "xcm-builder" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-support", "frame-system", @@ -12302,6 +12373,7 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.12" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "frame-benchmarking", "frame-support", @@ -12319,6 +12391,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#ee1b80aa117516918bb0591a1ec5a27030e4c64c" dependencies = [ "proc-macro2", "quote", @@ -12388,67 +12461,3 @@ dependencies = [ "cc", "libc", ] - -[[patch.unused]] -name = "polkadot" -version = "0.9.12" - -[[patch.unused]] -name = "polkadot-simnet" -version = "0.9.12" - -[[patch.unused]] -name = "polkadot-simnet-node" -version = "0.9.12" - -[[patch.unused]] -name = "polkadot-simnet-test" -version = "0.9.12" - -[[patch.unused]] -name = "polkadot-test-malus" -version = "0.9.12" - -[[patch.unused]] -name = "polkadot-voter-bags" -version = "0.9.0" - -[[patch.unused]] -name = "remote-ext-tests-bags-list" -version = "0.9.12" - -[[patch.unused]] -name = "staking-miner" -version = "0.9.12" - -[[patch.unused]] -name = "test-parachain-adder" -version = "0.9.12" - -[[patch.unused]] -name = "test-parachain-adder-collator" -version = "0.9.12" - -[[patch.unused]] -name = "test-parachain-halt" -version = "0.9.12" - -[[patch.unused]] -name = "test-parachains" -version = "0.9.12" - -[[patch.unused]] -name = "xcm-executor-integration-tests" -version = "0.9.12" - -[[patch.unused]] -name = "xcm-simulator" -version = "0.9.12" - -[[patch.unused]] -name = "xcm-simulator-example" -version = "0.9.12" - -[[patch.unused]] -name = "xcm-simulator-fuzzer" -version = "0.9.9" From fc381c9fc8d6832a9579a554febd869a7067d8c0 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 20 Jan 2022 15:14:10 +0100 Subject: [PATCH 006/119] Changes for send returning hash --- pallets/xcmp-queue/src/lib.rs | 4 ++-- primitives/utility/Cargo.toml | 1 + primitives/utility/src/lib.rs | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index cab3a18e424..7a25640f9d6 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -938,7 +938,7 @@ impl XcmpMessageSource for Pallet { /// Xcm sender for sending to a sibling parachain. impl SendXcm for Pallet { - fn send_xcm(dest: impl Into, msg: Xcm<()>) -> Result<(), SendError> { + fn send_xcm(dest: impl Into, msg: Xcm<()>) -> SendResult { let dest = dest.into(); match &dest { @@ -954,7 +954,7 @@ impl SendXcm for Pallet { ) .map_err(|e| SendError::Transport(<&'static str>::from(e)))?; Self::deposit_event(Event::XcmpMessageSent(Some(hash))); - Ok(()) + Ok(hash) }, // Anything else is unhandled. This includes a message this is meant for us. _ => Err(SendError::CannotReachDestination(dest, msg)), diff --git a/primitives/utility/Cargo.toml b/primitives/utility/Cargo.toml index 41cfa53a321..e628b9126bf 100644 --- a/primitives/utility/Cargo.toml +++ b/primitives/utility/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" [dependencies] # Substrate dependencies sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 69397247a39..a53e9286fc1 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -33,7 +33,7 @@ use xcm::{latest::prelude::*, WrapVersion}; /// for the `SendXcm` implementation. pub struct ParentAsUmp(PhantomData<(T, W)>); impl SendXcm for ParentAsUmp { - fn send_xcm(dest: impl Into, msg: Xcm<()>) -> Result<(), SendError> { + fn send_xcm(dest: impl Into, msg: Xcm<()>) -> SendResult { let dest = dest.into(); if dest.contains_parents_only(1) { @@ -41,10 +41,11 @@ impl SendXcm for ParentAsUmp { let versioned_xcm = W::wrap_version(&dest, msg).map_err(|()| SendError::DestinationUnsupported)?; let data = versioned_xcm.encode(); + let hash = data.using_encoded(sp_io::hashing::blake2_256); T::send_upward_message(data).map_err(|e| SendError::Transport(e.into()))?; - Ok(()) + Ok(hash) } else { // Anything else is unhandled. This includes a message this is meant for us. Err(SendError::CannotReachDestination(dest, msg)) From 23c26db563d1b96779388693a617da0dd51b0413 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 9 Mar 2022 03:11:16 -0800 Subject: [PATCH 007/119] Include message ID as params to execute_xcm --- pallets/xcm/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 10c306f1be9..60c5d4b3568 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -114,7 +114,7 @@ impl DmpMessageHandler for UnlimitedDmpExecution { ) -> Weight { let mut used = 0; for (_sent_at, data) in iter { - let id = sp_io::hashing::twox_64(&data[..]); + let id = sp_io::hashing::blake2_256(&data[..]); let msg = VersionedXcm::::decode_all_with_depth_limit( MAX_XCM_DECODE_DEPTH, &mut data.as_slice(), @@ -124,7 +124,7 @@ impl DmpMessageHandler for UnlimitedDmpExecution { Err(_) => Pallet::::deposit_event(Event::InvalidFormat(id)), Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); used += outcome.weight_used(); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, @@ -147,7 +147,7 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { ) -> Weight { let mut used = 0; for (_sent_at, data) in iter { - let id = sp_io::hashing::twox_64(&data[..]); + let id = sp_io::hashing::blake2_256(&data[..]); let msg = VersionedXcm::::decode_all_with_depth_limit( MAX_XCM_DECODE_DEPTH, &mut data.as_slice(), @@ -158,7 +158,7 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { let weight_limit = limit.saturating_sub(used); - let outcome = T::XcmExecutor::execute_xcm(Parent, x, weight_limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit); used += outcome.weight_used(); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, From 6cec5c8912aa1e99615d9d844ab8c57014ec372d Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 9 Mar 2022 18:57:24 -0800 Subject: [PATCH 008/119] Fixes --- pallets/xcm/src/lib.rs | 6 +++--- primitives/utility/src/lib.rs | 35 +++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 60c5d4b3568..4b8432a2ab8 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -67,13 +67,13 @@ pub mod pallet { pub enum Event { /// Downward message is invalid XCM. /// \[ id \] - InvalidFormat([u8; 8]), + InvalidFormat([u8; 32]), /// Downward message is unsupported version of XCM. /// \[ id \] - UnsupportedVersion([u8; 8]), + UnsupportedVersion([u8; 32]), /// Downward message executed with the given outcome. /// \[ id, outcome \] - ExecutedDownward([u8; 8], Outcome), + ExecutedDownward([u8; 32], Outcome), } /// Origin for the parachains module. diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index a53e9286fc1..0686cd05d89 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -20,7 +20,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::Encode; -use cumulus_primitives_core::UpwardMessageSender; +use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; use sp_std::marker::PhantomData; use xcm::{latest::prelude::*, WrapVersion}; @@ -33,22 +33,37 @@ use xcm::{latest::prelude::*, WrapVersion}; /// for the `SendXcm` implementation. pub struct ParentAsUmp(PhantomData<(T, W)>); impl SendXcm for ParentAsUmp { - fn send_xcm(dest: impl Into, msg: Xcm<()>) -> SendResult { - let dest = dest.into(); + type Ticket = Vec; - if dest.contains_parents_only(1) { + fn validate( + dest: &mut Option, + msg: &mut Option>, + ) -> SendResult> { + let d = dest.take().ok_or(SendError::MissingArgument)?; + let xcm = msg.take().ok_or(SendError::MissingArgument)?; + + if d.contains_parents_only(1) { // An upward message for the relay chain. let versioned_xcm = - W::wrap_version(&dest, msg).map_err(|()| SendError::DestinationUnsupported)?; + W::wrap_version(&d, msg).map_err(|()| SendError::DestinationUnsupported)?; let data = versioned_xcm.encode(); - let hash = data.using_encoded(sp_io::hashing::blake2_256); - - T::send_upward_message(data).map_err(|e| SendError::Transport(e.into()))?; - Ok(hash) + Ok(data, MultiAssets::new()) } else { + *dest = Some(d.clone()); // Anything else is unhandled. This includes a message this is meant for us. - Err(SendError::CannotReachDestination(dest, msg)) + Err(SendError::NotApplicable(d, xcm)) } } + + fn deliver(blob: Vec) -> Result { + let hash = data.using_encoded(sp_io::hashing::blake2_256); + + T::send_upward_message(data).map_err(|e| match e { + MessageSendError::TooBig => SendError::ExceedsMaxMessageSize, + e => SendError::Transport(e.into()), + })?; + + Ok(hash) + } } From 005d37a1d497840b2b838c1f441f0f485d567982 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 10 Mar 2022 21:21:34 -0800 Subject: [PATCH 009/119] Fixes --- pallets/dmp-queue/src/lib.rs | 2 +- primitives/utility/src/lib.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 8becd30bb9b..23841190d19 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -241,7 +241,7 @@ pub mod pallet { Ok(0) }, Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => Err((id, required)), diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 0686cd05d89..f07e65a88b1 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -45,18 +45,18 @@ impl SendXcm for ParentAsUmp { if d.contains_parents_only(1) { // An upward message for the relay chain. let versioned_xcm = - W::wrap_version(&d, msg).map_err(|()| SendError::DestinationUnsupported)?; + W::wrap_version(&d, xcm).map_err(|()| SendError::DestinationUnsupported)?; let data = versioned_xcm.encode(); - Ok(data, MultiAssets::new()) + Ok((data, MultiAssets::new())) } else { - *dest = Some(d.clone()); + *dest = Some(d); // Anything else is unhandled. This includes a message this is meant for us. - Err(SendError::NotApplicable(d, xcm)) + Err(SendError::NotApplicable) } } - fn deliver(blob: Vec) -> Result { + fn deliver(data: Vec) -> Result { let hash = data.using_encoded(sp_io::hashing::blake2_256); T::send_upward_message(data).map_err(|e| match e { From a10ac2e7d23fccc9ada24bb788a5d688c7b1109d Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 10 Mar 2022 21:51:38 -0800 Subject: [PATCH 010/119] Fixes --- pallets/dmp-queue/src/lib.rs | 11 +++++++++ pallets/xcmp-queue/Cargo.toml | 3 ++- pallets/xcmp-queue/src/lib.rs | 43 +++++++++++++++++++++++------------ 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 23841190d19..f743f2f7df6 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -422,9 +422,16 @@ mod tests { pub struct MockExec; impl ExecuteXcm for MockExec { + type Prepared = Weightless; + + fn prepare(message: Xcm<()>) -> Result> { + Err(message) + } + fn execute_xcm_in_credit( _origin: impl Into, message: Xcm, + _hash: XcmHash, weight_limit: Weight, _credit: Weight, ) -> Outcome { @@ -442,6 +449,10 @@ mod tests { TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); o } + + fn charge_fees(_location: impl Into, _fees: MultiAssets) -> XcmResult { + Err(XcmError::Unimplemented) + } } impl Config for Test { diff --git a/pallets/xcmp-queue/Cargo.toml b/pallets/xcmp-queue/Cargo.toml index b9439bb4434..d457e322bd4 100644 --- a/pallets/xcmp-queue/Cargo.toml +++ b/pallets/xcmp-queue/Cargo.toml @@ -13,6 +13,7 @@ scale-info = { version = "2.0.0", default-features = false, features = ["derive" # Substrate frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } @@ -30,7 +31,6 @@ frame-benchmarking = { default-features = false, optional = true, git = "https:/ # Substrate sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot @@ -48,6 +48,7 @@ std = [ "frame-support/std", "frame-system/std", "log/std", + "sp-io/std", "sp-runtime/std", "sp-std/std", "xcm-executor/std", diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 41e055bfdc0..03abce5291d 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -1079,26 +1079,41 @@ impl XcmpMessageSource for Pallet { /// Xcm sender for sending to a sibling parachain. impl SendXcm for Pallet { - fn send_xcm(dest: impl Into, msg: Xcm<()>) -> SendResult { - let dest = dest.into(); + type Ticket = (ParaId, VersionedXcm<()>); - match &dest { + fn validate( + dest: &mut Option, + msg: &mut Option>, + ) -> SendResult<(ParaId, VersionedXcm<()>)> { + let d = dest.take().ok_or(SendError::MissingArgument)?; + let xcm = msg.take().ok_or(SendError::MissingArgument)?; + + match &d { // An HRMP message for a sibling parachain. MultiLocation { parents: 1, interior: X1(Parachain(id)) } => { - let versioned_xcm = T::VersionWrapper::wrap_version(&dest, msg) + let versioned_xcm = T::VersionWrapper::wrap_version(&d, xcm) .map_err(|()| SendError::DestinationUnsupported)?; - let hash = T::Hashing::hash_of(&versioned_xcm); - Self::send_fragment( - (*id).into(), - XcmpMessageFormat::ConcatenatedVersionedXcm, - versioned_xcm, - ) - .map_err(|e| SendError::Transport(<&'static str>::from(e)))?; - Self::deposit_event(Event::XcmpMessageSent(Some(hash))); - Ok(hash) + Ok(((*id).into(), versioned_xcm)) }, // Anything else is unhandled. This includes a message this is meant for us. - _ => Err(SendError::CannotReachDestination(dest, msg)), + _ => { + *dest = Some(d); + Err(SendError::NotApplicable) + } + } + } + + fn deliver((id, xcm): (ParaId, VersionedXcm<()>)) -> Result { + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); + + match Self::send_fragment(id, XcmpMessageFormat::ConcatenatedVersionedXcm, xcm) { + Ok(_) => { + Self::deposit_event(Event::XcmpMessageSent(Some(hash))); + Ok(hash) + } + Err(e) => { + Err(SendError::Transport(<&'static str>::from(e))) + } } } } From 9e70ba8317849c3eff4c9f41235779b7c85f2344 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 10 Mar 2022 22:48:48 -0800 Subject: [PATCH 011/119] Fixes --- pallets/dmp-queue/src/lib.rs | 4 ++-- pallets/xcmp-queue/src/lib.rs | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index f743f2f7df6..101bead3a5f 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -345,7 +345,7 @@ mod tests { }; use sp_version::RuntimeVersion; use std::cell::RefCell; - use xcm::latest::{MultiLocation, OriginKind}; + use xcm::latest::{MultiLocation, OriginKind, Weightless}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -424,7 +424,7 @@ mod tests { impl ExecuteXcm for MockExec { type Prepared = Weightless; - fn prepare(message: Xcm<()>) -> Result> { + fn prepare(message: Xcm) -> Result { Err(message) } diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 03abce5291d..1a9a48065c0 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -263,17 +263,17 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Some XCM was executed ok. - Success(Option), + Success(Option), /// Some XCM failed. - Fail(Option, XcmError), + Fail(Option, XcmError), /// Bad XCM version used. - BadVersion(Option), + BadVersion(Option), /// Bad XCM format used. - BadFormat(Option), + BadFormat(Option), /// An upward message was sent to the relay chain. - UpwardMessageSent(Option), + UpwardMessageSent(Option), /// An HRMP message was sent to a sibling parachain. - XcmpMessageSent(Option), + XcmpMessageSent(Option), /// An XCM exceeded the individual message weight budget. OverweightEnqueued(ParaId, RelayBlockNumber, OverweightIndex, Weight), /// An XCM from the overweight queue was executed with the given actual weight used. @@ -594,12 +594,12 @@ impl Pallet { xcm: VersionedXcm, max_weight: Weight, ) -> Result { - let hash = Encode::using_encoded(&xcm, T::Hashing::hash); + let hash = xcm.using_encoded(sp_io::hashing::blake2_256); log::debug!("Processing XCMP-XCM: {:?}", &hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { let location = (1, Parachain(sender.into())); - match T::XcmExecutor::execute_xcm(location, xcm, max_weight) { + match T::XcmExecutor::execute_xcm(location, xcm, hash, max_weight) { Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), // As far as the caller is concerned, this was dispatched without error, so @@ -781,7 +781,7 @@ impl Pallet { let index = shuffled[shuffle_index]; let sender = status[index].sender; let sender_origin = T::ControllerOriginConverter::convert_origin( - (1, Parachain(sender.into())), + (Parent, Parachain(sender.into())), OriginKind::Superuser, ); let is_controller = sender_origin @@ -1093,7 +1093,7 @@ impl SendXcm for Pallet { MultiLocation { parents: 1, interior: X1(Parachain(id)) } => { let versioned_xcm = T::VersionWrapper::wrap_version(&d, xcm) .map_err(|()| SendError::DestinationUnsupported)?; - Ok(((*id).into(), versioned_xcm)) + Ok((((*id).into(), versioned_xcm), MultiAssets::new())) }, // Anything else is unhandled. This includes a message this is meant for us. _ => { From 484e63daf110271f24db81458303932576f2112b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 10 Mar 2022 23:25:36 -0800 Subject: [PATCH 012/119] Fixes --- pallets/dmp-queue/src/lib.rs | 8 +++++--- pallets/xcmp-queue/src/lib.rs | 12 +++++------- polkadot-parachains/pallets/ping/src/lib.rs | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 101bead3a5f..7f050f09553 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -345,7 +345,10 @@ mod tests { }; use sp_version::RuntimeVersion; use std::cell::RefCell; - use xcm::latest::{MultiLocation, OriginKind, Weightless}; + use xcm::{ + latest::{MultiLocation, OriginKind}, + v3::traits::Weightless, + }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -428,12 +431,11 @@ mod tests { Err(message) } - fn execute_xcm_in_credit( + fn execute( _origin: impl Into, message: Xcm, _hash: XcmHash, weight_limit: Weight, - _credit: Weight, ) -> Outcome { let o = match (message.0.len(), &message.0.first()) { (1, Some(Transact { require_weight_at_most, .. })) => { diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 1a9a48065c0..112aaf378d7 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -52,7 +52,7 @@ use rand_chacha::{ ChaChaRng, }; use scale_info::TypeInfo; -use sp_runtime::{traits::Hash, RuntimeDebug}; +use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; use xcm::{latest::prelude::*, VersionedXcm, WrapVersion, MAX_XCM_DECODE_DEPTH}; use xcm_executor::traits::ConvertOrigin; @@ -598,7 +598,7 @@ impl Pallet { log::debug!("Processing XCMP-XCM: {:?}", &hash); let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { - let location = (1, Parachain(sender.into())); + let location = (Parent, Parachain(sender.into())); match T::XcmExecutor::execute_xcm(location, xcm, hash, max_weight) { Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)), Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))), @@ -1099,7 +1099,7 @@ impl SendXcm for Pallet { _ => { *dest = Some(d); Err(SendError::NotApplicable) - } + }, } } @@ -1110,10 +1110,8 @@ impl SendXcm for Pallet { Ok(_) => { Self::deposit_event(Event::XcmpMessageSent(Some(hash))); Ok(hash) - } - Err(e) => { - Err(SendError::Transport(<&'static str>::from(e))) - } + }, + Err(e) => Err(SendError::Transport(<&'static str>::from(e))), } } } diff --git a/polkadot-parachains/pallets/ping/src/lib.rs b/polkadot-parachains/pallets/ping/src/lib.rs index 7ca75669c2d..ffac149a65f 100644 --- a/polkadot-parachains/pallets/ping/src/lib.rs +++ b/polkadot-parachains/pallets/ping/src/lib.rs @@ -89,8 +89,8 @@ pub mod pallet { *seq += 1; *seq }); - match T::XcmSender::send_xcm( - (1, Junction::Parachain(para.into())), + match send_xcm::( + (Parent, Junction::Parachain(para.into())), Xcm(vec![Transact { origin_kind: OriginKind::Native, require_weight_at_most: 1_000, @@ -165,8 +165,8 @@ pub mod pallet { let para = ensure_sibling_para(::Origin::from(origin))?; Self::deposit_event(Event::Pinged(para, seq, payload.clone())); - match T::XcmSender::send_xcm( - (1, Junction::Parachain(para.into())), + match send_xcm::( + (Parent, Junction::Parachain(para.into())), Xcm(vec![Transact { origin_kind: OriginKind::Native, require_weight_at_most: 1_000, From f474297b5b606f7951cf539920b064eb3bbe75d4 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 11 Mar 2022 00:22:39 -0800 Subject: [PATCH 013/119] Fixes --- pallets/dmp-queue/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 7f050f09553..2774be7f0d3 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -345,10 +345,7 @@ mod tests { }; use sp_version::RuntimeVersion; use std::cell::RefCell; - use xcm::{ - latest::{MultiLocation, OriginKind}, - v3::traits::Weightless, - }; + use xcm::latest::{MultiLocation, OriginKind}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -423,6 +420,13 @@ mod tests { }) } + pub enum Weightless {} + impl PreparedMessage for Weightless { + fn weight_of(&self) -> Weight { + unreachable!() + } + } + pub struct MockExec; impl ExecuteXcm for MockExec { type Prepared = Weightless; From ed87d188c6706e73228c44235b67688d394cd245 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 18:13:49 +0100 Subject: [PATCH 014/119] Companion fixes --- Cargo.lock | 152 +++++++++--------- pallets/xcmp-queue/src/mock.rs | 4 +- parachain-template/runtime/src/xcm_config.rs | 22 ++- .../canvas-kusama/src/xcm_config.rs | 16 +- polkadot-parachains/pallets/ping/src/lib.rs | 14 +- .../parachains-common/src/impls.rs | 7 +- .../rococo-parachain/src/lib.rs | 23 ++- polkadot-parachains/shell/src/xcm_config.rs | 13 +- .../statemine/src/xcm_config.rs | 26 ++- .../statemint/src/xcm_config.rs | 25 ++- .../westmint/src/xcm_config.rs | 22 ++- primitives/utility/src/lib.rs | 2 +- 12 files changed, 192 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d79f6ba5227..ee303e6d5af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -732,7 +732,6 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "finality-grandpa", "frame-support", @@ -748,7 +747,6 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-runtime", "frame-support", @@ -760,7 +758,6 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "bp-runtime", @@ -776,7 +773,6 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-messages", "bp-runtime", @@ -794,7 +790,6 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -811,7 +806,6 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "hash-db", @@ -829,7 +823,6 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -844,7 +837,6 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -859,7 +851,6 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -4182,7 +4173,6 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bitvec", @@ -4270,7 +4260,6 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "polkadot-primitives", @@ -5134,7 +5123,6 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derive_more", "futures 0.3.21", @@ -5791,7 +5779,6 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5808,7 +5795,6 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5830,7 +5816,6 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "bp-message-dispatch", @@ -6606,15 +6591,16 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", "serde", "sp-core", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -6624,7 +6610,6 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-benchmarking", "frame-support", @@ -6632,6 +6617,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -7185,7 +7171,6 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7199,7 +7184,6 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7212,7 +7196,6 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derive_more", "fatality", @@ -7235,7 +7218,6 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "fatality", "futures 0.3.21", @@ -7256,7 +7238,6 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "clap 3.1.6", "frame-benchmarking-cli", @@ -7279,7 +7260,6 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7385,7 +7365,6 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "always-assert", "fatality", @@ -7406,7 +7385,6 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7419,7 +7397,6 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derive_more", "fatality", @@ -7442,7 +7419,6 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7456,7 +7432,6 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7476,7 +7451,6 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "futures 0.3.21", @@ -7495,7 +7469,6 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "parity-scale-codec", @@ -7513,7 +7486,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "derive_more", @@ -7541,7 +7513,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "futures 0.3.21", @@ -7561,7 +7532,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "futures 0.3.21", @@ -7579,7 +7549,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7594,7 +7563,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "futures 0.3.21", @@ -7612,7 +7580,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7627,7 +7594,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7644,7 +7610,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "fatality", "futures 0.3.21", @@ -7663,7 +7628,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "futures 0.3.21", @@ -7680,7 +7644,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "futures 0.3.21", @@ -7697,7 +7660,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "always-assert", "assert_matches", @@ -7727,7 +7689,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "polkadot-node-primitives", @@ -7743,7 +7704,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "memory-lru", @@ -7761,7 +7721,6 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-std", "lazy_static", @@ -7779,7 +7738,6 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bs58", "futures 0.3.21", @@ -7798,7 +7756,6 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "fatality", @@ -7816,7 +7773,6 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bounded-vec", "futures 0.3.21", @@ -7838,7 +7794,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7848,7 +7803,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "futures 0.3.21", @@ -7866,7 +7820,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derive_more", "futures 0.3.21", @@ -7885,7 +7838,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "derive_more", @@ -7918,7 +7870,6 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7939,7 +7890,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "futures 0.3.21", @@ -7956,7 +7906,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "expander 0.0.5", "proc-macro-crate 1.1.3", @@ -7968,7 +7917,6 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derive_more", "frame-support", @@ -7985,7 +7933,6 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "env_logger", "kusama-runtime", @@ -8000,7 +7947,6 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitvec", "frame-system", @@ -8030,7 +7976,6 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8061,7 +8006,6 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bitvec", @@ -8145,7 +8089,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bitvec", @@ -8192,7 +8135,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "polkadot-primitives", @@ -8204,7 +8146,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bs58", "parity-scale-codec", @@ -8216,7 +8157,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "bitflags", "bitvec", @@ -8258,7 +8198,6 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "async-trait", "beefy-gadget", @@ -8359,7 +8298,6 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8380,7 +8318,6 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8390,7 +8327,6 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8415,7 +8351,6 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bitvec", @@ -8477,7 +8412,6 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-benchmarking", "frame-system", @@ -9137,7 +9071,6 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bp-messages", @@ -9212,7 +9145,6 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "polkadot-primitives", @@ -10801,7 +10733,6 @@ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slot-range-helper" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "enumn", "parity-scale-codec", @@ -12054,7 +11985,6 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "test-runtime-constants" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "polkadot-primitives", @@ -13052,7 +12982,6 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "beefy-primitives", "bitvec", @@ -13138,7 +13067,6 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "polkadot-primitives", @@ -13358,23 +13286,23 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", + "sp-io", "xcm-procedural", ] [[package]] name = "xcm-builder" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", @@ -13391,7 +13319,6 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.17" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "frame-benchmarking", "frame-support", @@ -13409,7 +13336,6 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#dead598b50f8b946ed90cd437a38e73231d768a8" dependencies = [ "Inflector", "proc-macro2", @@ -13480,3 +13406,71 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "polkadot" +version = "0.9.17" + +[[patch.unused]] +name = "polkadot-primitives-test-helpers" +version = "0.9.17" + +[[patch.unused]] +name = "polkadot-test-malus" +version = "0.9.17" + +[[patch.unused]] +name = "polkadot-voter-bags" +version = "0.9.17" + +[[patch.unused]] +name = "remote-ext-tests-bags-list" +version = "0.9.17" + +[[patch.unused]] +name = "staking-miner" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachain-adder" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachain-adder-collator" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachain-halt" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachain-undying" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachain-undying-collator" +version = "0.9.17" + +[[patch.unused]] +name = "test-parachains" +version = "0.9.17" + +[[patch.unused]] +name = "xcm-executor-integration-tests" +version = "0.9.17" + +[[patch.unused]] +name = "xcm-simulator" +version = "0.9.17" + +[[patch.unused]] +name = "xcm-simulator-example" +version = "0.9.17" + +[[patch.unused]] +name = "xcm-simulator-fuzzer" +version = "0.9.17" + +[[patch.unused]] +name = "zombienet-backchannel" +version = "0.9.17" diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 4d8bf0b2a41..18a099e5ab3 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -113,7 +113,7 @@ impl cumulus_pallet_parachain_system::Config for Test { parameter_types! { pub const RelayChain: MultiLocation = MultiLocation::parent(); - pub Ancestry: MultiLocation = X1(Parachain(1u32.into())).into(); + pub UniversalLocation: InteriorMultiLocation = X1(Parachain(1u32.into())).into(); pub UnitWeightCost: Weight = 1_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; @@ -144,7 +144,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = (); type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = (); type Weigher = FixedWeightBounds; type Trader = (); diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 0684020fea2..bf7a717c26c 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -4,7 +4,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{Everything, Nothing, ConstU32}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -22,9 +22,9 @@ 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: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -104,7 +104,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = (); // Teleporting is disabled. - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -113,8 +113,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstanceInfo = (); + type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -141,13 +146,18 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/canvas-kusama/src/xcm_config.rs b/polkadot-parachains/canvas-kusama/src/xcm_config.rs index c129d4d0162..33d563f165b 100644 --- a/polkadot-parachains/canvas-kusama/src/xcm_config.rs +++ b/polkadot-parachains/canvas-kusama/src/xcm_config.rs @@ -40,7 +40,7 @@ parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Any; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub const Local: MultiLocation = Here.into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const ExecutiveBody: BodyId = BodyId::Executive; @@ -136,7 +136,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = UsingComponents; @@ -144,6 +144,11 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// Converts a local signed origin into an XCM multilocation. @@ -172,11 +177,16 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; 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>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/pallets/ping/src/lib.rs b/polkadot-parachains/pallets/ping/src/lib.rs index ffac149a65f..621190bc79e 100644 --- a/polkadot-parachains/pallets/ping/src/lib.rs +++ b/polkadot-parachains/pallets/ping/src/lib.rs @@ -69,9 +69,9 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - PingSent(ParaId, u32, Vec), + PingSent(ParaId, u32, Vec, XcmHash, MultiAssets), Pinged(ParaId, u32, Vec), - PongSent(ParaId, u32, Vec), + PongSent(ParaId, u32, Vec, XcmHash, MultiAssets), Ponged(ParaId, u32, Vec, T::BlockNumber), ErrorSendingPing(SendError, ParaId, u32, Vec), ErrorSendingPong(SendError, ParaId, u32, Vec), @@ -90,7 +90,7 @@ pub mod pallet { *seq }); match send_xcm::( - (Parent, Junction::Parachain(para.into())), + (Parent, Junction::Parachain(para.into())).into(), Xcm(vec![Transact { origin_kind: OriginKind::Native, require_weight_at_most: 1_000, @@ -102,9 +102,9 @@ pub mod pallet { .into(), }]), ) { - Ok(()) => { + Ok((hash, cost)) => { Pings::::insert(seq, n); - Self::deposit_event(Event::PingSent(para, seq, payload)); + Self::deposit_event(Event::PingSent(para, seq, payload, hash, cost)); }, Err(e) => { Self::deposit_event(Event::ErrorSendingPing(e, para, seq, payload)); @@ -166,7 +166,7 @@ pub mod pallet { Self::deposit_event(Event::Pinged(para, seq, payload.clone())); match send_xcm::( - (Parent, Junction::Parachain(para.into())), + (Parent, Junction::Parachain(para.into())).into(), Xcm(vec![Transact { origin_kind: OriginKind::Native, require_weight_at_most: 1_000, @@ -178,7 +178,7 @@ pub mod pallet { .into(), }]), ) { - Ok(()) => Self::deposit_event(Event::PongSent(para, seq, payload)), + Ok((hash, cost)) => Self::deposit_event(Event::PongSent(para, seq, payload, hash, cost)), Err(e) => Self::deposit_event(Event::ErrorSendingPong(e, para, seq, payload)), } Ok(()) diff --git a/polkadot-parachains/parachains-common/src/impls.rs b/polkadot-parachains/parachains-common/src/impls.rs index 4a2411c2cf3..2b66cd416d1 100644 --- a/polkadot-parachains/parachains-common/src/impls.rs +++ b/polkadot-parachains/parachains-common/src/impls.rs @@ -18,13 +18,12 @@ use frame_support::traits::{ fungibles::{self, Balanced, CreditOf}, - Contains, Currency, Get, Imbalance, OnUnbalanced, + Contains, ContainsPair, Currency, Get, Imbalance, OnUnbalanced, }; use pallet_asset_tx_payment::HandleCredit; use sp_runtime::traits::Zero; use sp_std::marker::PhantomData; use xcm::latest::{AssetId, Fungibility::Fungible, MultiAsset, MultiLocation}; -use xcm_executor::traits::FilterAssetLocation; /// Type alias to conveniently refer to the `Currency::NegativeImbalance` associated type. pub type NegativeImbalance = as Currency< @@ -100,8 +99,8 @@ where /// Asset filter that allows all assets from a certain location. pub struct AssetsFrom(PhantomData); -impl> FilterAssetLocation for AssetsFrom { - fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { +impl> ContainsPair for AssetsFrom { + fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { let loc = T::get(); &loc == origin && matches!(asset, MultiAsset { id: AssetId::Concrete(asset_loc), fun: Fungible(_a) } diff --git a/polkadot-parachains/rococo-parachain/src/lib.rs b/polkadot-parachains/rococo-parachain/src/lib.rs index b7c30ebb1c9..8697a63fbac 100644 --- a/polkadot-parachains/rococo-parachain/src/lib.rs +++ b/polkadot-parachains/rococo-parachain/src/lib.rs @@ -22,6 +22,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +use frame_support::traits::{Nothing, ConstU32}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; use sp_runtime::{ @@ -62,7 +63,7 @@ use parachains_common::{ }; use xcm_builder::{ AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, FungiblesAdapter, + ConvertedConcreteId, FungiblesAdapter, }; use xcm_executor::traits::JustTry; @@ -275,7 +276,7 @@ parameter_types! { pub const RocLocation: MultiLocation = MultiLocation::parent(); pub const RococoNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -310,7 +311,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, u64, AsPrefixedGeneralIndex, @@ -403,7 +404,7 @@ impl Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = Reserves; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of ROC - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = UsingComponents, RocLocation, AccountId, Balances, ()>; @@ -413,6 +414,11 @@ impl Config for XcmConfig { type SubscriptionService = PolkadotXcm; type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. @@ -435,13 +441,18 @@ impl pallet_xcm::Config for Runtime { type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = frame_support::traits::Nothing; + type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; 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>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/shell/src/xcm_config.rs b/polkadot-parachains/shell/src/xcm_config.rs index dad6b053a55..88bc28b7285 100644 --- a/polkadot-parachains/shell/src/xcm_config.rs +++ b/polkadot-parachains/shell/src/xcm_config.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime}; -use frame_support::{match_types, parameter_types, weights::Weight}; +use frame_support::{match_types, parameter_types, weights::Weight, traits::Nothing}; use xcm::latest::prelude::*; use xcm_builder::{ AllowUnpaidExecutionFrom, FixedWeightBounds, LocationInverter, ParentAsSuperuser, @@ -24,7 +24,7 @@ use xcm_builder::{ parameter_types! { pub const RococoLocation: MultiLocation = MultiLocation::parent(); pub const RococoNetwork: NetworkId = NetworkId::Polkadot; - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); } /// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance, @@ -59,7 +59,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = (); // balances not supported type IsTeleporter = (); // balances not supported - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = AllowUnpaidExecutionFrom; type Weigher = FixedWeightBounds; // balances not supported type Trader = (); // balances not supported @@ -67,8 +67,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = (); // don't trap for now type AssetClaims = (); // don't claim for now type SubscriptionService = (); // don't handle subscriptions for now - type PalletInstanceInfo = (); + type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/statemine/src/xcm_config.rs b/polkadot-parachains/statemine/src/xcm_config.rs index 726603d5789..5adcf22d066 100644 --- a/polkadot-parachains/statemine/src/xcm_config.rs +++ b/polkadot-parachains/statemine/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess}, + traits::{Everything, Nothing, PalletInfoAccess, ConstU32}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,7 +29,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -41,8 +41,8 @@ parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = X1(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(); @@ -79,7 +79,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, @@ -159,7 +159,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -168,8 +168,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstanceInfo = (); + type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// Converts a local signed origin into an XCM multilocation. @@ -198,11 +203,16 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; 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>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index 380282df56b..e12578567b7 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess}, + traits::{Everything, Nothing, PalletInfoAccess, ConstU32}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,7 +29,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -41,7 +41,7 @@ parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub const Local: MultiLocation = Here.into(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); @@ -79,7 +79,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, @@ -159,7 +159,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -168,8 +168,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstanceInfo = (); + type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// Converts a local signed origin into an XCM multilocation. @@ -198,12 +203,16 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; 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>;} impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index e59336864a2..54acfeb2a8a 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -29,7 +29,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, @@ -41,7 +41,7 @@ parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); pub RelayNetwork: NetworkId = NetworkId::Named(b"Westend".to_vec()); pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub const Local: MultiLocation = Here.into(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); @@ -79,7 +79,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, @@ -155,7 +155,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of WND - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -164,8 +164,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstanceInfo = (); + type PalletInstancesInfo = (); type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. @@ -190,11 +195,16 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type LocationInverter = LocationInverter; type Origin = Origin; type Call = Call; 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>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index f07e65a88b1..d48045dbbb4 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -21,7 +21,7 @@ use codec::Encode; use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; -use sp_std::marker::PhantomData; +use sp_std::{prelude::*, marker::PhantomData}; use xcm::{latest::prelude::*, WrapVersion}; /// Xcm router which recognises the `Parent` destination and handles it by sending the message into From e5cdda0d15aa8ee0edd8832bf94cd2f1991ecea9 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 18:28:32 +0100 Subject: [PATCH 015/119] Formatting --- parachain-template/runtime/src/xcm_config.rs | 2 +- polkadot-parachains/pallets/ping/src/lib.rs | 3 ++- polkadot-parachains/rococo-parachain/src/lib.rs | 6 +++--- polkadot-parachains/shell/src/xcm_config.rs | 2 +- polkadot-parachains/statemine/src/xcm_config.rs | 6 +++--- polkadot-parachains/statemint/src/xcm_config.rs | 9 +++++---- polkadot-parachains/westmint/src/xcm_config.rs | 4 ++-- primitives/utility/src/lib.rs | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index bf7a717c26c..fc394a05d44 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -4,7 +4,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, ConstU32}, + traits::{ConstU32, Everything, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; diff --git a/polkadot-parachains/pallets/ping/src/lib.rs b/polkadot-parachains/pallets/ping/src/lib.rs index 621190bc79e..aa83a2ce5b5 100644 --- a/polkadot-parachains/pallets/ping/src/lib.rs +++ b/polkadot-parachains/pallets/ping/src/lib.rs @@ -178,7 +178,8 @@ pub mod pallet { .into(), }]), ) { - Ok((hash, cost)) => Self::deposit_event(Event::PongSent(para, seq, payload, hash, cost)), + Ok((hash, cost)) => + Self::deposit_event(Event::PongSent(para, seq, payload, hash, cost)), Err(e) => Self::deposit_event(Event::ErrorSendingPong(e, para, seq, payload)), } Ok(()) diff --git a/polkadot-parachains/rococo-parachain/src/lib.rs b/polkadot-parachains/rococo-parachain/src/lib.rs index 8697a63fbac..41b22f6d38c 100644 --- a/polkadot-parachains/rococo-parachain/src/lib.rs +++ b/polkadot-parachains/rococo-parachain/src/lib.rs @@ -22,7 +22,7 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); -use frame_support::traits::{Nothing, ConstU32}; +use frame_support::traits::{ConstU32, Nothing}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; use sp_runtime::{ @@ -62,8 +62,8 @@ use parachains_common::{ AssetId, }; use xcm_builder::{ - AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, FungiblesAdapter, + AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, + FungiblesAdapter, }; use xcm_executor::traits::JustTry; diff --git a/polkadot-parachains/shell/src/xcm_config.rs b/polkadot-parachains/shell/src/xcm_config.rs index 88bc28b7285..0d491043af1 100644 --- a/polkadot-parachains/shell/src/xcm_config.rs +++ b/polkadot-parachains/shell/src/xcm_config.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime}; -use frame_support::{match_types, parameter_types, weights::Weight, traits::Nothing}; +use frame_support::{match_types, parameter_types, traits::Nothing, weights::Weight}; use xcm::latest::prelude::*; use xcm_builder::{ AllowUnpaidExecutionFrom, FixedWeightBounds, LocationInverter, ParentAsSuperuser, diff --git a/polkadot-parachains/statemine/src/xcm_config.rs b/polkadot-parachains/statemine/src/xcm_config.rs index 5adcf22d066..a1f19a919cb 100644 --- a/polkadot-parachains/statemine/src/xcm_config.rs +++ b/polkadot-parachains/statemine/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess, ConstU32}, + traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index e12578567b7..52a7e845736 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing, PalletInfoAccess, ConstU32}, + traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -212,7 +212,8 @@ impl pallet_xcm::Config for Runtime { type CurrencyMatcher = (); type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>;} + type MaxLockers = ConstU32<8>; +} impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index 54acfeb2a8a..5785254b340 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index d48045dbbb4..f99ebce9ec6 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -21,7 +21,7 @@ use codec::Encode; use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; -use sp_std::{prelude::*, marker::PhantomData}; +use sp_std::{marker::PhantomData, prelude::*}; use xcm::{latest::prelude::*, WrapVersion}; /// Xcm router which recognises the `Parent` destination and handles it by sending the message into From 8e73c005e9618efd348f437095204d8626cab535 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 18:45:17 +0100 Subject: [PATCH 016/119] Fixes --- Cargo.lock | 152 +++++++++--------- .../canvas-kusama/src/xcm_config.rs | 8 +- .../statemint/src/xcm_config.rs | 2 +- .../westmint/src/xcm_config.rs | 10 +- 4 files changed, 84 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c05122fe15d..9a49377747d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -732,7 +732,6 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "finality-grandpa", "frame-support", @@ -748,7 +747,6 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-runtime", "frame-support", @@ -760,7 +758,6 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "bp-runtime", @@ -776,7 +773,6 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-messages", "bp-runtime", @@ -794,7 +790,6 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -811,7 +806,6 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "hash-db", @@ -829,7 +823,6 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -844,7 +837,6 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -859,7 +851,6 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -4182,7 +4173,6 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bitvec", @@ -4270,7 +4260,6 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "polkadot-primitives", @@ -5134,7 +5123,6 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derive_more", "futures 0.3.21", @@ -5791,7 +5779,6 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5808,7 +5795,6 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5830,7 +5816,6 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "bp-message-dispatch", @@ -6606,15 +6591,16 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", "serde", "sp-core", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -6624,7 +6610,6 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-benchmarking", "frame-support", @@ -6632,6 +6617,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -7186,7 +7172,6 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7200,7 +7185,6 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7213,7 +7197,6 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derive_more", "fatality", @@ -7236,7 +7219,6 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "fatality", "futures 0.3.21", @@ -7257,7 +7239,6 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "clap 3.1.6", "frame-benchmarking-cli", @@ -7280,7 +7261,6 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7386,7 +7366,6 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "always-assert", "fatality", @@ -7407,7 +7386,6 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7420,7 +7398,6 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derive_more", "fatality", @@ -7443,7 +7420,6 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7457,7 +7433,6 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7477,7 +7452,6 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "futures 0.3.21", @@ -7496,7 +7470,6 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "parity-scale-codec", @@ -7514,7 +7487,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "derive_more", @@ -7542,7 +7514,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "futures 0.3.21", @@ -7562,7 +7533,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "futures 0.3.21", @@ -7580,7 +7550,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7595,7 +7564,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "futures 0.3.21", @@ -7613,7 +7581,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7628,7 +7595,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7645,7 +7611,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "fatality", "futures 0.3.21", @@ -7664,7 +7629,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "futures 0.3.21", @@ -7681,7 +7645,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "futures 0.3.21", @@ -7698,7 +7661,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "always-assert", "assert_matches", @@ -7728,7 +7690,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "polkadot-node-primitives", @@ -7744,7 +7705,6 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "memory-lru", @@ -7762,7 +7722,6 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-std", "lazy_static", @@ -7780,7 +7739,6 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bs58", "futures 0.3.21", @@ -7799,7 +7757,6 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "fatality", @@ -7817,7 +7774,6 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bounded-vec", "futures 0.3.21", @@ -7839,7 +7795,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7849,7 +7804,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "futures 0.3.21", @@ -7867,7 +7821,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derive_more", "futures 0.3.21", @@ -7886,7 +7839,6 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "derive_more", @@ -7919,7 +7871,6 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7940,7 +7891,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "futures 0.3.21", @@ -7957,7 +7907,6 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "expander 0.0.6", "proc-macro-crate 1.1.3", @@ -7969,7 +7918,6 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derive_more", "frame-support", @@ -7986,7 +7934,6 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "env_logger", "kusama-runtime", @@ -8001,7 +7948,6 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitvec", "frame-system", @@ -8031,7 +7977,6 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8062,7 +8007,6 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bitvec", @@ -8146,7 +8090,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bitvec", @@ -8193,7 +8136,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "polkadot-primitives", @@ -8205,7 +8147,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bs58", "parity-scale-codec", @@ -8217,7 +8158,6 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "bitflags", "bitvec", @@ -8259,7 +8199,6 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "async-trait", "beefy-gadget", @@ -8360,7 +8299,6 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8381,7 +8319,6 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8391,7 +8328,6 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8416,7 +8352,6 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bitvec", @@ -8478,7 +8413,6 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-benchmarking", "frame-system", @@ -9137,7 +9071,6 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bp-messages", @@ -9212,7 +9145,6 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "polkadot-primitives", @@ -10801,7 +10733,6 @@ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slot-range-helper" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "enumn", "parity-scale-codec", @@ -12054,7 +11985,6 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "test-runtime-constants" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "polkadot-primitives", @@ -13052,7 +12982,6 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "beefy-primitives", "bitvec", @@ -13138,7 +13067,6 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "polkadot-primitives", @@ -13358,23 +13286,23 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", + "sp-io", "xcm-procedural", ] [[package]] name = "xcm-builder" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", @@ -13391,7 +13319,6 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.18" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "frame-benchmarking", "frame-support", @@ -13409,7 +13336,6 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4" dependencies = [ "Inflector", "proc-macro2", @@ -13480,3 +13406,71 @@ dependencies = [ "cc", "libc", ] + +[[patch.unused]] +name = "polkadot" +version = "0.9.18" + +[[patch.unused]] +name = "polkadot-primitives-test-helpers" +version = "0.9.18" + +[[patch.unused]] +name = "polkadot-test-malus" +version = "0.9.18" + +[[patch.unused]] +name = "polkadot-voter-bags" +version = "0.9.18" + +[[patch.unused]] +name = "remote-ext-tests-bags-list" +version = "0.9.18" + +[[patch.unused]] +name = "staking-miner" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachain-adder" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachain-adder-collator" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachain-halt" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachain-undying" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachain-undying-collator" +version = "0.9.18" + +[[patch.unused]] +name = "test-parachains" +version = "0.9.18" + +[[patch.unused]] +name = "xcm-executor-integration-tests" +version = "0.9.18" + +[[patch.unused]] +name = "xcm-simulator" +version = "0.9.18" + +[[patch.unused]] +name = "xcm-simulator-example" +version = "0.9.18" + +[[patch.unused]] +name = "xcm-simulator-fuzzer" +version = "0.9.18" + +[[patch.unused]] +name = "zombienet-backchannel" +version = "0.9.18" diff --git a/polkadot-parachains/canvas-kusama/src/xcm_config.rs b/polkadot-parachains/canvas-kusama/src/xcm_config.rs index 33d563f165b..6249410b1a8 100644 --- a/polkadot-parachains/canvas-kusama/src/xcm_config.rs +++ b/polkadot-parachains/canvas-kusama/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{EnsureOneOf, Everything, Nothing}, + traits::{EnsureOneOf, Everything, Nothing, ConstU32}, weights::Weight, }; use frame_system::EnsureRoot; @@ -38,10 +38,10 @@ 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: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub const Local: MultiLocation = Here.into_location(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const ExecutiveBody: BodyId = BodyId::Executive; } @@ -144,6 +144,8 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = super::AllPalletsWithSystem; + type MaxAssetsIntoHolding = ConstU32<8>; type AssetLocker = (); type AssetExchanger = (); type FeeManager = (); diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index 52a7e845736..b0d6e6328fa 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -42,7 +42,7 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub const Local: MultiLocation = MultiLocation::here(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index 5785254b340..8d01605703d 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, PalletInfoAccess}, + traits::{Everything, PalletInfoAccess, ConstU32, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, + FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -39,10 +39,10 @@ use xcm_executor::{traits::JustTry, XcmExecutor}; parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); - pub RelayNetwork: NetworkId = NetworkId::Named(b"Westend".to_vec()); + pub RelayNetwork: NetworkId = NetworkId::Westend; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub const Local: MultiLocation = Here.into_location(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); From 3f9e25a759c0db4fc5facc3d81bb75fe8157c031 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 18:45:22 +0100 Subject: [PATCH 017/119] Formatting --- polkadot-parachains/canvas-kusama/src/xcm_config.rs | 2 +- polkadot-parachains/westmint/src/xcm_config.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/polkadot-parachains/canvas-kusama/src/xcm_config.rs b/polkadot-parachains/canvas-kusama/src/xcm_config.rs index 6249410b1a8..f3432a20766 100644 --- a/polkadot-parachains/canvas-kusama/src/xcm_config.rs +++ b/polkadot-parachains/canvas-kusama/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{EnsureOneOf, Everything, Nothing, ConstU32}, + traits::{ConstU32, EnsureOneOf, Everything, Nothing}, weights::Weight, }; use frame_system::EnsureRoot; diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index 8d01605703d..dd6bcc4965b 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, PalletInfoAccess, ConstU32, Nothing}, + traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, From 4b72261c15a207340735039f5af12b5005311d56 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 23:26:51 +0100 Subject: [PATCH 018/119] Bump --- Cargo.lock | 340 ++++++++++++++++++++++++++--------------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a49377747d..bb2fcf85072 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "beefy-primitives", "fnv", @@ -488,7 +488,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -511,12 +511,12 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -2768,7 +2768,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", ] @@ -2786,7 +2786,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -2808,7 +2808,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "Inflector", "chrono", @@ -2849,7 +2849,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -2864,7 +2864,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -2892,7 +2892,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "bitflags", "frame-metadata", @@ -2921,7 +2921,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2933,7 +2933,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2945,7 +2945,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro2", "quote", @@ -2955,7 +2955,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "log", @@ -2972,7 +2972,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -2987,7 +2987,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "sp-api", @@ -2996,7 +2996,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "sp-api", @@ -5583,7 +5583,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -5600,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5614,7 +5614,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -5630,7 +5630,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -5646,7 +5646,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -5661,7 +5661,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5685,7 +5685,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5705,7 +5705,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5720,7 +5720,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "beefy-primitives", "frame-support", @@ -5736,7 +5736,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5761,7 +5761,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5862,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5879,7 +5879,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "bitflags", "frame-benchmarking", @@ -5906,7 +5906,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "bitflags", "parity-scale-codec", @@ -5921,7 +5921,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro2", "quote", @@ -5931,7 +5931,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5950,7 +5950,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -5963,7 +5963,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -5979,7 +5979,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6002,7 +6002,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6020,7 +6020,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6035,7 +6035,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6058,7 +6058,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6074,7 +6074,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6094,7 +6094,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6111,7 +6111,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6128,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -6146,7 +6146,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6162,7 +6162,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6179,7 +6179,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6194,7 +6194,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6208,7 +6208,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6225,7 +6225,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6248,7 +6248,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6264,7 +6264,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6279,7 +6279,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6293,7 +6293,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6307,7 +6307,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6323,7 +6323,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6344,7 +6344,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6360,7 +6360,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6374,7 +6374,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6397,7 +6397,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6408,7 +6408,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "sp-arithmetic", @@ -6417,7 +6417,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6446,7 +6446,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6464,7 +6464,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6483,7 +6483,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-support", "frame-system", @@ -6500,7 +6500,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6517,7 +6517,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6528,7 +6528,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6545,7 +6545,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6560,7 +6560,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -6576,7 +6576,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-benchmarking", "frame-support", @@ -8954,7 +8954,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "env_logger", "jsonrpsee 0.8.0", @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "sp-core", @@ -9344,7 +9344,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -9371,7 +9371,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9394,7 +9394,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9410,7 +9410,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.3", @@ -9427,7 +9427,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9438,7 +9438,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "chrono", "clap 3.1.6", @@ -9476,7 +9476,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "fnv", "futures 0.3.21", @@ -9504,7 +9504,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "hash-db", "kvdb", @@ -9529,7 +9529,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -9553,7 +9553,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -9582,7 +9582,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "fork-tree", @@ -9625,7 +9625,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9649,7 +9649,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9662,7 +9662,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -9687,7 +9687,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "sc-client-api", "sp-authorship", @@ -9698,7 +9698,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "lazy_static", "lru 0.6.6", @@ -9725,7 +9725,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "environmental", "parity-scale-codec", @@ -9742,7 +9742,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "parity-scale-codec", @@ -9758,7 +9758,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9776,7 +9776,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ahash", "async-trait", @@ -9816,7 +9816,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "finality-grandpa", "futures 0.3.21", @@ -9840,7 +9840,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ansi_term", "futures 0.3.21", @@ -9857,7 +9857,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "hex", @@ -9872,7 +9872,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "asynchronous-codec 0.5.0", @@ -9921,7 +9921,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ahash", "futures 0.3.21", @@ -9938,7 +9938,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "bytes 1.1.0", "fnv", @@ -9966,7 +9966,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "libp2p", @@ -9979,7 +9979,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9988,7 +9988,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "hash-db", @@ -10019,7 +10019,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -10044,7 +10044,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -10061,7 +10061,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "directories", @@ -10125,7 +10125,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "parity-scale-codec", @@ -10139,7 +10139,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10160,7 +10160,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "chrono", "futures 0.3.21", @@ -10178,7 +10178,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ansi_term", "atty", @@ -10209,7 +10209,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10220,7 +10220,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "futures-timer", @@ -10247,7 +10247,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "log", @@ -10260,7 +10260,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "futures-timer", @@ -10820,7 +10820,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "hash-db", "log", @@ -10837,7 +10837,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "blake2 0.10.4", "proc-macro-crate 1.1.3", @@ -10849,7 +10849,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -10862,7 +10862,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "integer-sqrt", "num-traits", @@ -10877,7 +10877,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -10890,7 +10890,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "parity-scale-codec", @@ -10902,7 +10902,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "sp-api", @@ -10914,7 +10914,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "log", @@ -10932,7 +10932,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -10951,7 +10951,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "parity-scale-codec", @@ -10969,7 +10969,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "merlin", @@ -10992,7 +10992,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -11006,7 +11006,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -11018,7 +11018,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "base58", "bitflags", @@ -11064,7 +11064,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "blake2 0.10.4", "byteorder", @@ -11078,7 +11078,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro2", "quote", @@ -11089,7 +11089,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "kvdb", "parking_lot 0.12.0", @@ -11098,7 +11098,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro2", "quote", @@ -11108,7 +11108,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "environmental", "parity-scale-codec", @@ -11119,7 +11119,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "finality-grandpa", "log", @@ -11137,7 +11137,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11151,7 +11151,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "hash-db", @@ -11176,7 +11176,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "lazy_static", "sp-core", @@ -11187,7 +11187,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -11204,7 +11204,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "thiserror", "zstd", @@ -11213,7 +11213,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -11228,7 +11228,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -11239,7 +11239,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "sp-api", "sp-core", @@ -11249,7 +11249,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "backtrace", "lazy_static", @@ -11259,7 +11259,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "rustc-hash", "serde", @@ -11269,7 +11269,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "either", "hash256-std-hasher", @@ -11291,7 +11291,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11308,7 +11308,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -11320,7 +11320,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "parity-scale-codec", @@ -11334,7 +11334,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "serde", "serde_json", @@ -11343,7 +11343,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -11357,7 +11357,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "scale-info", @@ -11368,7 +11368,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "hash-db", "log", @@ -11391,12 +11391,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11409,7 +11409,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "log", "sp-core", @@ -11422,7 +11422,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures-timer", @@ -11438,7 +11438,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "sp-std", @@ -11450,7 +11450,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "sp-api", "sp-runtime", @@ -11459,7 +11459,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "log", @@ -11475,7 +11475,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "hash-db", "memory-db", @@ -11491,7 +11491,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11508,7 +11508,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11519,7 +11519,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "impl-trait-for-tuples", "log", @@ -11809,7 +11809,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "platforms", ] @@ -11817,7 +11817,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -11839,7 +11839,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures-util", "hyper", @@ -11852,7 +11852,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "async-trait", "futures 0.3.21", @@ -11878,7 +11878,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "futures 0.3.21", "substrate-test-utils-derive", @@ -11888,7 +11888,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -11899,7 +11899,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "ansi_term", "build-helper", @@ -12380,7 +12380,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f5f286db0da99761792b69bf4a997535dcc8f260" +source = "git+https://github.com/paritytech/substrate?branch=master#5cc2ef8e4c03b64691db367036fedd8f4d7f0326" dependencies = [ "clap 3.1.6", "jsonrpsee 0.4.1", From 865839a180e285fd93cb6ed82ac1312c93a3754e Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 23:28:15 +0100 Subject: [PATCH 019/119] Bump --- pallets/dmp-queue/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 2774be7f0d3..c25b56a84dd 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -437,7 +437,8 @@ mod tests { fn execute( _origin: impl Into, - message: Xcm, + _: Weightless, + message: &Xcm, _hash: XcmHash, weight_limit: Weight, ) -> Outcome { From 6462dd9e0da79f3fef593fd01163a3dbaa6e0375 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 23:38:23 +0100 Subject: [PATCH 020/119] Fixes --- pallets/dmp-queue/src/lib.rs | 17 ++--------------- pallets/xcmp-queue/src/mock.rs | 9 +++++++-- .../parachains-common/src/impls.rs | 4 ++-- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index c25b56a84dd..b1b12cf18d1 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -438,23 +438,10 @@ mod tests { fn execute( _origin: impl Into, _: Weightless, - message: &Xcm, _hash: XcmHash, - weight_limit: Weight, + _weight_limit: Weight, ) -> Outcome { - let o = match (message.0.len(), &message.0.first()) { - (1, Some(Transact { require_weight_at_most, .. })) => { - if *require_weight_at_most <= weight_limit { - Outcome::Complete(*require_weight_at_most) - } else { - Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most)) - } - }, - // use 1000 to decide that it's not supported. - _ => Outcome::Incomplete(1000.min(weight_limit), XcmError::Unimplemented), - }; - TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); - o + unreachable!() } fn charge_fees(_location: impl Into, _fees: MultiAssets) -> XcmResult { diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 18a099e5ab3..4b7fbc895b0 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -17,7 +17,7 @@ use super::*; use crate as xcmp_queue; use core::marker::PhantomData; use cumulus_primitives_core::{IsSystem, ParaId}; -use frame_support::{parameter_types, traits::OriginTrait}; +use frame_support::{parameter_types, traits::{OriginTrait, Nothing}}; use frame_system::EnsureRoot; use sp_core::H256; use sp_runtime::{ @@ -152,8 +152,13 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = (); type AssetClaims = (); type SubscriptionService = (); - type PalletInstancesInfo = AllPallets; + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; } pub type XcmRouter = ( diff --git a/polkadot-parachains/parachains-common/src/impls.rs b/polkadot-parachains/parachains-common/src/impls.rs index 2b66cd416d1..d511593c76f 100644 --- a/polkadot-parachains/parachains-common/src/impls.rs +++ b/polkadot-parachains/parachains-common/src/impls.rs @@ -269,9 +269,9 @@ mod tests { .clone() .pushed_with_interior(GeneralIndex(42)) .expect("multilocation will only have 2 junctions; qed"); - let asset = MultiAsset { id: Concrete(asset_location), fun: 1_000_000.into() }; + let asset = MultiAsset { id: Concrete(asset_location), fun: 1_000_000u128.into() }; assert!( - AssetsFrom::::filter_asset_location( + AssetsFrom::::contains( &asset, &SomeSiblingParachain::get() ), From b9cc2f232821a6a68312660bd43238edf9a276ca Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 11 Mar 2022 23:38:39 +0100 Subject: [PATCH 021/119] Formatting --- pallets/xcmp-queue/src/mock.rs | 5 ++++- polkadot-parachains/parachains-common/src/impls.rs | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 4b7fbc895b0..c285479521e 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -17,7 +17,10 @@ use super::*; use crate as xcmp_queue; use core::marker::PhantomData; use cumulus_primitives_core::{IsSystem, ParaId}; -use frame_support::{parameter_types, traits::{OriginTrait, Nothing}}; +use frame_support::{ + parameter_types, + traits::{Nothing, OriginTrait}, +}; use frame_system::EnsureRoot; use sp_core::H256; use sp_runtime::{ diff --git a/polkadot-parachains/parachains-common/src/impls.rs b/polkadot-parachains/parachains-common/src/impls.rs index d511593c76f..a9e1c8212ac 100644 --- a/polkadot-parachains/parachains-common/src/impls.rs +++ b/polkadot-parachains/parachains-common/src/impls.rs @@ -271,10 +271,7 @@ mod tests { .expect("multilocation will only have 2 junctions; qed"); let asset = MultiAsset { id: Concrete(asset_location), fun: 1_000_000u128.into() }; assert!( - AssetsFrom::::contains( - &asset, - &SomeSiblingParachain::get() - ), + AssetsFrom::::contains(&asset, &SomeSiblingParachain::get()), "AssetsFrom should allow assets from any of its interior locations" ); } From fb1d3f2a2be1d06c34440cf49a9f369f75483e11 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 11 Mar 2022 23:56:56 -0800 Subject: [PATCH 022/119] Make the price of UMP/XCMP message sending configurable --- pallets/xcmp-queue/src/lib.rs | 24 +++++++++++++++++++++++- primitives/utility/src/lib.rs | 30 +++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 112aaf378d7..31885c4fa93 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -99,6 +99,9 @@ pub mod pallet { /// superuser origin. type ControllerOriginConverter: ConvertOrigin; + /// The price for delivering an XCM to a sibling parachain destination. + type PriceForSiblingDelivery: PriceForSiblingDelivery; + /// The weight information of this pallet. type WeightInfo: WeightInfo; } @@ -1077,6 +1080,23 @@ impl XcmpMessageSource for Pallet { } } +pub trait PriceForSiblingDelivery { + fn price_for_sibling_delivery(id: ParaId, message: &Xcm<()>) -> MultiAssets; +} + +impl PriceForSiblingDelivery for () { + fn price_for_sibling_delivery(_: ParaId, _: &Xcm<()>) -> MultiAssets { + MultiAssets::new() + } +} + +pub struct ConstantPrice(sp_std::marker::PhantomData); +impl> PriceForSiblingDelivery for ConstantPrice { + fn price_for_sibling_delivery(_: ParaId, _: &Xcm<()>) -> MultiAssets { + T::get() + } +} + /// Xcm sender for sending to a sibling parachain. impl SendXcm for Pallet { type Ticket = (ParaId, VersionedXcm<()>); @@ -1091,9 +1111,11 @@ impl SendXcm for Pallet { match &d { // An HRMP message for a sibling parachain. MultiLocation { parents: 1, interior: X1(Parachain(id)) } => { + let id = ParaId::from(*id); + let price = T::PriceForSiblingDelivery::price_for_sibling_delivery(id, &xcm); let versioned_xcm = T::VersionWrapper::wrap_version(&d, xcm) .map_err(|()| SendError::DestinationUnsupported)?; - Ok((((*id).into(), versioned_xcm), MultiAssets::new())) + Ok(((id, versioned_xcm), price)) }, // Anything else is unhandled. This includes a message this is meant for us. _ => { diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index f99ebce9ec6..ac5b783eba2 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -21,9 +21,27 @@ use codec::Encode; use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; +use frame_support::traits::Get; use sp_std::{marker::PhantomData, prelude::*}; use xcm::{latest::prelude::*, WrapVersion}; +pub trait PriceForParentDelivery { + fn price_for_parent_delivery(message: &Xcm<()>) -> MultiAssets; +} + +impl PriceForParentDelivery for () { + fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets { + MultiAssets::new() + } +} + +pub struct ConstantPrice(PhantomData); +impl> PriceForParentDelivery for ConstantPrice { + fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets { + T::get() + } +} + /// Xcm router which recognises the `Parent` destination and handles it by sending the message into /// the given UMP `UpwardMessageSender` implementation. Thus this essentially adapts an /// `UpwardMessageSender` trait impl into a `SendXcm` trait impl. @@ -31,8 +49,13 @@ use xcm::{latest::prelude::*, WrapVersion}; /// NOTE: This is a pretty dumb "just send it" router; we will probably want to introduce queuing /// to UMP eventually and when we do, the pallet which implements the queuing will be responsible /// for the `SendXcm` implementation. -pub struct ParentAsUmp(PhantomData<(T, W)>); -impl SendXcm for ParentAsUmp { +pub struct ParentAsUmp(PhantomData<(T, W, P)>); +impl SendXcm for ParentAsUmp +where + T: UpwardMessageSender, + W: WrapVersion, + P: PriceForParentDelivery, +{ type Ticket = Vec; fn validate( @@ -44,11 +67,12 @@ impl SendXcm for ParentAsUmp { if d.contains_parents_only(1) { // An upward message for the relay chain. + let price = P::price_for_parent_delivery(&xcm); let versioned_xcm = W::wrap_version(&d, xcm).map_err(|()| SendError::DestinationUnsupported)?; let data = versioned_xcm.encode(); - Ok((data, MultiAssets::new())) + Ok((data, price)) } else { *dest = Some(d); // Anything else is unhandled. This includes a message this is meant for us. From c3ee8a1547937a3ed8274e76d9e3f2794253b679 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 12 Mar 2022 00:02:40 -0800 Subject: [PATCH 023/119] cargo fmt --- pallets/xcmp-queue/src/lib.rs | 4 ++-- primitives/utility/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 31885c4fa93..70cf75d796a 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -1086,14 +1086,14 @@ pub trait PriceForSiblingDelivery { impl PriceForSiblingDelivery for () { fn price_for_sibling_delivery(_: ParaId, _: &Xcm<()>) -> MultiAssets { - MultiAssets::new() + MultiAssets::new() } } pub struct ConstantPrice(sp_std::marker::PhantomData); impl> PriceForSiblingDelivery for ConstantPrice { fn price_for_sibling_delivery(_: ParaId, _: &Xcm<()>) -> MultiAssets { - T::get() + T::get() } } diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index ac5b783eba2..621506c146b 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -31,14 +31,14 @@ pub trait PriceForParentDelivery { impl PriceForParentDelivery for () { fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets { - MultiAssets::new() + MultiAssets::new() } } pub struct ConstantPrice(PhantomData); impl> PriceForParentDelivery for ConstantPrice { fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets { - T::get() + T::get() } } From ae1436ecd75ba1213f43162175fab3f90c1555da Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 12 Mar 2022 12:29:21 +0100 Subject: [PATCH 024/119] Remove InvertLocation --- .../src/validate_block/implementation.rs | 2 +- pallets/xcmp-queue/src/lib.rs | 2 +- pallets/xcmp-queue/src/mock.rs | 5 +++-- parachain-template/runtime/src/lib.rs | 1 + parachain-template/runtime/src/xcm_config.rs | 8 ++++---- polkadot-parachains/canvas-kusama/src/xcm_config.rs | 9 +++++---- polkadot-parachains/rococo-parachain/src/lib.rs | 9 +++++---- polkadot-parachains/shell/src/xcm_config.rs | 4 ++-- polkadot-parachains/statemine/src/lib.rs | 1 + polkadot-parachains/statemine/src/xcm_config.rs | 8 ++++---- polkadot-parachains/statemint/src/lib.rs | 3 ++- polkadot-parachains/statemint/src/xcm_config.rs | 8 ++++---- polkadot-parachains/westmint/src/lib.rs | 1 + polkadot-parachains/westmint/src/xcm_config.rs | 8 ++++---- 14 files changed, 38 insertions(+), 31 deletions(-) diff --git a/pallets/parachain-system/src/validate_block/implementation.rs b/pallets/parachain-system/src/validate_block/implementation.rs index 3dcbf291584..1ab841c1a7f 100644 --- a/pallets/parachain-system/src/validate_block/implementation.rs +++ b/pallets/parachain-system/src/validate_block/implementation.rs @@ -67,7 +67,7 @@ where assert!(parent_head.hash() == *block.header().parent_hash(), "Invalid parent hash",); // Create the db - let (db, root) = match storage_proof.to_memory_db(Some(parent_head.state_root())) { + let (db, _root) = match storage_proof.to_memory_db(Some(parent_head.state_root())) { Ok((db, root)) => (db, root), Err(_) => panic!("Compact proof decoding failure."), }; diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 70cf75d796a..a1ba81b6d73 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -44,7 +44,7 @@ use cumulus_primitives_core::{ ParaId, XcmpMessageFormat, XcmpMessageHandler, XcmpMessageSource, }; use frame_support::{ - traits::EnsureOrigin, + traits::{EnsureOrigin, Get}, weights::{constants::WEIGHT_PER_MILLIS, Weight}, }; use rand_chacha::{ diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index c285479521e..9641742d620 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -29,7 +29,7 @@ use sp_runtime::{ }; use xcm::prelude::*; use xcm_builder::{ - CurrencyAdapter, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, + CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, }; use xcm_executor::traits::ConvertOrigin; @@ -147,7 +147,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = (); type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = (); type Weigher = FixedWeightBounds; type Trader = (); @@ -200,6 +200,7 @@ impl Config for Test { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = SystemParachainAsSuperuser; type WeightInfo = (); + type PriceForSiblingDelivery = (); } pub fn new_test_ext() -> sp_io::TestExternalities { diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index b3d3d59715b..fab19fe7bb9 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/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/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index fc394a05d44..88635089ee3 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -13,7 +13,7 @@ use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -104,7 +104,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = (); // Teleporting is disabled. - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -129,7 +129,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -146,7 +146,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; diff --git a/polkadot-parachains/canvas-kusama/src/xcm_config.rs b/polkadot-parachains/canvas-kusama/src/xcm_config.rs index f3432a20766..7f71577916b 100644 --- a/polkadot-parachains/canvas-kusama/src/xcm_config.rs +++ b/polkadot-parachains/canvas-kusama/src/xcm_config.rs @@ -29,7 +29,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, + FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -136,7 +136,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; @@ -161,7 +161,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -179,7 +179,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; @@ -208,6 +208,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/polkadot-parachains/rococo-parachain/src/lib.rs b/polkadot-parachains/rococo-parachain/src/lib.rs index 41b22f6d38c..47d0588e6eb 100644 --- a/polkadot-parachains/rococo-parachain/src/lib.rs +++ b/polkadot-parachains/rococo-parachain/src/lib.rs @@ -73,7 +73,7 @@ use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -404,7 +404,7 @@ impl Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = Reserves; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of ROC - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = UsingComponents, RocLocation, AccountId, Balances, ()>; @@ -428,7 +428,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -443,7 +443,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; @@ -469,6 +469,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureRoot; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { diff --git a/polkadot-parachains/shell/src/xcm_config.rs b/polkadot-parachains/shell/src/xcm_config.rs index 0d491043af1..3025651c323 100644 --- a/polkadot-parachains/shell/src/xcm_config.rs +++ b/polkadot-parachains/shell/src/xcm_config.rs @@ -17,7 +17,7 @@ use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime}; use frame_support::{match_types, parameter_types, traits::Nothing, weights::Weight}; use xcm::latest::prelude::*; use xcm_builder::{ - AllowUnpaidExecutionFrom, FixedWeightBounds, LocationInverter, ParentAsSuperuser, + AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; @@ -59,7 +59,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = (); // balances not supported type IsTeleporter = (); // balances not supported - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = AllowUnpaidExecutionFrom; type Weigher = FixedWeightBounds; // balances not supported type Trader = (); // balances not supported diff --git a/polkadot-parachains/statemine/src/lib.rs b/polkadot-parachains/statemine/src/lib.rs index 6b363703fea..e0ac1d51824 100644 --- a/polkadot-parachains/statemine/src/lib.rs +++ b/polkadot-parachains/statemine/src/lib.rs @@ -430,6 +430,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { EnsureOneOf, EnsureXcm>>; type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { diff --git a/polkadot-parachains/statemine/src/xcm_config.rs b/polkadot-parachains/statemine/src/xcm_config.rs index a1f19a919cb..8a61fc87c3e 100644 --- a/polkadot-parachains/statemine/src/xcm_config.rs +++ b/polkadot-parachains/statemine/src/xcm_config.rs @@ -30,7 +30,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -159,7 +159,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of KSM - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -185,7 +185,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -203,7 +203,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; diff --git a/polkadot-parachains/statemint/src/lib.rs b/polkadot-parachains/statemint/src/lib.rs index 70d9e8cd4cd..ed7c455e748 100644 --- a/polkadot-parachains/statemint/src/lib.rs +++ b/polkadot-parachains/statemint/src/lib.rs @@ -434,6 +434,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 Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; @@ -442,7 +443,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ControllerOrigin = EnsureOneOf, EnsureXcm>>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; - type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type PriceForSiblingDelivery = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index b0d6e6328fa..6e2261b96ca 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -30,7 +30,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -159,7 +159,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of DOT - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -185,7 +185,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -203,7 +203,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Nothing; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; diff --git a/polkadot-parachains/westmint/src/lib.rs b/polkadot-parachains/westmint/src/lib.rs index ca299cb082e..93a5deb6abb 100644 --- a/polkadot-parachains/westmint/src/lib.rs +++ b/polkadot-parachains/westmint/src/lib.rs @@ -424,6 +424,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 { diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index dd6bcc4965b..28b4ec72d34 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -30,7 +30,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsPreset, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -155,7 +155,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; type IsTeleporter = NativeAsset; // <- should be enough to allow teleportation of WND - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -180,7 +180,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -195,7 +195,7 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; From d42833b4b9b77b0f3370e2367fa7c69faf52f0d2 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 12 Mar 2022 12:32:37 +0100 Subject: [PATCH 025/119] Formatting --- pallets/xcmp-queue/src/mock.rs | 4 +--- polkadot-parachains/canvas-kusama/src/xcm_config.rs | 4 ++-- polkadot-parachains/rococo-parachain/src/lib.rs | 8 ++++---- polkadot-parachains/shell/src/xcm_config.rs | 4 ++-- polkadot-parachains/statemine/src/xcm_config.rs | 7 +++---- polkadot-parachains/statemint/src/xcm_config.rs | 7 +++---- polkadot-parachains/westmint/src/xcm_config.rs | 7 +++---- 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 9641742d620..f0a191649a5 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -28,9 +28,7 @@ use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, }; use xcm::prelude::*; -use xcm_builder::{ - CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, -}; +use xcm_builder::{CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset}; use xcm_executor::traits::ConvertOrigin; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; diff --git a/polkadot-parachains/canvas-kusama/src/xcm_config.rs b/polkadot-parachains/canvas-kusama/src/xcm_config.rs index 7f71577916b..0f4af7594d4 100644 --- a/polkadot-parachains/canvas-kusama/src/xcm_config.rs +++ b/polkadot-parachains/canvas-kusama/src/xcm_config.rs @@ -29,8 +29,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; diff --git a/polkadot-parachains/rococo-parachain/src/lib.rs b/polkadot-parachains/rococo-parachain/src/lib.rs index 47d0588e6eb..63ededdcdc1 100644 --- a/polkadot-parachains/rococo-parachain/src/lib.rs +++ b/polkadot-parachains/rococo-parachain/src/lib.rs @@ -73,10 +73,10 @@ use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, }; use xcm_executor::{Config, XcmExecutor}; diff --git a/polkadot-parachains/shell/src/xcm_config.rs b/polkadot-parachains/shell/src/xcm_config.rs index 3025651c323..370d6f9d8bb 100644 --- a/polkadot-parachains/shell/src/xcm_config.rs +++ b/polkadot-parachains/shell/src/xcm_config.rs @@ -17,8 +17,8 @@ use super::{AccountId, Call, Event, Origin, ParachainInfo, Runtime}; use frame_support::{match_types, parameter_types, traits::Nothing, weights::Weight}; use xcm::latest::prelude::*; use xcm_builder::{ - AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, - ParentIsPreset, SovereignSignedViaLocation, + AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, + SovereignSignedViaLocation, }; parameter_types! { diff --git a/polkadot-parachains/statemine/src/xcm_config.rs b/polkadot-parachains/statemine/src/xcm_config.rs index 8a61fc87c3e..601159de87d 100644 --- a/polkadot-parachains/statemine/src/xcm_config.rs +++ b/polkadot-parachains/statemine/src/xcm_config.rs @@ -30,10 +30,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::JustTry, XcmExecutor}; diff --git a/polkadot-parachains/statemint/src/xcm_config.rs b/polkadot-parachains/statemint/src/xcm_config.rs index 6e2261b96ca..fe80356967a 100644 --- a/polkadot-parachains/statemint/src/xcm_config.rs +++ b/polkadot-parachains/statemint/src/xcm_config.rs @@ -30,10 +30,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::JustTry, XcmExecutor}; diff --git a/polkadot-parachains/westmint/src/xcm_config.rs b/polkadot-parachains/westmint/src/xcm_config.rs index 28b4ec72d34..24eb59403c0 100644 --- a/polkadot-parachains/westmint/src/xcm_config.rs +++ b/polkadot-parachains/westmint/src/xcm_config.rs @@ -30,10 +30,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::JustTry, XcmExecutor}; From 780475dc70bf9783ff2362ff330768f4adb303f5 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 14 Mar 2022 09:09:02 -0700 Subject: [PATCH 026/119] Use ConstantPrice from polkadot-runtime-common --- Cargo.lock | 155 ++++++++++++++++++---------------- pallets/xcmp-queue/Cargo.toml | 2 + pallets/xcmp-queue/src/lib.rs | 2 +- primitives/utility/Cargo.toml | 2 + primitives/utility/src/lib.rs | 2 +- 5 files changed, 88 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb2fcf85072..20a38c28572 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -732,6 +732,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "finality-grandpa", "frame-support", @@ -747,6 +748,7 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-runtime", "frame-support", @@ -758,6 +760,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "bp-runtime", @@ -773,6 +776,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-messages", "bp-runtime", @@ -790,6 +794,7 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -806,6 +811,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "hash-db", @@ -823,6 +829,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -837,6 +844,7 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -851,6 +859,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -1923,6 +1932,7 @@ dependencies = [ "log", "pallet-balances", "parity-scale-codec", + "polkadot-runtime-common", "rand_chacha 0.3.1", "scale-info", "sp-core", @@ -2014,6 +2024,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain", "polkadot-primitives", + "polkadot-runtime-common", "sp-io", "sp-runtime", "sp-std", @@ -4173,6 +4184,7 @@ dependencies = [ [[package]] name = "kusama-runtime" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bitvec", @@ -4260,6 +4272,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "polkadot-primitives", @@ -5123,6 +5136,7 @@ dependencies = [ [[package]] name = "metered-channel" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derive_more", "futures 0.3.21", @@ -5779,6 +5793,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5795,6 +5810,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5816,6 +5832,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "bp-message-dispatch", @@ -6591,16 +6608,15 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-io", "sp-runtime", "sp-std", "xcm", @@ -6610,6 +6626,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-benchmarking", "frame-support", @@ -6617,7 +6634,6 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io", "sp-runtime", "sp-std", "xcm", @@ -7172,6 +7188,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7185,6 +7202,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7197,6 +7215,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derive_more", "fatality", @@ -7219,6 +7238,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "fatality", "futures 0.3.21", @@ -7239,6 +7259,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "clap 3.1.6", "frame-benchmarking-cli", @@ -7261,6 +7282,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7366,6 +7388,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "always-assert", "fatality", @@ -7386,6 +7409,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7398,6 +7422,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derive_more", "fatality", @@ -7420,6 +7445,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7433,6 +7459,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7452,6 +7479,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "futures 0.3.21", @@ -7470,6 +7498,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "parity-scale-codec", @@ -7487,6 +7516,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "derive_more", @@ -7514,6 +7544,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "futures 0.3.21", @@ -7533,6 +7564,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "futures 0.3.21", @@ -7550,6 +7582,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7564,6 +7597,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "futures 0.3.21", @@ -7581,6 +7615,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7595,6 +7630,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7611,6 +7647,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "fatality", "futures 0.3.21", @@ -7629,6 +7666,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "futures 0.3.21", @@ -7645,6 +7683,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "futures 0.3.21", @@ -7661,6 +7700,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "always-assert", "assert_matches", @@ -7690,6 +7730,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "polkadot-node-primitives", @@ -7705,6 +7746,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "memory-lru", @@ -7722,6 +7764,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-std", "lazy_static", @@ -7739,6 +7782,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bs58", "futures 0.3.21", @@ -7757,6 +7801,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "fatality", @@ -7774,6 +7819,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bounded-vec", "futures 0.3.21", @@ -7795,6 +7841,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7804,6 +7851,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "futures 0.3.21", @@ -7821,6 +7869,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derive_more", "futures 0.3.21", @@ -7839,6 +7888,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "derive_more", @@ -7871,6 +7921,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7891,6 +7942,7 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "futures 0.3.21", @@ -7907,6 +7959,7 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "expander 0.0.6", "proc-macro-crate 1.1.3", @@ -7918,6 +7971,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derive_more", "frame-support", @@ -7934,6 +7988,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "env_logger", "kusama-runtime", @@ -7948,6 +8003,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitvec", "frame-system", @@ -7977,6 +8033,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8007,6 +8064,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bitvec", @@ -8090,6 +8148,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bitvec", @@ -8136,6 +8195,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "polkadot-primitives", @@ -8147,6 +8207,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bs58", "parity-scale-codec", @@ -8158,6 +8219,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "bitflags", "bitvec", @@ -8199,6 +8261,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "async-trait", "beefy-gadget", @@ -8299,6 +8362,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8319,6 +8383,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8328,6 +8393,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8352,6 +8418,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bitvec", @@ -8413,6 +8480,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-benchmarking", "frame-system", @@ -8428,6 +8496,7 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "polkadot-rpc", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-service", "polkadot-test-runtime", @@ -9071,6 +9140,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bp-messages", @@ -9145,6 +9215,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "polkadot-primitives", @@ -10733,6 +10804,7 @@ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slot-range-helper" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "enumn", "parity-scale-codec", @@ -11985,6 +12057,7 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "test-runtime-constants" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "polkadot-primitives", @@ -12982,6 +13055,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "beefy-primitives", "bitvec", @@ -13067,6 +13141,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "polkadot-primitives", @@ -13286,23 +13361,23 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "derivative", "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", - "sp-io", "xcm-procedural", ] [[package]] name = "xcm-builder" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", @@ -13319,6 +13394,7 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "frame-benchmarking", "frame-support", @@ -13336,6 +13412,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot?branch=master#5c3067e9d58487e866fc8e4ad594fd22e9132c93" dependencies = [ "Inflector", "proc-macro2", @@ -13406,71 +13483,3 @@ dependencies = [ "cc", "libc", ] - -[[patch.unused]] -name = "polkadot" -version = "0.9.18" - -[[patch.unused]] -name = "polkadot-primitives-test-helpers" -version = "0.9.18" - -[[patch.unused]] -name = "polkadot-test-malus" -version = "0.9.18" - -[[patch.unused]] -name = "polkadot-voter-bags" -version = "0.9.18" - -[[patch.unused]] -name = "remote-ext-tests-bags-list" -version = "0.9.18" - -[[patch.unused]] -name = "staking-miner" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachain-adder" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachain-adder-collator" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachain-halt" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachain-undying" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachain-undying-collator" -version = "0.9.18" - -[[patch.unused]] -name = "test-parachains" -version = "0.9.18" - -[[patch.unused]] -name = "xcm-executor-integration-tests" -version = "0.9.18" - -[[patch.unused]] -name = "xcm-simulator" -version = "0.9.18" - -[[patch.unused]] -name = "xcm-simulator-example" -version = "0.9.18" - -[[patch.unused]] -name = "xcm-simulator-fuzzer" -version = "0.9.18" - -[[patch.unused]] -name = "zombienet-backchannel" -version = "0.9.18" diff --git a/pallets/xcmp-queue/Cargo.toml b/pallets/xcmp-queue/Cargo.toml index d457e322bd4..f3d871e1b1d 100644 --- a/pallets/xcmp-queue/Cargo.toml +++ b/pallets/xcmp-queue/Cargo.toml @@ -18,6 +18,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", default-features sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } # Polkadot +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -48,6 +49,7 @@ std = [ "frame-support/std", "frame-system/std", "log/std", + "polkadot-runtime-common/std", "sp-io/std", "sp-runtime/std", "sp-std/std", diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index a1ba81b6d73..f7e52a67567 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -47,6 +47,7 @@ use frame_support::{ traits::{EnsureOrigin, Get}, weights::{constants::WEIGHT_PER_MILLIS, Weight}, }; +use polkadot_runtime_common::xcm_sender::ConstantPrice; use rand_chacha::{ rand_core::{RngCore, SeedableRng}, ChaChaRng, @@ -1090,7 +1091,6 @@ impl PriceForSiblingDelivery for () { } } -pub struct ConstantPrice(sp_std::marker::PhantomData); impl> PriceForSiblingDelivery for ConstantPrice { fn price_for_sibling_delivery(_: ParaId, _: &Xcm<()>) -> MultiAssets { T::get() diff --git a/primitives/utility/Cargo.toml b/primitives/utility/Cargo.toml index 2cdb62f45c2..334e7294617 100644 --- a/primitives/utility/Cargo.toml +++ b/primitives/utility/Cargo.toml @@ -16,6 +16,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", default-features = # Polkadot polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -32,6 +33,7 @@ std = [ "sp-std/std", "sp-trie/std", "polkadot-core-primitives/std", + "polkadot-runtime-common/std", "polkadot-parachain/std", "polkadot-primitives/std", "cumulus-primitives-core/std", diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 621506c146b..525b94c0b09 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -22,6 +22,7 @@ use codec::Encode; use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; use frame_support::traits::Get; +use polkadot_runtime_common::xcm_sender::ConstantPrice; use sp_std::{marker::PhantomData, prelude::*}; use xcm::{latest::prelude::*, WrapVersion}; @@ -35,7 +36,6 @@ impl PriceForParentDelivery for () { } } -pub struct ConstantPrice(PhantomData); impl> PriceForParentDelivery for ConstantPrice { fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets { T::get() From 667273a7be384d3cbcf6d57ea642be27647eef9c Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 14 Aug 2022 09:50:01 +0800 Subject: [PATCH 027/119] Fix naming --- pallets/dmp-queue/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 608bc3bfebf..a50b3df1cfc 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -239,7 +239,7 @@ pub mod pallet { Ok(0) }, Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, message_id, limit); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => Err((message_id, required)), From 0e6fd2dcc773455ec680f7ad84ac503085f0dafb Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 14 Aug 2022 09:52:40 +0800 Subject: [PATCH 028/119] cargo fmt --- parachains/pallets/ping/src/lib.rs | 8 +++++++- primitives/utility/src/lib.rs | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/parachains/pallets/ping/src/lib.rs b/parachains/pallets/ping/src/lib.rs index 518a9e43ecb..f6e85a7bb89 100644 --- a/parachains/pallets/ping/src/lib.rs +++ b/parachains/pallets/ping/src/lib.rs @@ -118,7 +118,13 @@ pub mod pallet { ) { Ok((hash, cost)) => { Pings::::insert(seq, n); - Self::deposit_event(Event::PingSent(para, seq, payload.to_vec(), hash, cost)); + Self::deposit_event(Event::PingSent( + para, + seq, + payload.to_vec(), + hash, + cost, + )); }, Err(e) => { Self::deposit_event(Event::ErrorSendingPing( diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index f4aa8b7546f..6e2362667ea 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -22,7 +22,10 @@ use codec::Encode; use cumulus_primitives_core::{MessageSendError, UpwardMessageSender}; use frame_support::{ - traits::{Get, tokens::{fungibles, fungibles::Inspect}}, + traits::{ + tokens::{fungibles, fungibles::Inspect}, + Get, + }, weights::Weight, }; use polkadot_runtime_common::xcm_sender::ConstantPrice; From 620c42cd0c1e261f6e7c411adcddc32d863ffe3b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 14 Aug 2022 10:11:01 +0800 Subject: [PATCH 029/119] Fixes --- primitives/utility/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 6e2362667ea..38d08381723 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -291,7 +291,7 @@ impl< if let Some(receiver) = ReceiverAccount::get() { let ok = FungiblesMutateAdapter::deposit_asset( &revenue, - &(X1(AccountId32 { network: Any, id: receiver.into() }).into()), + &(X1(AccountId32 { network: None, id: receiver.into() }).into()), ) .is_ok(); From 4e53da1c7226b44d209933179c9cd4a36061806f Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 24 Aug 2022 22:30:41 +0800 Subject: [PATCH 030/119] Fixes --- primitives/utility/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 38d08381723..2c19674bc77 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -292,6 +292,9 @@ impl< let ok = FungiblesMutateAdapter::deposit_asset( &revenue, &(X1(AccountId32 { network: None, id: receiver.into() }).into()), + // We aren't able to track the XCM that initiated the fee deposit, so we create a + // fake message hash here + &XcmContext::with_message_hash([0; 32]), ) .is_ok(); From 9ee4759fcf4bdae2d6dbeef6bb4b8cd29a9f3dbf Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 24 Aug 2022 22:42:49 +0800 Subject: [PATCH 031/119] Fixes --- parachains/common/src/xcm_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index d56876d60ca..c0a71718bb4 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -23,7 +23,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -37,7 +37,7 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { From 187c47a6828ca674b46b913e4e60279853af6a2f Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 24 Aug 2022 22:45:57 +0800 Subject: [PATCH 032/119] Add CallDispatcher --- parachain-template/runtime/src/xcm_config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 48b1e9ce708..007c1d55acf 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -188,6 +188,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. From bd3ce91d85338e694a490131ccf3773fd2362f5b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 24 Aug 2022 23:03:03 +0800 Subject: [PATCH 033/119] Fixes --- parachain-template/runtime/src/xcm_config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 007c1d55acf..ccbb6eb99d5 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -104,7 +104,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -118,11 +118,11 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.0.iter().any(|inst| { + if message.iter().any(|inst| { matches!( inst, InitiateReserveWithdraw { @@ -141,7 +141,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { // An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve` // should not allow this, but we just log it here. if matches!(origin, MultiLocation { parents: 1, interior: Here }) && - message.0.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) + message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) { log::warn!( target: "xcm::barriers", From ad1cbecabd70495aa2891785aba843cdf8907026 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 24 Aug 2022 23:15:56 +0800 Subject: [PATCH 034/119] Fixes --- parachains/common/src/xcm_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index c0a71718bb4..bfcaa9d49e8 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -41,7 +41,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.0.iter().any(|inst| { + if message.iter().any(|inst| { matches!( inst, InitiateReserveWithdraw { @@ -60,7 +60,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { // An unexpected reserve transfer has arrived from the Relay Chain. Generally, `IsReserve` // should not allow this, but we just log it here. if matches!(origin, MultiLocation { parents: 1, interior: Here }) && - message.0.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) + message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) { log::warn!( target: "xcm::barrier", From 5a34514967e0d9b6f82d75d8634f9d51f6f7aaaf Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 00:17:33 +0800 Subject: [PATCH 035/119] Fixes --- .../assets/statemine/src/xcm_config.rs | 1 + .../assets/statemint/src/xcm_config.rs | 1 + .../assets/westmint/src/xcm_config.rs | 1 + .../collectives-polkadot/src/xcm_config.rs | 26 ++++++++++---- .../contracts-rococo/src/xcm_config.rs | 1 + .../runtimes/starters/shell/src/xcm_config.rs | 1 + .../runtimes/testing/penpal/src/xcm_config.rs | 35 +++++++++++++------ 7 files changed, 49 insertions(+), 17 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 03aca7ded13..2b5598fce16 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -208,6 +208,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 5d34e56b43b..ce6fd6c29b2 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -184,6 +184,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 01d2c33ab79..c94feb50d75 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -204,6 +204,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 78f5b224f8d..1d927fd3f57 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Everything, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -43,8 +43,8 @@ parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into(); + pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); + pub const Local: MultiLocation = Here.into_location(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } @@ -102,6 +102,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_types! { @@ -141,7 +142,7 @@ impl xcm_executor::Config for XcmConfig { // 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 = FixedWeightBounds; type Trader = @@ -150,6 +151,14 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Converts a local signed origin into an XCM multilocation. @@ -160,7 +169,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -178,11 +187,16 @@ 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 Origin = Origin; type Call = Call; 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>; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 8252800ac60..8b30214daf8 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -157,6 +157,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index 370d6f9d8bb..af846f7181f 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -74,6 +74,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 3fb2192cd7a..36ce4954838 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -30,7 +30,7 @@ use frame_support::{ log, match_types, parameter_types, traits::{ fungibles::{self, Balanced, CreditOf}, - Contains, Everything, Get, Nothing, + ConstU32, Contains, Everything, Get, Nothing, }, weights::Weight, }; @@ -43,11 +43,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, - FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + ConvertedAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{ traits::{FilterAssetLocation, JustTry, ShouldExecute}, @@ -58,7 +57,7 @@ parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Any; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); - pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); + pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -92,7 +91,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< + ConvertedAssetId< AssetIdPalletAssets, Balance, AsPrefixedGeneralIndex, @@ -137,6 +136,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_types! { @@ -328,7 +328,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = MultiNativeAsset; // TODO: maybe needed to be replaced by Reserves type IsTeleporter = NativeAsset; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; type Trader = @@ -337,6 +337,14 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type AssetLocker = (); + type AssetExchanger = (); + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -346,7 +354,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -363,13 +371,18 @@ impl pallet_xcm::Config for Runtime { type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; - type LocationInverter = LocationInverter; + type UniversalLocation = UniversalLocation; type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; + type Currency = Balances; + type CurrencyMatcher = (); + type TrustedLockers = (); + type SovereignAccountOf = LocationToAccountId; + type MaxLockers = ConstU32<8>; } impl cumulus_pallet_xcm::Config for Runtime { From 67c99fdc4bf49df8e9e24f932eb239bdcbb26dc0 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 00:36:04 +0800 Subject: [PATCH 036/119] Fixes --- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 4b00ff86c41..94948ddc5cb 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -79,7 +79,7 @@ use xcm_builder::{ SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; -use xcm_executor::{Config, XcmExecutor}; +use xcm_executor::XcmExecutor; pub type SessionHandlers = (); @@ -399,7 +399,7 @@ parameter_types! { pub type Reserves = (NativeAsset, AssetsFrom); pub struct XcmConfig; -impl Config for XcmConfig { +impl xcm_executor::Config for XcmConfig { type Call = Call; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. @@ -422,6 +422,7 @@ impl Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. From 1fc2cb4bd2dcf7adc0ad8d973742a143d6580805 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 00:49:38 +0800 Subject: [PATCH 037/119] Fixes --- .../collectives/collectives-polkadot/src/xcm_config.rs | 4 ++-- parachains/runtimes/testing/penpal/src/xcm_config.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 1d927fd3f57..fd6a29476fd 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -32,8 +32,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 36ce4954838..97b53a9b72f 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -44,9 +44,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{ traits::{FilterAssetLocation, JustTry, ShouldExecute}, From 0f3f8b8623150ebf6b9410d6b05363dc2277acd8 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 01:01:51 +0800 Subject: [PATCH 038/119] Fixes --- .../runtimes/collectives/collectives-polkadot/src/impls.rs | 2 +- parachains/runtimes/collectives/collectives-polkadot/src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs b/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs index 4f821802172..da901ae0c33 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs @@ -65,7 +65,7 @@ where ::Origin::signed(temp_account.into()), Box::new(Parent.into()), Box::new( - Junction::AccountId32 { network: NetworkId::Any, id: treasury_acc.into() } + Junction::AccountId32 { network: None, id: treasury_acc.into() } .into() .into(), ), diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index cd947446e26..07a5239872d 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -367,6 +367,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 { From 57e44204d591c227dccdd8366d08cf12e680165e Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 01:16:01 +0800 Subject: [PATCH 039/119] Fixes --- .../runtimes/collectives/collectives-polkadot/src/impls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs b/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs index da901ae0c33..34656f46e1a 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs @@ -21,7 +21,7 @@ use frame_support::{ }; use pallet_alliance::{ProposalIndex, ProposalProvider}; use sp_std::{boxed::Box, marker::PhantomData}; -use xcm::latest::{Fungibility, Junction, NetworkId, Parent}; +use xcm::latest::{Fungibility, Junction, Parent}; type AccountIdOf = ::AccountId; @@ -66,7 +66,7 @@ where Box::new(Parent.into()), Box::new( Junction::AccountId32 { network: None, id: treasury_acc.into() } - .into() + .into_location() .into(), ), Box::new((Parent, imbalance).into()), From d1230e3d77f8696a1928792bf7412380e5a982a8 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 01:39:43 +0800 Subject: [PATCH 040/119] Fixes --- parachains/runtimes/assets/westmint/src/xcm_config.rs | 2 +- parachains/runtimes/testing/penpal/src/xcm_config.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index c94feb50d75..3d5f6f9b804 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -179,7 +179,7 @@ impl xcm_executor::Config for XcmConfig { WeightToFee, pallet_assets::BalanceToAssetBalance, >, - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 97b53a9b72f..314faf38a64 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -43,7 +43,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedAssetId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -91,7 +91,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: - ConvertedAssetId< + ConvertedConcreteId< AssetIdPalletAssets, Balance, AsPrefixedGeneralIndex, From 3ba852b3bfb2f45c6b3d63f5215582b66f4412d7 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 02:11:44 +0800 Subject: [PATCH 041/119] Fixes --- parachains/runtimes/assets/statemine/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 2b5598fce16..f79eca94b3a 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -183,7 +183,7 @@ impl xcm_executor::Config for XcmConfig { WeightToFee, pallet_assets::BalanceToAssetBalance, >, - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, From 31accbd975a6f858e633bec03cd441b7042cf8ed Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 16:38:08 +0800 Subject: [PATCH 042/119] Fixes --- .../runtimes/testing/penpal/src/xcm_config.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 314faf38a64..c2ea08a8d3d 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -30,7 +30,7 @@ use frame_support::{ log, match_types, parameter_types, traits::{ fungibles::{self, Balanced, CreditOf}, - ConstU32, Contains, Everything, Get, Nothing, + ConstU32, Contains, ContainsPair, Everything, Get, Nothing, }, weights::Weight, }; @@ -49,7 +49,7 @@ use xcm_builder::{ SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{ - traits::{FilterAssetLocation, JustTry, ShouldExecute}, + traits::{JustTry, ShouldExecute}, XcmExecutor, }; @@ -164,7 +164,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -178,11 +178,11 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut [Instruction], _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - if message.0.iter().any(|inst| { + if message.iter().any(|inst| { matches!( inst, InitiateReserveWithdraw { @@ -200,7 +200,7 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { // allow reserve transfers to arrive from relay chain if matches!(origin, MultiLocation { parents: 1, interior: Here }) && - message.0.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) + message.iter().any(|inst| matches!(inst, ReserveAssetDeposited { .. })) { log::warn!( target: "xcm::barriers", @@ -233,8 +233,8 @@ pub type AccountIdOf = ::AccountId; /// Asset filter that allows all assets from a certain location. pub struct AssetsFrom(PhantomData); -impl> FilterAssetLocation for AssetsFrom { - fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { +impl> ContainsPair for AssetsFrom { + fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { let loc = T::get(); &loc == origin && matches!(asset, MultiAsset { id: AssetId::Concrete(asset_loc), fun: Fungible(_a) } @@ -297,7 +297,7 @@ impl Reserve for MultiAsset { /// A `FilterAssetLocation` implementation. Filters multi native assets whose /// reserve is same with `origin`. pub struct MultiNativeAsset; -impl FilterAssetLocation for MultiNativeAsset { +impl ContainsPair for MultiNativeAsset { fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { if let Some(ref reserve) = asset.reserve() { if reserve == origin { From 004f0449f46664619095e8b5303dfeea95d72235 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 16:57:51 +0800 Subject: [PATCH 043/119] Fixes --- parachains/runtimes/testing/penpal/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index c2ea08a8d3d..c2ea98591b8 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -298,7 +298,7 @@ impl Reserve for MultiAsset { /// reserve is same with `origin`. pub struct MultiNativeAsset; impl ContainsPair for MultiNativeAsset { - fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { + fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { if let Some(ref reserve) = asset.reserve() { if reserve == origin { return true From bee34ba3f96139a07d2147946ed241351a80017c Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 18:13:24 +0800 Subject: [PATCH 044/119] Fixes --- parachains/runtimes/testing/penpal/src/xcm_config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index c2ea98591b8..25d72572012 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -55,7 +55,7 @@ use xcm_executor::{ parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: NetworkId = NetworkId::Any; + pub const RelayNetwork: Option = None; pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); } @@ -388,4 +388,5 @@ impl pallet_xcm::Config for Runtime { impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; + type PriceForSiblingDelivery = (); } From 5c54d38b428f02e9137924bdf32efd155810dfec Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 18:50:29 +0800 Subject: [PATCH 045/119] Fixes --- parachains/runtimes/testing/penpal/src/lib.rs | 1 + parachains/runtimes/testing/penpal/src/xcm_config.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/runtimes/testing/penpal/src/lib.rs b/parachains/runtimes/testing/penpal/src/lib.rs index f0f2cb2a767..4842cc6a75c 100644 --- a/parachains/runtimes/testing/penpal/src/lib.rs +++ b/parachains/runtimes/testing/penpal/src/lib.rs @@ -435,6 +435,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/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 25d72572012..31b5cc7848f 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -388,5 +388,4 @@ impl pallet_xcm::Config for Runtime { impl cumulus_pallet_xcm::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; - type PriceForSiblingDelivery = (); } From 516669814078a308e8de659979aa0f97e8d67eff Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 25 Aug 2022 21:18:07 +0800 Subject: [PATCH 046/119] Fixes --- pallets/xcmp-queue/src/mock.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 62d56bfbfb8..bd30f52fb27 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -162,6 +162,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; + type CallDispatcher = Call; } pub type XcmRouter = ( From 1dba83a9031c22994795971fac9b1a8638c9efb5 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 22 Sep 2022 22:26:02 +0800 Subject: [PATCH 047/119] Fixes --- parachain-template/runtime/src/xcm_config.rs | 4 ++-- parachains/common/src/xcm_config.rs | 4 ++-- parachains/runtimes/testing/penpal/src/xcm_config.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 61349391f85..65ac5c83053 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -103,7 +103,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], max_weight: XCMWeight, weight_credit: &mut XCMWeight, ) -> Result<(), ()> { @@ -117,7 +117,7 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], _max_weight: XCMWeight, _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index 4b78f214000..73e6d9e93b6 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -24,7 +24,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], max_weight: XCMWeight, weight_credit: &mut XCMWeight, ) -> Result<(), ()> { @@ -38,7 +38,7 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], _max_weight: XCMWeight, _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 6d96e59d3b2..5df62e71d7c 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -164,7 +164,7 @@ where { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], max_weight: XCMWeight, weight_credit: &mut XCMWeight, ) -> Result<(), ()> { @@ -178,7 +178,7 @@ pub struct DenyReserveTransferToRelayChain; impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, - message: &mut [Instruction], + message: &mut [Instruction], _max_weight: XCMWeight, _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { From e02878e87a46a865aec00ddd11351403aaee3bae Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 22 Sep 2022 23:16:22 +0800 Subject: [PATCH 048/119] Fixes --- pallets/dmp-queue/src/lib.rs | 3 ++- pallets/parachain-system/src/validate_block/tests.rs | 3 ++- pallets/xcm/src/lib.rs | 3 ++- parachains/common/src/xcm_config.rs | 8 +++++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 5c3a0dc5724..3dfcae436fb 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -240,7 +240,8 @@ pub mod pallet { Ok(Weight::zero()) }, Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, message_id, limit.ref_time()); + let outcome = + T::XcmExecutor::execute_xcm(Parent, x, message_id, limit.ref_time()); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => Err((message_id, Weight::from_ref_time(required))), diff --git a/pallets/parachain-system/src/validate_block/tests.rs b/pallets/parachain-system/src/validate_block/tests.rs index e06c2cafdcf..6087e6a29a3 100644 --- a/pallets/parachain-system/src/validate_block/tests.rs +++ b/pallets/parachain-system/src/validate_block/tests.rs @@ -284,7 +284,8 @@ fn check_inherents_are_unsigned_and_before_all_other_extrinsics() { .expect("Runs the test"); assert!(output.status.success()); - assert!(String::from_utf8(output.stderr).unwrap() + assert!(String::from_utf8(output.stderr) + .unwrap() .contains("Could not find `set_validation_data` inherent")); } } diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 1d87187cdef..bd015dce171 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -157,7 +157,8 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { let weight_limit = limit.saturating_sub(used); - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit.ref_time()); + let outcome = + T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit.ref_time()); used += Weight::from_ref_time(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index 73e6d9e93b6..91d1c46a2fa 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -2,7 +2,7 @@ use crate::impls::AccountIdOf; use core::marker::PhantomData; use frame_support::{ log, - traits::{fungibles::Inspect, tokens::BalanceConversion}, + traits::{fungibles::Inspect, tokens::BalanceConversion, ContainsPair}, weights::{Weight, WeightToFee, WeightToFeePolynomial}, }; use sp_runtime::traits::Get; @@ -111,8 +111,10 @@ where /// Accepts an asset if it is a native asset from a particular `MultiLocation`. pub struct ConcreteNativeAssetFrom(PhantomData); -impl> FilterAssetLocation for ConcreteNativeAssetFrom { - fn filter_asset_location(asset: &MultiAsset, origin: &MultiLocation) -> bool { +impl> ContainsPair + for ConcreteNativeAssetFrom +{ + fn contains(asset: &MultiAsset, origin: &MultiLocation) -> bool { log::trace!(target: "xcm::filter_asset_location", "ConcreteNativeAsset asset: {:?}, origin: {:?}, location: {:?}", asset, origin, Location::get()); From 25958aa09f29522f847781c870a943972f308dad Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 23 Sep 2022 20:27:31 +0800 Subject: [PATCH 049/119] Fixes --- parachains/common/src/xcm_config.rs | 2 +- .../runtimes/contracts/contracts-rococo/src/xcm_config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index 91d1c46a2fa..9a9774ae94f 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -7,7 +7,7 @@ use frame_support::{ }; use sp_runtime::traits::Get; use xcm::latest::{prelude::*, Weight as XCMWeight}; -use xcm_executor::traits::{FilterAssetLocation, ShouldExecute}; +use xcm_executor::traits::ShouldExecute; //TODO: move DenyThenTry to polkadot's xcm module. /// Deny executing the XCM if it matches any of the Deny filter regardless of anything else. diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index a2bd6284f5c..fc0b834c4a3 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -156,7 +156,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Converts a local signed origin into an XCM multilocation. From 9e309844a8207a05223bcf9e8be83a6e4ff3eda4 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 27 Sep 2022 14:52:04 +0800 Subject: [PATCH 050/119] Fixes --- pallets/dmp-queue/src/lib.rs | 2 +- pallets/xcmp-queue/src/mock.rs | 2 +- parachain-template/runtime/src/xcm_config.rs | 2 +- .../runtimes/assets/statemine/src/xcm_config.rs | 11 +++++------ .../runtimes/assets/statemint/src/xcm_config.rs | 2 +- parachains/runtimes/assets/westmint/src/xcm_config.rs | 2 +- .../collectives-polkadot/src/xcm_config.rs | 2 +- parachains/runtimes/starters/shell/src/xcm_config.rs | 2 +- parachains/runtimes/testing/penpal/src/xcm_config.rs | 2 +- .../runtimes/testing/rococo-parachain/src/lib.rs | 2 +- 10 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 3dfcae436fb..6cddb956d52 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -434,7 +434,7 @@ mod tests { } pub struct MockExec; - impl ExecuteXcm for MockExec { + impl ExecuteXcm for MockExec { type Prepared = Weightless; fn prepare(message: Xcm) -> Result { diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 17ca7129a37..bd71ba363e5 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -162,7 +162,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } pub type XcmRouter = ( diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 65ac5c83053..c023a5a6e6d 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -187,7 +187,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index ccf96219c40..ed04677be4c 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -34,11 +34,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{traits::JustTry, XcmExecutor}; @@ -210,7 +209,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 3daa00b4f3f..16720f6fefc 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -186,7 +186,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index a46cbfa2e56..837a6522bf0 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -206,7 +206,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index e3e4e93d5d9..1e7b17de09a 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -158,7 +158,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index 51f774f6d60..6706c6af6bb 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -74,7 +74,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 5df62e71d7c..62ae7fc3a95 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -344,7 +344,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 7e81edaec3a..ec0fd38a3ed 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -424,7 +424,7 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = Call; + type CallDispatcher = RuntimeCall; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. From 013534a684a47c60fe44763e84b9722fd2f6a792 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 27 Sep 2022 16:39:24 +0800 Subject: [PATCH 051/119] Fixes --- pallets/dmp-queue/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 6cddb956d52..c42024e9f8a 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -31,7 +31,10 @@ pub use pallet::*; use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; -use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; +use xcm::{ + latest::{prelude::*, Weight as XCMWeight}, + VersionedXcm, MAX_XCM_DECODE_DEPTH, +}; #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct ConfigData { @@ -428,7 +431,7 @@ mod tests { pub enum Weightless {} impl PreparedMessage for Weightless { - fn weight_of(&self) -> Weight { + fn weight_of(&self) -> XCMWeight { unreachable!() } } From 4984ef30bf1eac29bd2c885756cf15979534ff61 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 27 Sep 2022 16:53:10 +0800 Subject: [PATCH 052/119] Remove unused import --- pallets/dmp-queue/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index c42024e9f8a..107480e39be 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -31,10 +31,7 @@ pub use pallet::*; use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - VersionedXcm, MAX_XCM_DECODE_DEPTH, -}; +use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct ConfigData { From 5efee4c47e2a7aaebdc2a3cde665093a0175e9f3 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 27 Sep 2022 16:56:01 +0800 Subject: [PATCH 053/119] Remove unused import --- parachains/runtimes/assets/westmint/src/xcm_config.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 837a6522bf0..a9d80012619 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -34,11 +34,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{traits::JustTry, XcmExecutor}; From 483b20c699a4bf0803f35c878a65c8dbc47541b8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 3 Oct 2022 14:51:39 +0200 Subject: [PATCH 054/119] 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 --- parachain-template/runtime/src/xcm_config.rs | 6 +- .../runtimes/assets/statemine/src/lib.rs | 16 +++- .../assets/statemine/src/weights/xcm/mod.rs | 96 +++++++++++++++---- .../xcm/pallet_xcm_benchmarks_generic.rs | 91 ++++++++++++++---- .../assets/statemine/src/xcm_config.rs | 7 +- .../runtimes/assets/statemint/src/lib.rs | 16 +++- .../assets/statemint/src/weights/xcm/mod.rs | 96 +++++++++++++++---- .../xcm/pallet_xcm_benchmarks_generic.rs | 90 +++++++++++++---- .../assets/statemint/src/xcm_config.rs | 16 ++-- .../runtimes/assets/westmint/src/lib.rs | 16 +++- .../assets/westmint/src/weights/xcm/mod.rs | 96 +++++++++++++++---- .../xcm/pallet_xcm_benchmarks_generic.rs | 91 ++++++++++++++---- .../assets/westmint/src/xcm_config.rs | 7 +- .../collectives-polkadot/src/xcm_config.rs | 8 +- .../contracts-rococo/src/xcm_config.rs | 6 +- .../runtimes/starters/shell/src/xcm_config.rs | 7 +- .../runtimes/testing/penpal/src/xcm_config.rs | 8 +- .../testing/rococo-parachain/src/lib.rs | 2 +- 18 files changed, 515 insertions(+), 160 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index c023a5a6e6d..03e090009e0 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -1,6 +1,6 @@ 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 core::marker::PhantomData; use frame_support::{ @@ -180,7 +180,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 44f96c1af66..d09394c8232 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -849,7 +849,7 @@ 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; @@ -882,7 +882,6 @@ 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; } @@ -892,7 +891,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -909,6 +907,14 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + fn transact_origin() -> Result { Ok(KsmLocation::get()) } @@ -923,6 +929,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/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 7972667cf06..0ca8a414e44 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -62,7 +62,12 @@ impl XcmWeightInfo for StatemineXcmWeight { fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &u64, + _querier: &Option, + ) -> XCMWeight { XcmGeneric::::query_response().ref_time() } fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { @@ -104,19 +109,11 @@ impl XcmWeightInfo for StatemineXcmWeight { fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { XcmGeneric::::descend_origin().ref_time() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { + fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight { XcmGeneric::::report_error().ref_time() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight { // Hardcoded till the XCM pallet is fixed let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); @@ -124,13 +121,16 @@ impl XcmWeightInfo for StatemineXcmWeight { } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + fn exchange_asset( + _give: &MultiAssetFilter, + _receive: &MultiAssets, + _maximal: &bool, + ) -> XCMWeight { Weight::MAX.ref_time() } fn initiate_reserve_withdraw( @@ -150,13 +150,8 @@ impl XcmWeightInfo for StatemineXcmWeight { let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, 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) -> XCMWeight { + XcmGeneric::::report_holding().ref_time() } fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { XcmGeneric::::buy_execution().ref_time() @@ -185,4 +180,65 @@ impl XcmWeightInfo for StatemineXcmWeight { fn unsubscribe_version() -> XCMWeight { XcmGeneric::::unsubscribe_version().ref_time() } + fn burn_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> XCMWeight { + XcmGeneric::::expect_origin().ref_time() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { + XcmGeneric::::expect_error().ref_time() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::query_pallet().ref_time() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> XCMWeight { + XcmGeneric::::expect_pallet().ref_time() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::report_transact_status().ref_time() + } + fn clear_transact_status() -> XCMWeight { + XcmGeneric::::clear_transact_status().ref_time() + } + fn universal_origin(_: &Junction) -> XCMWeight { + Weight::MAX.ref_time() + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { + Weight::MAX.ref_time() + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn set_fees_mode(_: &bool) -> XCMWeight { + XcmGeneric::::set_fees_mode().ref_time() + } + fn set_topic(_topic: &[u8; 32]) -> XCMWeight { + XcmGeneric::::set_topic().ref_time() + } + fn clear_topic() -> XCMWeight { + XcmGeneric::::clear_topic().ref_time() + } + fn alias_origin(_: &MultiLocation) -> XCMWeight { + // XCM Executor does not currently support alias origin operations + Weight::MAX.ref_time() + } } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 6a9f36b7684..689c9a8220a 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +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-08-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-09-30, 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: @@ -36,7 +37,7 @@ // --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt // --template=./templates/xcm-bench-template.hbs -// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --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(694_466_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(1_303_495_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(7_095_000 as u64) + Weight::from_ref_time(8_667_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(13_270_000 as u64) + Weight::from_ref_time(19_292_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(16_375_000 as u64) + Weight::from_ref_time(37_996_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(7_319_000 as u64) + Weight::from_ref_time(9_076_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(3_515_000 as u64) + Weight::from_ref_time(6_410_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(3_501_000 as u64) + Weight::from_ref_time(6_412_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(3_459_000 as u64) + Weight::from_ref_time(6_311_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(4_319_000 as u64) + Weight::from_ref_time(7_355_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(3_511_000 as u64) + Weight::from_ref_time(6_389_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(13_284_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(23_020_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(7_985_000 as u64) + Weight::from_ref_time(13_613_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(3_515_000 as u64) + Weight::from_ref_time(6_457_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(16_657_000 as u64) + Weight::from_ref_time(31_677_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(5_622_000 as u64) + Weight::from_ref_time(9_613_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +132,57 @@ 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(878_786_000 as u64) + Weight::from_ref_time(1_588_580_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(497_452_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(38_502_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(6_427_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(6_303_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_510_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_909_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_949_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(6_491_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(6_527_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(6_440_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(6_426_000 as u64) + } } diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index ed04677be4c..4841ee7c518 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -14,8 +14,9 @@ // 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, @@ -202,7 +203,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index 151259f839a..df2425d3667 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -878,7 +878,7 @@ 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; @@ -911,7 +911,6 @@ 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; } @@ -920,7 +919,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -937,6 +935,14 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + fn transact_origin() -> Result { Ok(DotLocation::get()) } @@ -951,6 +957,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/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index 1a0ffcdb229..512be255779 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -62,7 +62,12 @@ impl XcmWeightInfo for StatemintXcmWeight { fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &u64, + _querier: &Option, + ) -> XCMWeight { XcmGeneric::::query_response().ref_time() } fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { @@ -104,19 +109,11 @@ impl XcmWeightInfo for StatemintXcmWeight { fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { XcmGeneric::::descend_origin().ref_time() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { + fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight { XcmGeneric::::report_error().ref_time() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight { // Hardcoded till the XCM pallet is fixed let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); @@ -124,13 +121,16 @@ impl XcmWeightInfo for StatemintXcmWeight { } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + fn exchange_asset( + _give: &MultiAssetFilter, + _receive: &MultiAssets, + _maximal: &bool, + ) -> XCMWeight { Weight::MAX.ref_time() } fn initiate_reserve_withdraw( @@ -150,13 +150,8 @@ impl XcmWeightInfo for StatemintXcmWeight { let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, 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) -> XCMWeight { + XcmGeneric::::report_holding().ref_time() } fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { XcmGeneric::::buy_execution().ref_time() @@ -185,4 +180,65 @@ impl XcmWeightInfo for StatemintXcmWeight { fn unsubscribe_version() -> XCMWeight { XcmGeneric::::unsubscribe_version().ref_time() } + fn burn_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> XCMWeight { + XcmGeneric::::expect_origin().ref_time() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { + XcmGeneric::::expect_error().ref_time() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::query_pallet().ref_time() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> XCMWeight { + XcmGeneric::::expect_pallet().ref_time() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::report_transact_status().ref_time() + } + fn clear_transact_status() -> XCMWeight { + XcmGeneric::::clear_transact_status().ref_time() + } + fn universal_origin(_: &Junction) -> XCMWeight { + Weight::MAX.ref_time() + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { + Weight::MAX.ref_time() + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn set_fees_mode(_: &bool) -> XCMWeight { + XcmGeneric::::set_fees_mode().ref_time() + } + fn set_topic(_topic: &[u8; 32]) -> XCMWeight { + XcmGeneric::::set_topic().ref_time() + } + fn clear_topic() -> XCMWeight { + XcmGeneric::::clear_topic().ref_time() + } + fn alias_origin(_: &MultiLocation) -> XCMWeight { + // XCM Executor does not currently support alias origin operations + Weight::MAX.ref_time() + } } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 7af8b8b280b..6ed0d1adff2 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-08-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-09-30, 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 @@ -37,7 +37,7 @@ // --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt // --template=./templates/xcm-bench-template.hbs -// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -55,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(682_639_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(1_305_689_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(9_272_000 as u64) + Weight::from_ref_time(8_843_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(17_084_000 as u64) + Weight::from_ref_time(19_216_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(20_265_000 as u64) + Weight::from_ref_time(22_708_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(9_422_000 as u64) + Weight::from_ref_time(9_040_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_545_000 as u64) + Weight::from_ref_time(6_222_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_450_000 as u64) + Weight::from_ref_time(6_411_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_519_000 as u64) + Weight::from_ref_time(6_222_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_398_000 as u64) + Weight::from_ref_time(7_112_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_498_000 as u64) + Weight::from_ref_time(6_340_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_784_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(22_943_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(11_861_000 as u64) + Weight::from_ref_time(13_178_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_462_000 as u64) + Weight::from_ref_time(6_333_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -115,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_997_000 as u64) + Weight::from_ref_time(31_798_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(8_684_000 as u64) + Weight::from_ref_time(9_728_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -131,8 +132,57 @@ 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(883_121_000 as u64) + Weight::from_ref_time(1_583_652_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(497_448_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(38_383_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(6_308_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(6_327_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(26_011_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(8_008_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_963_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(6_378_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(6_313_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(6_324_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(6_336_000 as u64) + } } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 16720f6fefc..bb9d82680fe 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -14,8 +14,9 @@ // 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, @@ -31,11 +32,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{traits::JustTry, XcmExecutor}; @@ -179,7 +179,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 1f1d86e1e7e..a227572609a 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -838,7 +838,7 @@ 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; @@ -871,7 +871,6 @@ 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; } @@ -881,7 +880,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -898,6 +896,14 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } + fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { + Err(BenchmarkError::Skip) + } + + fn universal_alias() -> Result { + Err(BenchmarkError::Skip) + } + fn transact_origin() -> Result { Ok(WestendLocation::get()) } @@ -912,6 +918,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/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 5f6bf034fdc..56852eee6ab 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -62,7 +62,12 @@ impl XcmWeightInfo for WestmintXcmWeight { fn receive_teleported_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) } - fn query_response(_query_id: &u64, _response: &Response, _max_weight: &u64) -> XCMWeight { + fn query_response( + _query_id: &u64, + _response: &Response, + _max_weight: &u64, + _querier: &Option, + ) -> XCMWeight { XcmGeneric::::query_response().ref_time() } fn transfer_asset(assets: &MultiAssets, _dest: &MultiLocation) -> XCMWeight { @@ -104,19 +109,11 @@ impl XcmWeightInfo for WestmintXcmWeight { fn descend_origin(_who: &InteriorMultiLocation) -> XCMWeight { XcmGeneric::::descend_origin().ref_time() } - fn report_error( - _query_id: &QueryId, - _dest: &MultiLocation, - _max_response_weight: &u64, - ) -> XCMWeight { + fn report_error(_query_response_info: &QueryResponseInfo) -> XCMWeight { XcmGeneric::::report_error().ref_time() } - fn deposit_asset( - assets: &MultiAssetFilter, - _max_assets: &u32, - _dest: &MultiLocation, - ) -> XCMWeight { + fn deposit_asset(assets: &MultiAssetFilter, _dest: &MultiLocation) -> XCMWeight { // Hardcoded till the XCM pallet is fixed let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time(); let weight = assets.weigh_multi_assets(XcmFungibleWeight::::deposit_asset()); @@ -124,13 +121,16 @@ impl XcmWeightInfo for WestmintXcmWeight { } fn deposit_reserve_asset( assets: &MultiAssetFilter, - _max_assets: &u32, _dest: &MultiLocation, _xcm: &Xcm<()>, ) -> XCMWeight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets) -> XCMWeight { + fn exchange_asset( + _give: &MultiAssetFilter, + _receive: &MultiAssets, + _maximal: &bool, + ) -> XCMWeight { Weight::MAX.ref_time() } fn initiate_reserve_withdraw( @@ -150,13 +150,8 @@ impl XcmWeightInfo for WestmintXcmWeight { let weight = assets.weigh_multi_assets(XcmFungibleWeight::::initiate_teleport()); cmp::min(hardcoded_weight, 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) -> XCMWeight { + XcmGeneric::::report_holding().ref_time() } fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { XcmGeneric::::buy_execution().ref_time() @@ -185,4 +180,65 @@ impl XcmWeightInfo for WestmintXcmWeight { fn unsubscribe_version() -> XCMWeight { XcmGeneric::::unsubscribe_version().ref_time() } + fn burn_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::burn_asset()) + } + fn expect_asset(assets: &MultiAssets) -> XCMWeight { + assets.weigh_multi_assets(XcmGeneric::::expect_asset()) + } + fn expect_origin(_origin: &Option) -> XCMWeight { + XcmGeneric::::expect_origin().ref_time() + } + fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { + XcmGeneric::::expect_error().ref_time() + } + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::query_pallet().ref_time() + } + fn expect_pallet( + _index: &u32, + _name: &Vec, + _module_name: &Vec, + _crate_major: &u32, + _min_crate_minor: &u32, + ) -> XCMWeight { + XcmGeneric::::expect_pallet().ref_time() + } + fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { + XcmGeneric::::report_transact_status().ref_time() + } + fn clear_transact_status() -> XCMWeight { + XcmGeneric::::clear_transact_status().ref_time() + } + fn universal_origin(_: &Junction) -> XCMWeight { + Weight::MAX.ref_time() + } + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { + Weight::MAX.ref_time() + } + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { + Weight::MAX.ref_time() + } + fn set_fees_mode(_: &bool) -> XCMWeight { + XcmGeneric::::set_fees_mode().ref_time() + } + fn set_topic(_topic: &[u8; 32]) -> XCMWeight { + XcmGeneric::::set_topic().ref_time() + } + fn clear_topic() -> XCMWeight { + XcmGeneric::::clear_topic().ref_time() + } + fn alias_origin(_: &MultiLocation) -> XCMWeight { + // XCM Executor does not currently support alias origin operations + Weight::MAX.ref_time() + } } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 80aff062d20..042e0b3a974 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +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-08-17, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-09-30, 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("westmint-dev"), DB CACHE: 1024 // Executed Command: @@ -36,7 +37,7 @@ // --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt // --template=./templates/xcm-bench-template.hbs -// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --output=./parachains/runtimes/assets/westmint/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(676_316_000 as u64) + pub(crate) fn report_holding() -> Weight { + Weight::from_ref_time(1_324_853_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(7_030_000 as u64) + Weight::from_ref_time(8_533_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(12_574_000 as u64) + Weight::from_ref_time(19_435_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn transact() -> Weight { - Weight::from_ref_time(15_764_000 as u64) + Weight::from_ref_time(22_656_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(7_200_000 as u64) + Weight::from_ref_time(8_900_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(3_310_000 as u64) + Weight::from_ref_time(6_255_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(3_260_000 as u64) + Weight::from_ref_time(6_268_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(3_277_000 as u64) + Weight::from_ref_time(6_304_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(3_913_000 as u64) + Weight::from_ref_time(7_279_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(3_354_000 as u64) + Weight::from_ref_time(6_297_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(13_028_000 as u64) - .saturating_add(T::DbWeight::get().reads(5 as u64)) + Weight::from_ref_time(23_025_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(7_739_000 as u64) + Weight::from_ref_time(13_001_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(3_351_000 as u64) + Weight::from_ref_time(6_266_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(16_051_000 as u64) + Weight::from_ref_time(31_348_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(5_477_000 as u64) + Weight::from_ref_time(9_534_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -130,8 +132,57 @@ 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(874_435_000 as u64) + Weight::from_ref_time(1_558_814_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(496_802_000 as u64) + } + pub(crate) fn expect_asset() -> Weight { + Weight::from_ref_time(38_299_000 as u64) + } + pub(crate) fn expect_origin() -> Weight { + Weight::from_ref_time(6_354_000 as u64) + } + pub(crate) fn expect_error() -> Weight { + Weight::from_ref_time(6_234_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_150_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_969_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(23_099_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(6_366_000 as u64) + } + pub(crate) fn set_topic() -> Weight { + Weight::from_ref_time(6_422_000 as u64) + } + pub(crate) fn clear_topic() -> Weight { + Weight::from_ref_time(6_405_000 as u64) + } + pub(crate) fn set_fees_mode() -> Weight { + Weight::from_ref_time(6_392_000 as u64) + } } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index a9d80012619..4f55696c69e 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -14,8 +14,9 @@ // 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, @@ -198,7 +199,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 1e7b17de09a..2cb82656c37 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -14,8 +14,8 @@ // 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, @@ -31,7 +31,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -151,7 +151,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index fc0b834c4a3..4f53eca6dbc 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -14,8 +14,8 @@ // 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, @@ -149,7 +149,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = super::AllPalletsWithSystem; + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = ConstU32<8>; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index 6706c6af6bb..acc02df42af 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -13,7 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use super::{AccountId, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin}; +use super::{ + AccountId, AllPalletsWithSystem, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, +}; use frame_support::{match_types, parameter_types, traits::Nothing}; use xcm::latest::prelude::*; use xcm_builder::{ @@ -67,7 +70,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = (); // don't trap for now type AssetClaims = (); // don't claim for now type SubscriptionService = (); // don't handle subscriptions for now - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 62ae7fc3a95..e8f70c20e63 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -22,9 +22,9 @@ //! with statemine as the reserve. At present no derivative tokens are minted on receipt of a //! ReserveAssetTransferDeposited message but that will but the intension will be to support this soon. use super::{ - AccountId, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, ParachainInfo, - ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, AssetId as AssetIdPalletAssets, Assets, Balance, Balances, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + WeightToFee, XcmpQueue, }; use core::marker::PhantomData; use frame_support::{ @@ -337,7 +337,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index ec0fd38a3ed..80d97def583 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -417,7 +417,7 @@ impl xcm_executor::Config for XcmConfig { type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; - type PalletInstancesInfo = (); + type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type AssetLocker = (); type AssetExchanger = (); From 7290787bf307b9162d0698980cccd0f7191f6aae Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 25 Oct 2022 13:50:19 +0200 Subject: [PATCH 055/119] Avoid consuming XCM message for NotApplicable scenario (#1787) * Avoid consuming message for NotApplicable scenario * Avoid consuming message for NotApplicable scenario tests --- pallets/xcmp-queue/src/lib.rs | 5 +- pallets/xcmp-queue/src/tests.rs | 85 +++++++++++++++++++++++++ primitives/utility/src/lib.rs | 106 +++++++++++++++++++++++++++++++- 3 files changed, 192 insertions(+), 4 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 72f1c12011b..2fdedd3e306 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -1138,19 +1138,20 @@ impl SendXcm for Pallet { msg: &mut Option>, ) -> SendResult<(ParaId, VersionedXcm<()>)> { let d = dest.take().ok_or(SendError::MissingArgument)?; - let xcm = msg.take().ok_or(SendError::MissingArgument)?; match &d { // An HRMP message for a sibling parachain. MultiLocation { parents: 1, interior: X1(Parachain(id)) } => { + let xcm = msg.take().ok_or(SendError::MissingArgument)?; let id = ParaId::from(*id); let price = T::PriceForSiblingDelivery::price_for_sibling_delivery(id, &xcm); let versioned_xcm = T::VersionWrapper::wrap_version(&d, xcm) .map_err(|()| SendError::DestinationUnsupported)?; Ok(((id, versioned_xcm), price)) }, - // Anything else is unhandled. This includes a message this is meant for us. _ => { + // Anything else is unhandled. This includes a message that is not meant for us. + // We need to make sure that dest/msg is not consumed here. *dest = Some(d); Err(SendError::NotApplicable) }, diff --git a/pallets/xcmp-queue/src/tests.rs b/pallets/xcmp-queue/src/tests.rs index 1b6303ddaf1..595bd8ca33b 100644 --- a/pallets/xcmp-queue/src/tests.rs +++ b/pallets/xcmp-queue/src/tests.rs @@ -247,3 +247,88 @@ fn update_xcmp_max_individual_weight() { assert_eq!(data.xcmp_max_individual_weight, 30u64 * WEIGHT_PER_MILLIS); }); } + +/// Validates [`validate`] for required Some(destination) and Some(message) +struct OkFixedXcmHashWithAssertingRequiredInputsSender; +impl OkFixedXcmHashWithAssertingRequiredInputsSender { + const FIXED_XCM_HASH: [u8; 32] = [9; 32]; + + fn fixed_delivery_asset() -> MultiAssets { + MultiAssets::new() + } + + fn expected_delivery_result() -> Result<(XcmHash, MultiAssets), SendError> { + Ok((Self::FIXED_XCM_HASH, Self::fixed_delivery_asset())) + } +} +impl SendXcm for OkFixedXcmHashWithAssertingRequiredInputsSender { + type Ticket = (); + + fn validate( + destination: &mut Option, + message: &mut Option>, + ) -> SendResult { + assert!(destination.is_some()); + assert!(message.is_some()); + Ok(((), OkFixedXcmHashWithAssertingRequiredInputsSender::fixed_delivery_asset())) + } + + fn deliver(_: Self::Ticket) -> Result { + Ok(Self::FIXED_XCM_HASH) + } +} + +#[test] +fn xcmp_queue_does_not_consume_dest_or_msg_on_not_applicable() { + // dummy message + let message = Xcm(vec![Trap(5)]); + + // XcmpQueue - check dest is really not applicable + let dest = (Parent, Parent, Parent); + let mut dest_wrapper = Some(dest.clone().into()); + let mut msg_wrapper = Some(message.clone()); + assert_eq!( + Err(SendError::NotApplicable), + ::validate(&mut dest_wrapper, &mut msg_wrapper) + ); + + // check wrapper were not consumed + assert_eq!(Some(dest.clone().into()), dest_wrapper.take()); + assert_eq!(Some(message.clone()), msg_wrapper.take()); + + // another try with router chain with asserting sender + assert_eq!( + OkFixedXcmHashWithAssertingRequiredInputsSender::expected_delivery_result(), + send_xcm::<(XcmpQueue, OkFixedXcmHashWithAssertingRequiredInputsSender)>( + dest.into(), + message + ) + ); +} + +#[test] +fn xcmp_queue_consumes_dest_and_msg_on_ok_validate() { + // dummy message + let message = Xcm(vec![Trap(5)]); + + // XcmpQueue - check dest/msg is valid + let dest = (Parent, X1(Parachain(5555))); + let mut dest_wrapper = Some(dest.clone().into()); + let mut msg_wrapper = Some(message.clone()); + assert!(::validate(&mut dest_wrapper, &mut msg_wrapper).is_ok()); + + // check wrapper were consumed + assert_eq!(None, dest_wrapper.take()); + assert_eq!(None, msg_wrapper.take()); + + new_test_ext().execute_with(|| { + // another try with router chain with asserting sender + assert_eq!( + Err(SendError::Transport("NoChannel")), + send_xcm::<(XcmpQueue, OkFixedXcmHashWithAssertingRequiredInputsSender)>( + dest.into(), + message + ) + ); + }); +} diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 1e93aa7d792..5cededd7b46 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -75,10 +75,10 @@ where msg: &mut Option>, ) -> SendResult> { let d = dest.take().ok_or(SendError::MissingArgument)?; - let xcm = msg.take().ok_or(SendError::MissingArgument)?; if d.contains_parents_only(1) { // An upward message for the relay chain. + let xcm = msg.take().ok_or(SendError::MissingArgument)?; let price = P::price_for_parent_delivery(&xcm); let versioned_xcm = W::wrap_version(&d, xcm).map_err(|()| SendError::DestinationUnsupported)?; @@ -86,8 +86,9 @@ where Ok((data, price)) } else { + // Anything else is unhandled. This includes a message that is not meant for us. + // We need to make sure that dest/msg is not consumed here. *dest = Some(d); - // Anything else is unhandled. This includes a message this is meant for us. Err(SendError::NotApplicable) } } @@ -317,3 +318,104 @@ pub trait ChargeWeightInFungibles Result<>::Balance, XcmError>; } + +#[cfg(test)] +mod tests { + use super::*; + use cumulus_primitives_core::UpwardMessage; + + /// Validates [`validate`] for required Some(destination) and Some(message) + struct OkFixedXcmHashWithAssertingRequiredInputsSender; + impl OkFixedXcmHashWithAssertingRequiredInputsSender { + const FIXED_XCM_HASH: [u8; 32] = [9; 32]; + + fn fixed_delivery_asset() -> MultiAssets { + MultiAssets::new() + } + + fn expected_delivery_result() -> Result<(XcmHash, MultiAssets), SendError> { + Ok((Self::FIXED_XCM_HASH, Self::fixed_delivery_asset())) + } + } + impl SendXcm for OkFixedXcmHashWithAssertingRequiredInputsSender { + type Ticket = (); + + fn validate( + destination: &mut Option, + message: &mut Option>, + ) -> SendResult { + assert!(destination.is_some()); + assert!(message.is_some()); + Ok(((), OkFixedXcmHashWithAssertingRequiredInputsSender::fixed_delivery_asset())) + } + + fn deliver(_: Self::Ticket) -> Result { + Ok(Self::FIXED_XCM_HASH) + } + } + + /// Impl [`UpwardMessageSender`] that return `Other` error + struct OtherErrorUpwardMessageSender; + impl UpwardMessageSender for OtherErrorUpwardMessageSender { + fn send_upward_message(_: UpwardMessage) -> Result { + Err(MessageSendError::Other) + } + } + + #[test] + fn parent_as_ump_does_not_consume_dest_or_msg_on_not_applicable() { + // dummy message + let message = Xcm(vec![Trap(5)]); + + // ParentAsUmp - check dest is really not applicable + let dest = (Parent, Parent, Parent); + let mut dest_wrapper = Some(dest.clone().into()); + let mut msg_wrapper = Some(message.clone()); + assert_eq!( + Err(SendError::NotApplicable), + as SendXcm>::validate(&mut dest_wrapper, &mut msg_wrapper) + ); + + // check wrapper were not consumed + assert_eq!(Some(dest.clone().into()), dest_wrapper.take()); + assert_eq!(Some(message.clone()), msg_wrapper.take()); + + // another try with router chain with asserting sender + assert_eq!( + OkFixedXcmHashWithAssertingRequiredInputsSender::expected_delivery_result(), + send_xcm::<(ParentAsUmp<(), (), ()>, OkFixedXcmHashWithAssertingRequiredInputsSender)>( + dest.into(), + message + ) + ); + } + + #[test] + fn parent_as_ump_consumes_dest_and_msg_on_ok_validate() { + // dummy message + let message = Xcm(vec![Trap(5)]); + + // ParentAsUmp - check dest/msg is valid + let dest = (Parent, Here); + let mut dest_wrapper = Some(dest.clone().into()); + let mut msg_wrapper = Some(message.clone()); + assert!( as SendXcm>::validate( + &mut dest_wrapper, + &mut msg_wrapper + ) + .is_ok()); + + // check wrapper were consumed + assert_eq!(None, dest_wrapper.take()); + assert_eq!(None, msg_wrapper.take()); + + // another try with router chain with asserting sender + assert_eq!( + Err(SendError::Transport("Other")), + send_xcm::<( + ParentAsUmp, + OkFixedXcmHashWithAssertingRequiredInputsSender + )>(dest.into(), message) + ); + } +} From ded04c2c5a417a7b7b5b750abd1938b22ab7a8be Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 15 Nov 2022 15:24:17 +0900 Subject: [PATCH 056/119] Add 10 message processing limit to DMP queue --- pallets/dmp-queue/src/lib.rs | 37 ++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index dc1905166ac..f26db5f593f 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -40,6 +40,11 @@ use xcm::{ const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB +const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB +// Maximum amount of messages to process per block. This is a temporary measure until we properly +// account for proof size weights. +const MAX_MESSAGES_PER_BLOCK: u8 = 10; + #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct ConfigData { /// The maximum amount of weight any individual message may consume. Messages above this weight @@ -200,19 +205,32 @@ pub mod pallet { /// /// Returns the weight consumed by executing messages in the queue. fn service_queue(limit: Weight) -> Weight { - PageIndex::::mutate(|page_index| Self::do_service_queue(limit, page_index)) + let mut messages_processed = 0; + PageIndex::::mutate(|page_index| Self::do_service_queue(limit, page_index, &mut messages_processed)) } /// Exactly equivalent to `service_queue` but expects a mutable `page_index` to be passed /// in and any changes stored. - fn do_service_queue(limit: Weight, page_index: &mut PageIndexData) -> Weight { + fn do_service_queue( + limit: Weight, + page_index: &mut PageIndexData, + messages_processed: &mut u8, + ) -> Weight { let mut used = Weight::zero(); - while page_index.begin_used < page_index.end_used { + 'page: while page_index.begin_used < page_index.end_used { let page = Pages::::take(page_index.begin_used); for (i, &(sent_at, ref data)) in page.iter().enumerate() { + if *messages_processed >= MAX_MESSAGES_PER_BLOCK { + // Exceeded block message limit - put the remaining messages back and bail + Pages::::insert(page_index.begin_used, &page[i..]); + return used + } match Self::try_service_message(limit.saturating_sub(used), sent_at, &data[..]) { - Ok(w) => used += w, + Ok(w) => { + used += w; + *messages_processed += 1; + }, Err(..) => { // Too much weight needed - put the remaining messages back and bail Pages::::insert(page_index.begin_used, &page[i..]); @@ -280,11 +298,12 @@ pub mod pallet { iter: impl Iterator)>, limit: Weight, ) -> Weight { + let mut messages_processed = 0; let mut page_index = PageIndex::::get(); let config = Configuration::::get(); // First try to use `max_weight` to service the current queue. - let mut used = Self::do_service_queue(limit, &mut page_index); + let mut used = Self::do_service_queue(limit, &mut page_index, &mut messages_processed); // Then if the queue is empty, use the weight remaining to service the incoming messages // and once we run out of weight, place them in the queue. @@ -297,11 +316,17 @@ pub mod pallet { }; for (i, (sent_at, data)) in iter.enumerate() { + if messages_processed >= MAX_MESSAGES_PER_BLOCK { + break + } if maybe_enqueue_page.is_none() { // We're not currently enqueuing - try to execute inline. let remaining_weight = limit.saturating_sub(used); match Self::try_service_message(remaining_weight, sent_at, &data[..]) { - Ok(consumed) => used += consumed, + Ok(consumed) => { + used += consumed; + messages_processed += 1; + }, Err((message_id, required_weight)) => // Too much weight required right now. { From f9fc7c612f548691801741c643d975672b731b8c Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 15 Nov 2022 15:53:13 +0900 Subject: [PATCH 057/119] Add 10 message limit to XCMP queue --- pallets/dmp-queue/src/lib.rs | 10 ++++----- pallets/xcmp-queue/src/lib.rs | 22 +++++++++++++++---- .../collectives-polkadot/src/xcm_config.rs | 7 +++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index f26db5f593f..8069a962139 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -39,10 +39,8 @@ use xcm::{ }; const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB - -const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB -// Maximum amount of messages to process per block. This is a temporary measure until we properly -// account for proof size weights. + // Maximum amount of messages to process per block. This is a temporary measure until we properly + // account for proof size weights. const MAX_MESSAGES_PER_BLOCK: u8 = 10; #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] @@ -206,7 +204,9 @@ pub mod pallet { /// Returns the weight consumed by executing messages in the queue. fn service_queue(limit: Weight) -> Weight { let mut messages_processed = 0; - PageIndex::::mutate(|page_index| Self::do_service_queue(limit, page_index, &mut messages_processed)) + PageIndex::::mutate(|page_index| { + Self::do_service_queue(limit, page_index, &mut messages_processed) + }) } /// Exactly equivalent to `service_queue` but expects a mutable `page_index` to be passed diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index d430604a822..d803b9f0bad 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -68,6 +68,9 @@ pub type OverweightIndex = u64; const LOG_TARGET: &str = "xcmp_queue"; const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB + // Maximum amount of messages to process per block. This is a temporary measure until we properly + // account for proof size weights. +const MAX_MESSAGES_PER_BLOCK: u8 = 10; #[frame_support::pallet] pub mod pallet { @@ -658,6 +661,7 @@ impl Pallet { fn process_xcmp_message( sender: ParaId, (sent_at, format): (RelayBlockNumber, XcmpMessageFormat), + messages_processed: &mut u8, max_weight: Weight, max_individual_weight: Weight, ) -> (Weight, bool) { @@ -667,7 +671,9 @@ impl Pallet { let mut weight_used = Weight::zero(); match format { XcmpMessageFormat::ConcatenatedVersionedXcm => { - while !remaining_fragments.is_empty() { + while !remaining_fragments.is_empty() && + *messages_processed < MAX_MESSAGES_PER_BLOCK + { last_remaining_fragments = remaining_fragments; if let Ok(xcm) = VersionedXcm::::decode_with_depth_limit( MAX_XCM_DECODE_DEPTH, @@ -675,7 +681,10 @@ impl Pallet { ) { let weight = max_weight - weight_used; match Self::handle_xcm_message(sender, sent_at, xcm, weight) { - Ok(used) => weight_used = weight_used.saturating_add(used), + Ok(used) => { + weight_used = weight_used.saturating_add(used); + *messages_processed += 1; + }, Err(XcmError::WeightLimitReached(required)) if required > max_individual_weight.ref_time() => { @@ -723,7 +732,10 @@ impl Pallet { if let Ok(blob) = >::decode(&mut remaining_fragments) { let weight = max_weight - weight_used; match Self::handle_blob_message(sender, sent_at, blob, weight) { - Ok(used) => weight_used = weight_used.saturating_add(used), + Ok(used) => { + weight_used = weight_used.saturating_add(used); + *messages_processed += 1; + }, Err(true) => { // That message didn't get processed this time because of being // too heavy. We leave it around for next time and bail. @@ -799,6 +811,7 @@ impl Pallet { /// further. fn service_xcmp_queue(max_weight: Weight) -> Weight { let suspended = QueueSuspended::::get(); + let mut messages_processed = 0; let mut status = >::get(); // <- sorted. if status.is_empty() { @@ -827,7 +840,8 @@ impl Pallet { let mut shuffle_index = 0; while shuffle_index < shuffled.len() && - max_weight.saturating_sub(weight_used).all_gte(threshold_weight) + max_weight.saturating_sub(weight_used).all_gte(threshold_weight) && + messages_processed < MAX_MESSAGES_PER_BLOCK { let index = shuffled[shuffle_index]; let sender = status[index].sender; diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 2cb82656c37..fb0bd3b4195 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -31,10 +31,9 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::XcmExecutor; From 61438f597e5dde5171d7017a8759001e009c9e3e Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 16 Nov 2022 13:27:16 +0900 Subject: [PATCH 058/119] Always increment the message_processed count whenever a message is processed --- pallets/dmp-queue/src/lib.rs | 12 ++++-------- pallets/xcmp-queue/src/lib.rs | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 8069a962139..df2edeeb281 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -225,12 +225,10 @@ pub mod pallet { Pages::::insert(page_index.begin_used, &page[i..]); return used } + *messages_processed += 1; match Self::try_service_message(limit.saturating_sub(used), sent_at, &data[..]) { - Ok(w) => { - used += w; - *messages_processed += 1; - }, + Ok(w) => used += w, Err(..) => { // Too much weight needed - put the remaining messages back and bail Pages::::insert(page_index.begin_used, &page[i..]); @@ -322,11 +320,9 @@ pub mod pallet { if maybe_enqueue_page.is_none() { // We're not currently enqueuing - try to execute inline. let remaining_weight = limit.saturating_sub(used); + messages_processed += 1; match Self::try_service_message(remaining_weight, sent_at, &data[..]) { - Ok(consumed) => { - used += consumed; - messages_processed += 1; - }, + Ok(consumed) => used += consumed, Err((message_id, required_weight)) => // Too much weight required right now. { diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index d803b9f0bad..93b5e2e5721 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -680,11 +680,9 @@ impl Pallet { &mut remaining_fragments, ) { let weight = max_weight - weight_used; + *messages_processed += 1; match Self::handle_xcm_message(sender, sent_at, xcm, weight) { - Ok(used) => { - weight_used = weight_used.saturating_add(used); - *messages_processed += 1; - }, + Ok(used) => weight_used = weight_used.saturating_add(used), Err(XcmError::WeightLimitReached(required)) if required > max_individual_weight.ref_time() => { @@ -731,11 +729,9 @@ impl Pallet { if let Ok(blob) = >::decode(&mut remaining_fragments) { let weight = max_weight - weight_used; + *messages_processed += 1; match Self::handle_blob_message(sender, sent_at, blob, weight) { - Ok(used) => { - weight_used = weight_used.saturating_add(used); - *messages_processed += 1; - }, + Ok(used) => weight_used = weight_used.saturating_add(used), Err(true) => { // That message didn't get processed this time because of being // too heavy. We leave it around for next time and bail. From d1f21d7f8b7a8e3fe35ac71d8259e3e267cd7c0a Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 16 Nov 2022 13:29:10 +0900 Subject: [PATCH 059/119] Fix formatting --- pallets/dmp-queue/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index df2edeeb281..70706e793f8 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -39,8 +39,9 @@ use xcm::{ }; const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB - // Maximum amount of messages to process per block. This is a temporary measure until we properly - // account for proof size weights. + +// Maximum amount of messages to process per block. This is a temporary measure until we properly +// account for proof size weights. const MAX_MESSAGES_PER_BLOCK: u8 = 10; #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] From 03c318c297199ae38e57b0694d5533ff4cc0e013 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 16 Nov 2022 15:56:26 +0900 Subject: [PATCH 060/119] Set an upper limit to the overweight message DMP queue --- pallets/dmp-queue/src/lib.rs | 15 ++++++++++++--- pallets/dmp-queue/src/migration.rs | 19 ++++++++++++++++++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 70706e793f8..98ce03b9693 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -43,6 +43,8 @@ const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB // Maximum amount of messages to process per block. This is a temporary measure until we properly // account for proof size weights. const MAX_MESSAGES_PER_BLOCK: u8 = 10; +// Maximum amount of messages that can exist in the overweight queue at any given time. +const MAX_OVERWEIGHT_MESSAGES: u32 = 1000; #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct ConfigData { @@ -123,8 +125,13 @@ pub mod pallet { /// The overweight messages. #[pallet::storage] - pub(super) type Overweight = - StorageMap<_, Blake2_128Concat, OverweightIndex, (RelayBlockNumber, Vec), OptionQuery>; + pub(super) type Overweight = CountedStorageMap< + _, + Blake2_128Concat, + OverweightIndex, + (RelayBlockNumber, Vec), + OptionQuery, + >; #[pallet::error] pub enum Error { @@ -327,7 +334,9 @@ pub mod pallet { Err((message_id, required_weight)) => // Too much weight required right now. { - if required_weight.any_gt(config.max_individual) { + let is_under_limit = Overweight::::count() < MAX_OVERWEIGHT_MESSAGES; + used.saturating_accrue(T::DbWeight::get().reads(1)); + if required_weight.any_gt(config.max_individual) && is_under_limit { // overweight - add to overweight queue and continue with // message execution. let overweight_index = page_index.overweight_count; diff --git a/pallets/dmp-queue/src/migration.rs b/pallets/dmp-queue/src/migration.rs index 8ecb9988d50..1257508af2d 100644 --- a/pallets/dmp-queue/src/migration.rs +++ b/pallets/dmp-queue/src/migration.rs @@ -33,8 +33,15 @@ pub fn migrate_to_latest() -> Weight { let mut weight = T::DbWeight::get().reads(1); if StorageVersion::get::>() == 0 { - weight += migrate_to_v1::(); + weight.saturating_accrue(migrate_to_v1::()); StorageVersion::new(1).put::>(); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + } + + if StorageVersion::get::>() == 1 { + weight.saturating_accrue(migrate_to_v2::()); + StorageVersion::new(2).put::>(); + weight.saturating_accrue(T::DbWeight::get().writes(1)); } weight @@ -78,6 +85,16 @@ pub fn migrate_to_v1() -> Weight { T::DbWeight::get().reads_writes(1, 1) } +/// Migrates `Overweight` so that it initializes the storage map's counter. +/// +/// NOTE: Only use this function if you know what you're doing. Default to using +/// `migrate_to_latest`. +pub fn migrate_to_v2() -> Weight { + let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + + T::DbWeight::get().reads_writes(overweight_messages, 1) +} + #[cfg(test)] mod tests { use super::*; From 953aaae4d9d6e4f84de8ddc0b0b157ccda961ec4 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 16 Nov 2022 16:11:36 +0900 Subject: [PATCH 061/119] Add upper limit to XCMP overweight message queue --- pallets/xcmp-queue/src/lib.rs | 44 ++++++++++++++++++----------- pallets/xcmp-queue/src/migration.rs | 15 +++++++++- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 93b5e2e5721..6bd7ee31827 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -68,9 +68,12 @@ pub type OverweightIndex = u64; const LOG_TARGET: &str = "xcmp_queue"; const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB - // Maximum amount of messages to process per block. This is a temporary measure until we properly - // account for proof size weights. + +// Maximum amount of messages to process per block. This is a temporary measure until we properly +// account for proof size weights. const MAX_MESSAGES_PER_BLOCK: u8 = 10; +// Maximum amount of messages that can exist in the overweight queue at any given time. +const MAX_OVERWEIGHT_MESSAGES: u32 = 1000; #[frame_support::pallet] pub mod pallet { @@ -366,7 +369,7 @@ pub mod pallet { /// `service_overweight`. #[pallet::storage] pub(super) type Overweight = - StorageMap<_, Twox64Concat, OverweightIndex, (ParaId, RelayBlockNumber, Vec)>; + CountedStorageMap<_, Twox64Concat, OverweightIndex, (ParaId, RelayBlockNumber, Vec)>; /// The number of overweight messages ever recorded in `Overweight`. Also doubles as the next /// available free overweight index. @@ -686,20 +689,27 @@ impl Pallet { Err(XcmError::WeightLimitReached(required)) if required > max_individual_weight.ref_time() => { - // overweight - add to overweight queue and continue with message - // execution consuming the message. - let msg_len = last_remaining_fragments - .len() - .saturating_sub(remaining_fragments.len()); - let overweight_xcm = last_remaining_fragments[..msg_len].to_vec(); - let index = Self::stash_overweight(sender, sent_at, overweight_xcm); - let e = Event::OverweightEnqueued { - sender, - sent_at, - index, - required: Weight::from_ref_time(required), - }; - Self::deposit_event(e); + let is_under_limit = + Overweight::::count() < MAX_OVERWEIGHT_MESSAGES; + weight_used.saturating_accrue(T::DbWeight::get().reads(1)); + if is_under_limit { + // overweight - add to overweight queue and continue with message + // execution consuming the message. + let msg_len = last_remaining_fragments + .len() + .saturating_sub(remaining_fragments.len()); + let overweight_xcm = + last_remaining_fragments[..msg_len].to_vec(); + let index = + Self::stash_overweight(sender, sent_at, overweight_xcm); + let e = Event::OverweightEnqueued { + sender, + sent_at, + index, + required: Weight::from_ref_time(required), + }; + Self::deposit_event(e); + } }, Err(XcmError::WeightLimitReached(required)) if required <= max_weight.ref_time() => diff --git a/pallets/xcmp-queue/src/migration.rs b/pallets/xcmp-queue/src/migration.rs index 94479fce8f5..86f6a2a0ec2 100644 --- a/pallets/xcmp-queue/src/migration.rs +++ b/pallets/xcmp-queue/src/migration.rs @@ -33,8 +33,15 @@ pub fn migrate_to_latest() -> Weight { let mut weight = T::DbWeight::get().reads(1); if StorageVersion::get::>() == 1 { - weight += migrate_to_v2::(); + weight.saturating_accrue(migrate_to_v2::()); StorageVersion::new(2).put::>(); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + } + + if StorageVersion::get::>() == 2 { + weight.saturating_accrue(migrate_to_v3::()); + StorageVersion::new(3).put::>(); + weight.saturating_accrue(T::DbWeight::get().writes(1)); } weight @@ -98,6 +105,12 @@ pub fn migrate_to_v2() -> Weight { T::DbWeight::get().reads_writes(1, 1) } +pub fn migrate_to_v3() -> Weight { + let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + + T::DbWeight::get().reads_writes(overweight_messages, 1) +} + #[cfg(test)] mod tests { use super::*; From e19637747b37044c7a334801252039e8e815267d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 8 Nov 2022 14:57:49 +0100 Subject: [PATCH 062/119] Fix for missing weight for `fn unpaid_execution()` --- parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs | 3 +++ .../statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs | 1 + parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs | 3 +++ .../statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs | 1 + parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs | 3 +++ .../westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs | 1 + 6 files changed, 12 insertions(+) diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 0ca8a414e44..93e12e826fd 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -241,4 +241,7 @@ impl XcmWeightInfo for StatemineXcmWeight { // XCM Executor does not currently support alias origin operations Weight::MAX.ref_time() } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { + XcmGeneric::::unpaid_execution().ref_time() + } } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 20fdd109ef7..76c40db7914 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -185,4 +185,5 @@ impl WeightInfo { pub(crate) fn set_fees_mode() -> Weight { Weight::from_ref_time(6_426_000 as u64) } + pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index 512be255779..bd6c9bbc097 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -241,4 +241,7 @@ impl XcmWeightInfo for StatemintXcmWeight { // XCM Executor does not currently support alias origin operations Weight::MAX.ref_time() } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { + XcmGeneric::::unpaid_execution().ref_time() + } } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 5e35b4084d0..79066a2b9e5 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -185,4 +185,5 @@ impl WeightInfo { pub(crate) fn set_fees_mode() -> Weight { Weight::from_ref_time(6_336_000 as u64) } + pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 56852eee6ab..8429b74f2ec 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -241,4 +241,7 @@ impl XcmWeightInfo for WestmintXcmWeight { // XCM Executor does not currently support alias origin operations Weight::MAX.ref_time() } + fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { + XcmGeneric::::unpaid_execution().ref_time() + } } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 18761aa0bf2..e6f01884049 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -185,4 +185,5 @@ impl WeightInfo { pub(crate) fn set_fees_mode() -> Weight { Weight::from_ref_time(6_392_000 as u64) } + pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } From aea33d16406809c33f1bc8307860ce4149a9a9e3 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 20 Nov 2022 00:09:03 +0100 Subject: [PATCH 063/119] Fix - usage of `messages_processed` --- pallets/xcmp-queue/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 6bd7ee31827..2470c5d4128 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -887,6 +887,7 @@ impl Pallet { let (weight_processed, is_empty) = Self::process_xcmp_message( sender, status[index].message_metadata[0], + &mut messages_processed, weight_remaining, xcmp_max_individual_weight, ); From 196ad14ae6536f8edcef109b3aa060df17d684cf Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 17:30:01 +0900 Subject: [PATCH 064/119] Fixes --- pallets/dmp-queue/src/lib.rs | 30 +++++++++++++----------------- pallets/dmp-queue/src/migration.rs | 3 +-- pallets/xcm/src/lib.rs | 8 ++++---- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 98ce03b9693..77d8007478d 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -33,10 +33,7 @@ pub use pallet::*; use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XcmWeight}, - VersionedXcm, MAX_XCM_DECODE_DEPTH, -}; +use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; const DEFAULT_POV_SIZE: u64 = 64 * 1024; // 64 KB @@ -167,17 +164,17 @@ pub mod pallet { /// /// Events: /// - `OverweightServiced`: On success. - #[pallet::weight(Weight::from_ref_time(weight_limit.saturating_add(1_000_000)))] + #[pallet::weight(weight_limit.saturating_add(Weight::from_ref_time(1_000_000)))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, - weight_limit: XcmWeight, + weight_limit: Weight, ) -> DispatchResultWithPostInfo { T::ExecuteOverweightOrigin::ensure_origin(origin)?; let (sent_at, data) = Overweight::::get(index).ok_or(Error::::Unknown)?; let weight_used = - Self::try_service_message(Weight::from_ref_time(weight_limit), sent_at, &data[..]) + Self::try_service_message(weight_limit, sent_at, &data[..]) .map_err(|_| Error::::OverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { overweight_index: index, weight_used }); @@ -281,14 +278,13 @@ pub mod pallet { }, Ok(Ok(x)) => { let outcome = - T::XcmExecutor::execute_xcm(Parent, x, message_id, limit.ref_time()); + T::XcmExecutor::execute_xcm(Parent, x, message_id, limit); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => - Err((message_id, Weight::from_ref_time(required))), + Err((message_id, required)), outcome => { - let weight_used = Weight::from_ref_time(outcome.weight_used()); Self::deposit_event(Event::ExecutedDownward { message_id, outcome }); - Ok(weight_used) + Ok(outcome.weight_used()) }, } }, @@ -398,7 +394,7 @@ mod tests { }; use sp_version::RuntimeVersion; use std::cell::RefCell; - use xcm::latest::{MultiLocation, OriginKind, Weight as XCMWeight}; + use xcm::latest::{MultiLocation, OriginKind}; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -475,7 +471,7 @@ mod tests { pub enum Weightless {} impl PreparedMessage for Weightless { - fn weight_of(&self) -> XCMWeight { + fn weight_of(&self) -> u64 { unreachable!() } } @@ -492,7 +488,7 @@ mod tests { _origin: impl Into, _: Weightless, _hash: XcmHash, - _weight_limit: XCMWeight, + _weight_limit: u64, ) -> Outcome { unreachable!() } @@ -534,7 +530,7 @@ mod tests { DmpQueue::handle_dmp_messages(iter, limit) } - fn msg(weight: XCMWeight) -> Xcm { + fn msg(weight: u64) -> Xcm { Xcm(vec![Transact { origin_kind: OriginKind::Native, require_weight_at_most: weight, @@ -542,11 +538,11 @@ mod tests { }]) } - fn msg_complete(weight: XCMWeight) -> (Xcm, Outcome) { + fn msg_complete(weight: u64) -> (Xcm, Outcome) { (msg(weight), Outcome::Complete(weight)) } - fn msg_limit_reached(weight: XCMWeight) -> (Xcm, Outcome) { + fn msg_limit_reached(weight: u64) -> (Xcm, Outcome) { (msg(weight), Outcome::Error(XcmError::WeightLimitReached(weight))) } diff --git a/pallets/dmp-queue/src/migration.rs b/pallets/dmp-queue/src/migration.rs index 1257508af2d..2bcfca114bf 100644 --- a/pallets/dmp-queue/src/migration.rs +++ b/pallets/dmp-queue/src/migration.rs @@ -22,7 +22,6 @@ use frame_support::{ traits::StorageVersion, weights::{constants::WEIGHT_PER_MILLIS, Weight}, }; -use xcm::latest::Weight as XcmWeight; /// The current storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); @@ -53,7 +52,7 @@ mod v0 { #[derive(Decode, Encode, Debug)] pub struct ConfigData { - pub max_individual: XcmWeight, + pub max_individual: u64, } impl Default for ConfigData { diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index bd015dce171..4608ecc46ac 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -123,8 +123,8 @@ impl DmpMessageHandler for UnlimitedDmpExecution { Err(_) => Pallet::::deposit_event(Event::InvalidFormat(id)), Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { - let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit.ref_time()); - used += Weight::from_ref_time(outcome.weight_used()); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit); + used = used.saturating_add(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, } @@ -158,8 +158,8 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { Ok(Ok(x)) => { let weight_limit = limit.saturating_sub(used); let outcome = - T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit.ref_time()); - used += Weight::from_ref_time(outcome.weight_used()); + T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit); + used = used.saturating_add(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, } From 331b21e894d825e09ece623a1c9d91f2cd4caa7a Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 17:30:31 +0900 Subject: [PATCH 065/119] Fixes --- pallets/dmp-queue/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 77d8007478d..10ed7d89479 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -793,31 +793,31 @@ mod tests { assert_eq!(overweights(), vec![0]); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::signed(1), 0, 20000), + DmpQueue::service_overweight(RuntimeOrigin::signed(1), 0, Weight::from_parts(20000, 20000)), BadOrigin ); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 1, 20000), + DmpQueue::service_overweight(RuntimeOrigin::root(), 1, Weight::from_parts(20000, 20000)), Error::::Unknown ); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 0, 9999), + DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(9999, 9999)), Error::::OverLimit ); assert_eq!(take_trace(), vec![msg_limit_reached(10000)]); - let base_weight = super::Call::::service_overweight { index: 0, weight_limit: 0 } + let base_weight = super::Call::::service_overweight { index: 0, weight_limit: Weight::zero() } .get_dispatch_info() .weight; use frame_support::dispatch::GetDispatchInfo; - let info = DmpQueue::service_overweight(RuntimeOrigin::root(), 0, 20000).unwrap(); + let info = DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(20000, 20000)).unwrap(); let actual_weight = info.actual_weight.unwrap(); assert_eq!(actual_weight, base_weight + Weight::from_ref_time(10000)); assert_eq!(take_trace(), vec![msg_complete(10000)]); assert!(overweights().is_empty()); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 0, 20000), + DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(20000, 20000)), Error::::Unknown ); }); From b613a35c7910a934970dd32951be249b36fc66a8 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 17:42:29 +0900 Subject: [PATCH 066/119] Fixes --- pallets/dmp-queue/src/lib.rs | 105 +++++++++++++++++------------ pallets/xcm/src/lib.rs | 3 +- parachains/pallets/ping/src/lib.rs | 2 +- 3 files changed, 65 insertions(+), 45 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 10ed7d89479..8833b938abf 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -173,9 +173,8 @@ pub mod pallet { T::ExecuteOverweightOrigin::ensure_origin(origin)?; let (sent_at, data) = Overweight::::get(index).ok_or(Error::::Unknown)?; - let weight_used = - Self::try_service_message(weight_limit, sent_at, &data[..]) - .map_err(|_| Error::::OverLimit)?; + let weight_used = Self::try_service_message(weight_limit, sent_at, &data[..]) + .map_err(|_| Error::::OverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { overweight_index: index, weight_used }); Ok(Some(weight_used.saturating_add(Weight::from_ref_time(1_000_000))).into()) @@ -277,14 +276,14 @@ pub mod pallet { Ok(Weight::zero()) }, Ok(Ok(x)) => { - let outcome = - T::XcmExecutor::execute_xcm(Parent, x, message_id, limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, message_id, limit); match outcome { Outcome::Error(XcmError::WeightLimitReached(required)) => Err((message_id, required)), outcome => { + let weight_used = outcome.weight_used(); Self::deposit_event(Event::ExecutedDownward { message_id, outcome }); - Ok(outcome.weight_used()) + Ok(weight_used) }, } }, @@ -471,7 +470,7 @@ mod tests { pub enum Weightless {} impl PreparedMessage for Weightless { - fn weight_of(&self) -> u64 { + fn weight_of(&self) -> Weight { unreachable!() } } @@ -488,7 +487,7 @@ mod tests { _origin: impl Into, _: Weightless, _hash: XcmHash, - _weight_limit: u64, + _weight_limit: Weight, ) -> Outcome { unreachable!() } @@ -533,17 +532,17 @@ mod tests { fn msg(weight: u64) -> Xcm { Xcm(vec![Transact { origin_kind: OriginKind::Native, - require_weight_at_most: weight, + require_weight_at_most: Weight::from_parts(weight, weight), call: Vec::new().into(), }]) } fn msg_complete(weight: u64) -> (Xcm, Outcome) { - (msg(weight), Outcome::Complete(weight)) + (msg(weight), Outcome::Complete(Weight::from_ref_time(weight))) } fn msg_limit_reached(weight: u64) -> (Xcm, Outcome) { - (msg(weight), Outcome::Error(XcmError::WeightLimitReached(weight))) + (msg(weight), Outcome::Error(XcmError::WeightLimitReached(Weight::from_ref_time(weight)))) } fn pages_queued() -> PageCounter { @@ -563,7 +562,7 @@ mod tests { #[test] fn basic_setup_works() { new_test_ext().execute_with(|| { - let weight_used = handle_messages(&[], Weight::from_ref_time(1000)); + let weight_used = handle_messages(&[], Weight::from_parts(1000, 1000)); assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), Vec::new()); assert!(queue_is_empty()); @@ -574,7 +573,7 @@ mod tests { fn service_inline_complete_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001)]; - let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_complete(1001)]); assert!(queue_is_empty()); @@ -586,7 +585,7 @@ mod tests { new_test_ext().execute_with(|| { let enqueued = vec![msg(1000), msg(1001), msg(1002)]; enqueue(&enqueued); - let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), @@ -599,7 +598,7 @@ mod tests { fn enqueue_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001), msg(1002)]; - let weight_used = handle_messages(&incoming, Weight::from_ref_time(999)); + let weight_used = handle_messages(&incoming, Weight::from_parts(999, 999)); assert_eq!(weight_used, Weight::zero()); assert_eq!( PageIndex::::get(), @@ -608,14 +607,14 @@ mod tests { assert_eq!(Pages::::get(0).len(), 3); assert_eq!(take_trace(), vec![msg_limit_reached(1000)]); - let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),] ); - let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(1002)); assert_eq!(take_trace(), vec![msg_complete(1002),]); assert!(queue_is_empty()); @@ -626,13 +625,13 @@ mod tests { fn service_inline_then_enqueue_works() { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001), msg(1002)]; - let weight_used = handle_messages(&incoming, Weight::from_ref_time(1500)); + let weight_used = handle_messages(&incoming, Weight::from_parts(1500, 1500)); assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(pages_queued(), 1); assert_eq!(Pages::::get(0).len(), 2); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); - let weight_used = handle_messages(&[], Weight::from_ref_time(2500)); + let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(2003)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_complete(1002),]); assert!(queue_is_empty()); @@ -645,7 +644,7 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); assert_eq!(weight_used, Weight::from_ref_time(4006)); assert_eq!( take_trace(), @@ -666,18 +665,18 @@ mod tests { let enqueued = vec![msg(1000), msg(10001)]; let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(10001),]); assert_eq!(pages_queued(), 2); // 5000 is not enough to process the 10001 blocker, so nothing happens. - let weight_used = handle_messages(&[], Weight::from_ref_time(5000)); + let weight_used = handle_messages(&[], Weight::from_parts(5000, 5000)); assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), vec![msg_limit_reached(10001),]); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); assert_eq!(weight_used, Weight::from_ref_time(12006)); assert_eq!( take_trace(), @@ -693,7 +692,7 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(10002), msg(1003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); assert_eq!(weight_used, Weight::from_ref_time(2001)); assert_eq!( take_trace(), @@ -702,7 +701,7 @@ mod tests { assert_eq!(pages_queued(), 1); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); assert_eq!(weight_used, Weight::from_ref_time(11005)); assert_eq!(take_trace(), vec![msg_complete(10002), msg_complete(1003),]); assert!(queue_is_empty()); @@ -715,7 +714,7 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; let incoming = vec![msg(1002), msg(10003)]; enqueue(&enqueued); - let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000)); + let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); assert_eq!(weight_used, Weight::from_ref_time(3003)); assert_eq!( take_trace(), @@ -729,7 +728,7 @@ mod tests { assert_eq!(pages_queued(), 1); // 20000 is now enough to process everything. - let weight_used = handle_messages(&[], Weight::from_ref_time(20000)); + let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); assert_eq!(weight_used, Weight::from_ref_time(10003)); assert_eq!(take_trace(), vec![msg_complete(10003),]); assert!(queue_is_empty()); @@ -741,19 +740,19 @@ mod tests { new_test_ext().execute_with(|| { let enqueued = vec![msg(1000), msg(1001)]; enqueue(&enqueued); - let weight_used = handle_messages(&vec![msg(1002)], Weight::from_ref_time(1500)); + let weight_used = handle_messages(&vec![msg(1002)], Weight::from_parts(1500, 1500)); assert_eq!(weight_used, Weight::from_ref_time(1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 0); - let weight_used = handle_messages(&vec![msg(1003)], Weight::from_ref_time(1500)); + let weight_used = handle_messages(&vec![msg(1003)], Weight::from_parts(1500, 1500)); assert_eq!(weight_used, Weight::from_ref_time(1001)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_limit_reached(1002),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 1); - let weight_used = handle_messages(&vec![msg(1004)], Weight::from_ref_time(1500)); + let weight_used = handle_messages(&vec![msg(1004)], Weight::from_parts(1500, 1500)); assert_eq!(weight_used, Weight::from_ref_time(1002)); assert_eq!(take_trace(), vec![msg_complete(1002), msg_limit_reached(1003),]); assert_eq!(pages_queued(), 2); @@ -765,10 +764,10 @@ mod tests { fn overweight_should_not_block_queue() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: Weight::from_ref_time(9999) }); + Configuration::::put(ConfigData { max_individual: Weight::from_parts(9999, 9999) }); let incoming = vec![msg(1000), msg(10001), msg(1002)]; - let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::from_ref_time(2002)); assert!(queue_is_empty()); assert_eq!( @@ -784,40 +783,62 @@ mod tests { fn overweights_should_be_manually_executable() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: Weight::from_ref_time(9999) }); + Configuration::::put(ConfigData { max_individual: Weight::from_parts(9999, 9999) }); let incoming = vec![msg(10000)]; - let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500)); + let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); assert_eq!(weight_used, Weight::zero()); assert_eq!(take_trace(), vec![msg_limit_reached(10000)]); assert_eq!(overweights(), vec![0]); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::signed(1), 0, Weight::from_parts(20000, 20000)), + DmpQueue::service_overweight( + RuntimeOrigin::signed(1), + 0, + Weight::from_parts(20000, 20000) + ), BadOrigin ); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 1, Weight::from_parts(20000, 20000)), + DmpQueue::service_overweight( + RuntimeOrigin::root(), + 1, + Weight::from_parts(20000, 20000) + ), Error::::Unknown ); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(9999, 9999)), + DmpQueue::service_overweight( + RuntimeOrigin::root(), + 0, + Weight::from_parts(9999, 9999) + ), Error::::OverLimit ); assert_eq!(take_trace(), vec![msg_limit_reached(10000)]); - let base_weight = super::Call::::service_overweight { index: 0, weight_limit: Weight::zero() } - .get_dispatch_info() - .weight; + let base_weight = + super::Call::::service_overweight { index: 0, weight_limit: Weight::zero() } + .get_dispatch_info() + .weight; use frame_support::dispatch::GetDispatchInfo; - let info = DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(20000, 20000)).unwrap(); + let info = DmpQueue::service_overweight( + RuntimeOrigin::root(), + 0, + Weight::from_parts(20000, 20000), + ) + .unwrap(); let actual_weight = info.actual_weight.unwrap(); assert_eq!(actual_weight, base_weight + Weight::from_ref_time(10000)); assert_eq!(take_trace(), vec![msg_complete(10000)]); assert!(overweights().is_empty()); assert_noop!( - DmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(20000, 20000)), + DmpQueue::service_overweight( + RuntimeOrigin::root(), + 0, + Weight::from_parts(20000, 20000) + ), Error::::Unknown ); }); diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 4608ecc46ac..1bcfcdcce73 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -157,8 +157,7 @@ impl DmpMessageHandler for LimitAndDropDmpExecution { Ok(Err(())) => Pallet::::deposit_event(Event::UnsupportedVersion(id)), Ok(Ok(x)) => { let weight_limit = limit.saturating_sub(used); - let outcome = - T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit); + let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, weight_limit); used = used.saturating_add(outcome.weight_used()); Pallet::::deposit_event(Event::ExecutedDownward(id, outcome)); }, diff --git a/parachains/pallets/ping/src/lib.rs b/parachains/pallets/ping/src/lib.rs index 5d509a86a0a..76009fac5c1 100644 --- a/parachains/pallets/ping/src/lib.rs +++ b/parachains/pallets/ping/src/lib.rs @@ -107,7 +107,7 @@ pub mod pallet { (Parent, Junction::Parachain(para.into())).into(), Xcm(vec![Transact { origin_kind: OriginKind::Native, - require_weight_at_most: 1_000, + require_weight_at_most: Weight::from_parts(1_000, 1_000), call: ::RuntimeCall::from(Call::::ping { seq, payload: payload.clone().to_vec(), From 930b98847283c4c2454751b5ba40839c37d67feb Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 17:46:32 +0900 Subject: [PATCH 067/119] cargo fmt --- pallets/dmp-queue/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 8833b938abf..68e0f4a7427 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -764,7 +764,9 @@ mod tests { fn overweight_should_not_block_queue() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: Weight::from_parts(9999, 9999) }); + Configuration::::put(ConfigData { + max_individual: Weight::from_parts(9999, 9999), + }); let incoming = vec![msg(1000), msg(10001), msg(1002)]; let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); @@ -783,7 +785,9 @@ mod tests { fn overweights_should_be_manually_executable() { new_test_ext().execute_with(|| { // Set the overweight threshold to 9999. - Configuration::::put(ConfigData { max_individual: Weight::from_parts(9999, 9999) }); + Configuration::::put(ConfigData { + max_individual: Weight::from_parts(9999, 9999), + }); let incoming = vec![msg(10000)]; let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); From cd1452b7a3b4fbb63e25140c3097f5892407a1b1 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 17:51:45 +0900 Subject: [PATCH 068/119] Fixes --- parachains/pallets/ping/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/pallets/ping/src/lib.rs b/parachains/pallets/ping/src/lib.rs index 76009fac5c1..80b731119fb 100644 --- a/parachains/pallets/ping/src/lib.rs +++ b/parachains/pallets/ping/src/lib.rs @@ -203,7 +203,7 @@ pub mod pallet { (Parent, Junction::Parachain(para.into())).into(), Xcm(vec![Transact { origin_kind: OriginKind::Native, - require_weight_at_most: 1_000, + require_weight_at_most: Weight::from_parts(1_000, 1_000), call: ::RuntimeCall::from(Call::::pong { seq, payload: payload.clone(), From a0865d8102f92dfdb40482278687b18ebcbefc37 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 19:07:39 +0900 Subject: [PATCH 069/119] Fixes --- pallets/xcmp-queue/src/lib.rs | 46 +++++++++++------------------ pallets/xcmp-queue/src/migration.rs | 7 ++--- primitives/utility/src/lib.rs | 13 ++------ 3 files changed, 24 insertions(+), 42 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 2470c5d4128..09565f490d0 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -55,10 +55,7 @@ use rand_chacha::{ use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XcmWeight}, - VersionedXcm, WrapVersion, MAX_XCM_DECODE_DEPTH, -}; +use xcm::{latest::{prelude::*}, VersionedXcm, WrapVersion, MAX_XCM_DECODE_DEPTH}; use xcm_executor::traits::ConvertOrigin; pub use pallet::*; @@ -144,11 +141,11 @@ pub mod pallet { /// /// Events: /// - `OverweightServiced`: On success. - #[pallet::weight((Weight::from_ref_time(weight_limit.saturating_add(1_000_000)), DispatchClass::Operational,))] + #[pallet::weight((weight_limit.saturating_add(Weight::from_ref_time(1_000_000)), DispatchClass::Operational,))] pub fn service_overweight( origin: OriginFor, index: OverweightIndex, - weight_limit: XcmWeight, + weight_limit: Weight, ) -> DispatchResultWithPostInfo { T::ExecuteOverweightOrigin::ensure_origin(origin)?; @@ -160,7 +157,7 @@ pub mod pallet { ) .map_err(|_| Error::::BadXcm)?; let used = - Self::handle_xcm_message(sender, sent_at, xcm, Weight::from_ref_time(weight_limit)) + Self::handle_xcm_message(sender, sent_at, xcm, weight_limit) .map_err(|_| Error::::WeightOverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { index, used }); @@ -237,9 +234,9 @@ pub mod pallet { /// - `origin`: Must pass `Root`. /// - `new`: Desired value for `QueueConfigData.threshold_weight` #[pallet::weight((T::WeightInfo::set_config_with_weight(), DispatchClass::Operational,))] - pub fn update_threshold_weight(origin: OriginFor, new: XcmWeight) -> DispatchResult { + pub fn update_threshold_weight(origin: OriginFor, new: Weight) -> DispatchResult { ensure_root(origin)?; - QueueConfig::::mutate(|data| data.threshold_weight = Weight::from_ref_time(new)); + QueueConfig::::mutate(|data| data.threshold_weight = new); Ok(()) } @@ -250,14 +247,9 @@ pub mod pallet { /// - `origin`: Must pass `Root`. /// - `new`: Desired value for `QueueConfigData.weight_restrict_decay`. #[pallet::weight((T::WeightInfo::set_config_with_weight(), DispatchClass::Operational,))] - pub fn update_weight_restrict_decay( - origin: OriginFor, - new: XcmWeight, - ) -> DispatchResult { + pub fn update_weight_restrict_decay(origin: OriginFor, new: Weight) -> DispatchResult { ensure_root(origin)?; - QueueConfig::::mutate(|data| { - data.weight_restrict_decay = Weight::from_ref_time(new) - }); + QueueConfig::::mutate(|data| data.weight_restrict_decay = new); Ok(()) } @@ -270,12 +262,10 @@ pub mod pallet { #[pallet::weight((T::WeightInfo::set_config_with_weight(), DispatchClass::Operational,))] pub fn update_xcmp_max_individual_weight( origin: OriginFor, - new: XcmWeight, + new: Weight, ) -> DispatchResult { ensure_root(origin)?; - QueueConfig::::mutate(|data| { - data.xcmp_max_individual_weight = Weight::from_ref_time(new) - }); + QueueConfig::::mutate(|data| data.xcmp_max_individual_weight = new); Ok(()) } @@ -630,26 +620,26 @@ impl Pallet { Ok(xcm) => { let location = (Parent, Parachain(sender.into())); - match T::XcmExecutor::execute_xcm(location, xcm, hash, max_weight.ref_time()) { + match T::XcmExecutor::execute_xcm(location, xcm, hash, max_weight) { Outcome::Error(e) => ( Err(e), Event::Fail { message_hash: Some(hash), error: e, weight: Weight::zero() }, ), Outcome::Complete(w) => ( - Ok(Weight::from_ref_time(w)), + Ok(w), Event::Success { message_hash: Some(hash), - weight: Weight::from_ref_time(w), + weight: w, }, ), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. Outcome::Incomplete(w, e) => ( - Ok(Weight::from_ref_time(w)), + Ok(w), Event::Fail { message_hash: Some(hash), error: e, - weight: Weight::from_ref_time(w), + weight: w, }, ), } @@ -687,7 +677,7 @@ impl Pallet { match Self::handle_xcm_message(sender, sent_at, xcm, weight) { Ok(used) => weight_used = weight_used.saturating_add(used), Err(XcmError::WeightLimitReached(required)) - if required > max_individual_weight.ref_time() => + if required.any_gt(max_individual_weight) => { let is_under_limit = Overweight::::count() < MAX_OVERWEIGHT_MESSAGES; @@ -706,13 +696,13 @@ impl Pallet { sender, sent_at, index, - required: Weight::from_ref_time(required), + required, }; Self::deposit_event(e); } }, Err(XcmError::WeightLimitReached(required)) - if required <= max_weight.ref_time() => + if required.all_lte(max_weight) => { // That message didn't get processed this time because of being // too heavy. We leave it around for next time and bail. diff --git a/pallets/xcmp-queue/src/migration.rs b/pallets/xcmp-queue/src/migration.rs index 86f6a2a0ec2..8b73320030f 100644 --- a/pallets/xcmp-queue/src/migration.rs +++ b/pallets/xcmp-queue/src/migration.rs @@ -22,7 +22,6 @@ use frame_support::{ traits::StorageVersion, weights::{constants::WEIGHT_PER_MILLIS, Weight}, }; -use xcm::latest::Weight as XcmWeight; /// The current storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); @@ -56,9 +55,9 @@ mod v1 { pub suspend_threshold: u32, pub drop_threshold: u32, pub resume_threshold: u32, - pub threshold_weight: XcmWeight, - pub weight_restrict_decay: XcmWeight, - pub xcmp_max_individual_weight: XcmWeight, + pub threshold_weight: u64, + pub weight_restrict_decay: u64, + pub xcmp_max_individual_weight: u64, } impl Default for QueueConfigData { diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 5cededd7b46..05926a52955 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -31,10 +31,7 @@ use frame_support::{ use polkadot_runtime_common::xcm_sender::ConstantPrice; use sp_runtime::{traits::Saturating, SaturatedConversion}; use sp_std::{marker::PhantomData, prelude::*}; -use xcm::{ - latest::{prelude::*, Weight as XCMWeight}, - WrapVersion, -}; +use xcm::{latest::{prelude::*}, WrapVersion}; use xcm_builder::TakeRevenue; use xcm_executor::traits::{MatchesFungibles, TransactAsset, WeightTrader}; @@ -151,7 +148,7 @@ impl< // If everything goes well, we charge. fn buy_weight( &mut self, - weight: XCMWeight, + weight: Weight, payment: xcm_executor::Assets, ) -> Result { log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::buy_weight weight: {:?}, payment: {:?}", weight, payment); @@ -161,8 +158,6 @@ impl< return Err(XcmError::NotWithdrawable) } - let weight = Weight::from_ref_time(weight); - // We take the very first multiasset from payment let multiassets: MultiAssets = payment.clone().into(); @@ -203,15 +198,13 @@ impl< Ok(unused) } - fn refund_weight(&mut self, weight: XCMWeight) -> Option { + fn refund_weight(&mut self, weight: Weight) -> Option { log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::refund_weight weight: {:?}", weight); if let Some(AssetTraderRefunder { mut weight_outstanding, outstanding_concrete_asset: MultiAsset { id, fun }, }) = self.0.clone() { - let weight = Weight::from_ref_time(weight).min(weight_outstanding); - // Get the local asset id in which we can refund fees let (local_asset_id, outstanding_balance) = Matcher::matches_fungibles(&(id.clone(), fun).into()).ok()?; From 3fdf0785f0401fe2a00b8be3817e82d96fa8b353 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 22 Nov 2022 22:54:41 +0900 Subject: [PATCH 070/119] Fixes --- pallets/xcmp-queue/src/lib.rs | 26 +-- .../assets/statemine/src/weights/xcm/mod.rs | 200 +++++++++-------- .../assets/statemint/src/weights/xcm/mod.rs | 202 +++++++++--------- .../assets/westmint/src/weights/xcm/mod.rs | 200 +++++++++-------- primitives/utility/src/lib.rs | 2 +- 5 files changed, 297 insertions(+), 333 deletions(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 09565f490d0..bba6ad67a00 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -55,7 +55,7 @@ use rand_chacha::{ use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{convert::TryFrom, prelude::*}; -use xcm::{latest::{prelude::*}, VersionedXcm, WrapVersion, MAX_XCM_DECODE_DEPTH}; +use xcm::{latest::prelude::*, VersionedXcm, WrapVersion, MAX_XCM_DECODE_DEPTH}; use xcm_executor::traits::ConvertOrigin; pub use pallet::*; @@ -156,9 +156,8 @@ pub mod pallet { &mut data.as_slice(), ) .map_err(|_| Error::::BadXcm)?; - let used = - Self::handle_xcm_message(sender, sent_at, xcm, weight_limit) - .map_err(|_| Error::::WeightOverLimit)?; + let used = Self::handle_xcm_message(sender, sent_at, xcm, weight_limit) + .map_err(|_| Error::::WeightOverLimit)?; Overweight::::remove(index); Self::deposit_event(Event::OverweightServiced { index, used }); Ok(Some(used.saturating_add(Weight::from_ref_time(1_000_000))).into()) @@ -625,23 +624,12 @@ impl Pallet { Err(e), Event::Fail { message_hash: Some(hash), error: e, weight: Weight::zero() }, ), - Outcome::Complete(w) => ( - Ok(w), - Event::Success { - message_hash: Some(hash), - weight: w, - }, - ), + Outcome::Complete(w) => + (Ok(w), Event::Success { message_hash: Some(hash), weight: w }), // As far as the caller is concerned, this was dispatched without error, so // we just report the weight used. - Outcome::Incomplete(w, e) => ( - Ok(w), - Event::Fail { - message_hash: Some(hash), - error: e, - weight: w, - }, - ), + Outcome::Incomplete(w, e) => + (Ok(w), Event::Fail { message_hash: Some(hash), error: e, weight: w }), } }, Err(()) => diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 93e12e826fd..9ea341c9c37 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -22,178 +22,170 @@ 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 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 { + Weight::MAX } - 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, + _max_weight: &Weight, _querier: &Option, - ) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + ) -> 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_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _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, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset( - _give: &MultiAssetFilter, - _receive: &MultiAssets, - _maximal: &bool, - ) -> XCMWeight { + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { Weight::MAX.ref_time() } 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 report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight { - XcmGeneric::::report_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn clear_error() -> Weight { + XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() } - fn burn_asset(assets: &MultiAssets) -> XCMWeight { + fn burn_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::burn_asset()) } - fn expect_asset(assets: &MultiAssets) -> XCMWeight { + fn expect_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::expect_asset()) } - fn expect_origin(_origin: &Option) -> XCMWeight { - XcmGeneric::::expect_origin().ref_time() + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() } - fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { - XcmGeneric::::expect_error().ref_time() + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() } - fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::query_pallet().ref_time() + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() } fn expect_pallet( _index: &u32, @@ -201,47 +193,47 @@ impl XcmWeightInfo for StatemineXcmWeight { _module_name: &Vec, _crate_major: &u32, _min_crate_minor: &u32, - ) -> XCMWeight { - XcmGeneric::::expect_pallet().ref_time() + ) -> Weight { + XcmGeneric::::expect_pallet() } - fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_transact_status().ref_time() + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() } - fn clear_transact_status() -> XCMWeight { - XcmGeneric::::clear_transact_status().ref_time() + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() } - fn universal_origin(_: &Junction) -> XCMWeight { - Weight::MAX.ref_time() + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { - Weight::MAX.ref_time() + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_fees_mode(_: &bool) -> XCMWeight { - XcmGeneric::::set_fees_mode().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn set_topic(_topic: &[u8; 32]) -> XCMWeight { - XcmGeneric::::set_topic().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn clear_topic() -> XCMWeight { - XcmGeneric::::clear_topic().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn alias_origin(_: &MultiLocation) -> XCMWeight { + fn alias_origin(_: &MultiLocation) -> Weight { // XCM Executor does not currently support alias origin operations - Weight::MAX.ref_time() + Weight::MAX } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { - XcmGeneric::::unpaid_execution().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index bd6c9bbc097..f440f7b769a 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -22,178 +22,170 @@ 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 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 { + Weight::MAX } - 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, + _max_weight: &Weight, _querier: &Option, - ) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + ) -> 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_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _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, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset( - _give: &MultiAssetFilter, - _receive: &MultiAssets, - _maximal: &bool, - ) -> 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 report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight { - XcmGeneric::::report_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn clear_error() -> Weight { + XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() } - fn burn_asset(assets: &MultiAssets) -> XCMWeight { + fn burn_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::burn_asset()) } - fn expect_asset(assets: &MultiAssets) -> XCMWeight { + fn expect_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::expect_asset()) } - fn expect_origin(_origin: &Option) -> XCMWeight { - XcmGeneric::::expect_origin().ref_time() + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() } - fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { - XcmGeneric::::expect_error().ref_time() + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() } - fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::query_pallet().ref_time() + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() } fn expect_pallet( _index: &u32, @@ -201,47 +193,47 @@ impl XcmWeightInfo for StatemintXcmWeight { _module_name: &Vec, _crate_major: &u32, _min_crate_minor: &u32, - ) -> XCMWeight { - XcmGeneric::::expect_pallet().ref_time() + ) -> Weight { + XcmGeneric::::expect_pallet() } - fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_transact_status().ref_time() + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() } - fn clear_transact_status() -> XCMWeight { - XcmGeneric::::clear_transact_status().ref_time() + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() } - fn universal_origin(_: &Junction) -> XCMWeight { - Weight::MAX.ref_time() + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { - Weight::MAX.ref_time() + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_fees_mode(_: &bool) -> XCMWeight { - XcmGeneric::::set_fees_mode().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn set_topic(_topic: &[u8; 32]) -> XCMWeight { - XcmGeneric::::set_topic().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn clear_topic() -> XCMWeight { - XcmGeneric::::clear_topic().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn alias_origin(_: &MultiLocation) -> XCMWeight { + fn alias_origin(_: &MultiLocation) -> Weight { // XCM Executor does not currently support alias origin operations - Weight::MAX.ref_time() + Weight::MAX } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { - XcmGeneric::::unpaid_execution().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 8429b74f2ec..0726040167c 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -22,178 +22,170 @@ 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 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 { + Weight::MAX } - 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, + _max_weight: &Weight, _querier: &Option, - ) -> XCMWeight { - XcmGeneric::::query_response().ref_time() + ) -> 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_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_error().ref_time() + fn report_error(_query_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_error() } - fn deposit_asset(assets: &MultiAssetFilter, _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, _dest: &MultiLocation, _xcm: &Xcm<()>, - ) -> XCMWeight { + ) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } - fn exchange_asset( - _give: &MultiAssetFilter, - _receive: &MultiAssets, - _maximal: &bool, - ) -> XCMWeight { + fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { Weight::MAX.ref_time() } 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 report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> XCMWeight { - XcmGeneric::::report_holding().ref_time() + fn report_holding(_response_info: &QueryResponseInfo, _assets: &MultiAssetFilter) -> Weight { + XcmGeneric::::report_holding() } - fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> XCMWeight { - XcmGeneric::::buy_execution().ref_time() + fn buy_execution(_fees: &MultiAsset, _weight_limit: &WeightLimit) -> Weight { + XcmGeneric::::buy_execution() } - fn refund_surplus() -> XCMWeight { - XcmGeneric::::refund_surplus().ref_time() + fn refund_surplus() -> Weight { + XcmGeneric::::refund_surplus() } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_error_handler().ref_time() + fn set_error_handler(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_error_handler() } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { - XcmGeneric::::set_appendix().ref_time() + fn set_appendix(_xcm: &Xcm) -> Weight { + XcmGeneric::::set_appendix() } - fn clear_error() -> XCMWeight { - XcmGeneric::::clear_error().ref_time() + fn clear_error() -> Weight { + XcmGeneric::::clear_error() } - fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> XCMWeight { - XcmGeneric::::claim_asset().ref_time() + fn claim_asset(_assets: &MultiAssets, _ticket: &MultiLocation) -> Weight { + XcmGeneric::::claim_asset() } - fn trap(_code: &u64) -> XCMWeight { - XcmGeneric::::trap().ref_time() + fn trap(_code: &u64) -> Weight { + XcmGeneric::::trap() } - fn subscribe_version(_query_id: &QueryId, _max_response_weight: &u64) -> XCMWeight { - XcmGeneric::::subscribe_version().ref_time() + fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight { + XcmGeneric::::subscribe_version() } - fn unsubscribe_version() -> XCMWeight { - XcmGeneric::::unsubscribe_version().ref_time() + fn unsubscribe_version() -> Weight { + XcmGeneric::::unsubscribe_version() } - fn burn_asset(assets: &MultiAssets) -> XCMWeight { + fn burn_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::burn_asset()) } - fn expect_asset(assets: &MultiAssets) -> XCMWeight { + fn expect_asset(assets: &MultiAssets) -> Weight { assets.weigh_multi_assets(XcmGeneric::::expect_asset()) } - fn expect_origin(_origin: &Option) -> XCMWeight { - XcmGeneric::::expect_origin().ref_time() + fn expect_origin(_origin: &Option) -> Weight { + XcmGeneric::::expect_origin() } - fn expect_error(_error: &Option<(u32, XcmError)>) -> XCMWeight { - XcmGeneric::::expect_error().ref_time() + fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight { + XcmGeneric::::expect_error() } - fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::query_pallet().ref_time() + fn query_pallet(_module_name: &Vec, _response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::query_pallet() } fn expect_pallet( _index: &u32, @@ -201,47 +193,47 @@ impl XcmWeightInfo for WestmintXcmWeight { _module_name: &Vec, _crate_major: &u32, _min_crate_minor: &u32, - ) -> XCMWeight { - XcmGeneric::::expect_pallet().ref_time() + ) -> Weight { + XcmGeneric::::expect_pallet() } - fn report_transact_status(_response_info: &QueryResponseInfo) -> XCMWeight { - XcmGeneric::::report_transact_status().ref_time() + fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight { + XcmGeneric::::report_transact_status() } - fn clear_transact_status() -> XCMWeight { - XcmGeneric::::clear_transact_status().ref_time() + fn clear_transact_status() -> Weight { + XcmGeneric::::clear_transact_status() } - fn universal_origin(_: &Junction) -> XCMWeight { - Weight::MAX.ref_time() + fn universal_origin(_: &Junction) -> Weight { + Weight::MAX } - fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> XCMWeight { - Weight::MAX.ref_time() + fn export_message(_: &NetworkId, _: &Junctions, _: &Xcm<()>) -> Weight { + Weight::MAX } - fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn lock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn unlock_asset(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn note_unlockable(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> XCMWeight { - Weight::MAX.ref_time() + fn request_unlock(_: &MultiAsset, _: &MultiLocation) -> Weight { + Weight::MAX } - fn set_fees_mode(_: &bool) -> XCMWeight { - XcmGeneric::::set_fees_mode().ref_time() + fn set_fees_mode(_: &bool) -> Weight { + XcmGeneric::::set_fees_mode() } - fn set_topic(_topic: &[u8; 32]) -> XCMWeight { - XcmGeneric::::set_topic().ref_time() + fn set_topic(_topic: &[u8; 32]) -> Weight { + XcmGeneric::::set_topic() } - fn clear_topic() -> XCMWeight { - XcmGeneric::::clear_topic().ref_time() + fn clear_topic() -> Weight { + XcmGeneric::::clear_topic() } - fn alias_origin(_: &MultiLocation) -> XCMWeight { + fn alias_origin(_: &MultiLocation) -> Weight { // XCM Executor does not currently support alias origin operations - Weight::MAX.ref_time() + Weight::MAX } - fn unpaid_execution(_: &WeightLimit, _: &Option) -> XCMWeight { - XcmGeneric::::unpaid_execution().ref_time() + fn unpaid_execution(_: &WeightLimit, _: &Option) -> Weight { + XcmGeneric::::unpaid_execution() } } diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 05926a52955..75b7a7a271b 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -31,7 +31,7 @@ use frame_support::{ use polkadot_runtime_common::xcm_sender::ConstantPrice; use sp_runtime::{traits::Saturating, SaturatedConversion}; use sp_std::{marker::PhantomData, prelude::*}; -use xcm::{latest::{prelude::*}, WrapVersion}; +use xcm::{latest::prelude::*, WrapVersion}; use xcm_builder::TakeRevenue; use xcm_executor::traits::{MatchesFungibles, TransactAsset, WeightTrader}; From d6d1a7d7f897111ac94db3e9f75a42be3aa0e6bb Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 23 Nov 2022 01:12:42 +0900 Subject: [PATCH 071/119] Fixes --- parachain-template/runtime/src/xcm_config.rs | 11 ++++++----- parachains/common/src/xcm_config.rs | 10 +++++----- .../runtimes/assets/statemine/src/xcm_config.rs | 2 ++ .../runtimes/assets/statemint/src/xcm_config.rs | 2 ++ .../runtimes/assets/westmint/src/xcm_config.rs | 2 ++ .../collectives-polkadot/src/xcm_config.rs | 5 ++++- .../contracts/contracts-rococo/src/xcm_config.rs | 5 ++++- .../runtimes/testing/penpal/src/xcm_config.rs | 14 ++++++++------ 8 files changed, 33 insertions(+), 18 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 03e090009e0..80a5fba3e6d 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -10,7 +10,7 @@ use frame_support::{ use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; -use xcm::latest::{prelude::*, Weight as XCMWeight}; +use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, @@ -104,8 +104,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - max_weight: XCMWeight, - weight_credit: &mut XCMWeight, + max_weight: Weight, + weight_credit: &mut Weight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -118,8 +118,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - _max_weight: XCMWeight, - _weight_credit: &mut XCMWeight, + _max_weight: Weight, + _weight_credit: &mut Weight, ) -> Result<(), ()> { if message.iter().any(|inst| { matches!( @@ -226,6 +226,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index 9a9774ae94f..5f0453309ec 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -6,7 +6,7 @@ use frame_support::{ weights::{Weight, WeightToFee, WeightToFeePolynomial}, }; use sp_runtime::traits::Get; -use xcm::latest::{prelude::*, Weight as XCMWeight}; +use xcm::latest::prelude::*; use xcm_executor::traits::ShouldExecute; //TODO: move DenyThenTry to polkadot's xcm module. @@ -25,8 +25,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - max_weight: XCMWeight, - weight_credit: &mut XCMWeight, + max_weight: Weight, + weight_credit: &mut Weight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -39,8 +39,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - _max_weight: XCMWeight, - _weight_credit: &mut XCMWeight, + _max_weight: Weight, + _weight_credit: &mut Weight, ) -> Result<(), ()> { if message.iter().any(|inst| { matches!( diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 4841ee7c518..84f014a32bc 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -254,6 +254,8 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index bb9d82680fe..f53f6c3592b 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -229,6 +229,8 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 4f55696c69e..0e8c8abbc21 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -245,6 +245,8 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index fb0bd3b4195..6eebe074507 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -20,6 +20,7 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{ConstU32, Everything, Nothing}, + weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -98,7 +99,7 @@ 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; } @@ -196,6 +197,8 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 4f53eca6dbc..ec0849eebdd 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -20,6 +20,7 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{ConstU32, EitherOfDiverse, Everything, Nothing}, + weights::Weight, }; use frame_system::EnsureRoot; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; @@ -104,7 +105,7 @@ 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; } @@ -195,6 +196,8 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + // FIXME: Replace with benchmarked weight info + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index e8f70c20e63..f0bb531e231 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -33,13 +33,14 @@ use frame_support::{ fungibles::{self, Balanced, CreditOf}, ConstU32, Contains, ContainsPair, Everything, Get, Nothing, }, + weights::Weight, }; use pallet_asset_tx_payment::HandleCredit; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; -use xcm::latest::{prelude::*, Weight as XCMWeight}; +use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, @@ -134,7 +135,7 @@ 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; } @@ -165,8 +166,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - max_weight: XCMWeight, - weight_credit: &mut XCMWeight, + max_weight: Weight, + weight_credit: &mut Weight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -179,8 +180,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut [Instruction], - _max_weight: XCMWeight, - _weight_credit: &mut XCMWeight, + _max_weight: Weight, + _weight_credit: &mut Weight, ) -> Result<(), ()> { if message.iter().any(|inst| { matches!( @@ -383,6 +384,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { From 2d4603d610fee1495c321fed44d41c114b402f76 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 28 Nov 2022 21:10:37 +0900 Subject: [PATCH 072/119] Remove unused import --- parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs | 2 +- parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs | 2 +- parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 9ea341c9c37..58823232786 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -21,7 +21,7 @@ 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 sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index f440f7b769a..b1a84cb9ccb 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -21,7 +21,7 @@ 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 sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 0726040167c..f44e74648e2 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -21,7 +21,7 @@ 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 sp_std::prelude::*; use xcm::{latest::prelude::*, DoubleEncoded}; trait WeighMultiAssets { From db188330bc03bc5390ec01f62cc604c9f5e211be Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 29 Nov 2022 09:03:56 +0100 Subject: [PATCH 073/119] 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 --- Cargo.lock | 1 + parachains/common/Cargo.toml | 1 + parachains/runtimes/assets/statemine/src/xcm_config.rs | 4 ++-- parachains/runtimes/assets/statemint/src/xcm_config.rs | 4 ++-- parachains/runtimes/assets/westmint/src/xcm_config.rs | 4 ++-- .../runtimes/contracts/contracts-rococo/src/xcm_config.rs | 2 -- parachains/runtimes/testing/penpal/src/xcm_config.rs | 8 ++++---- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 78f4386917f..1f4dedb02ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6529,6 +6529,7 @@ dependencies = [ "sp-std", "substrate-wasm-builder", "xcm", + "xcm-builder", "xcm-executor", ] diff --git a/parachains/common/Cargo.toml b/parachains/common/Cargo.toml index 6dca0393bc8..06735d497c1 100644 --- a/parachains/common/Cargo.toml +++ b/parachains/common/Cargo.toml @@ -28,6 +28,7 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f # Polkadot polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } # Cumulus diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index c31c01630af..9c37035bc35 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -35,7 +35,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, @@ -96,7 +96,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, >; diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index adb771a7ae1..28b4d99e529 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -35,7 +35,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, @@ -96,7 +96,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, >; diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index bc4f3e52867..c99b66bb5c3 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -35,7 +35,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, @@ -96,7 +96,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, >; diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index ec0849eebdd..2cfb3e56729 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -42,8 +42,6 @@ parameter_types! { pub const RelayNetwork: Option = None; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub const Local: MultiLocation = Here.into_location(); - pub CheckingAccount: AccountId = PolkadotXcm::check_account(); pub const ExecutiveBody: BodyId = BodyId::Executive; } diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 6c07188dddd..d3b7948bf70 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -45,9 +45,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, - IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + IsConcrete, LocalMint, NativeAsset, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{ traits::{JustTry, ShouldExecute}, @@ -104,7 +104,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. - NonZeroIssuance, + LocalMint>, // The account to use for tracking teleports. CheckingAccount, >; diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 05592f71645..994a1bc3613 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -66,7 +66,7 @@ use parachains_common::{ }; use xcm_builder::{ AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, - FungiblesAdapter, + FungiblesAdapter, LocalMint, }; use xcm_executor::traits::JustTry; @@ -330,7 +330,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. - NonZeroIssuance, + LocalMint>, // The account to use for tracking teleports. CheckingAccount, >; From 61c1cdf7d39d0efee4d361e2e7337c64ca25ffd1 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 17:45:47 +0900 Subject: [PATCH 074/119] Fixes --- parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs | 2 +- parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index 58823232786..eddabcd1dc1 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -123,7 +123,7 @@ impl XcmWeightInfo for StatemineXcmWeight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { - Weight::MAX.ref_time() + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index f44e74648e2..5dfd526b7db 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -123,7 +123,7 @@ impl XcmWeightInfo for WestmintXcmWeight { assets.weigh_multi_assets(XcmFungibleWeight::::deposit_reserve_asset()) } fn exchange_asset(_give: &MultiAssetFilter, _receive: &MultiAssets, _maximal: &bool) -> Weight { - Weight::MAX.ref_time() + Weight::MAX } fn initiate_reserve_withdraw( assets: &MultiAssetFilter, From d30d218d06f536ec9b6c439bc9ba9e8abbdee830 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 19:49:01 +0900 Subject: [PATCH 075/119] Fixes --- parachains/runtimes/assets/statemint/src/xcm_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 28b4d99e529..a4a018721fb 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -187,7 +187,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteAssetId< + ConvertedConcreteId< AssetId, Balance, AsPrefixedGeneralIndex, From 2a8678da909a097c1b51695466fde7dec6d5e8a2 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 20:16:12 +0900 Subject: [PATCH 076/119] Fixes --- pallets/xcmp-queue/src/mock.rs | 2 +- parachain-template/runtime/src/xcm_config.rs | 2 +- parachains/runtimes/starters/shell/src/xcm_config.rs | 4 ++-- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index bd71ba363e5..2215bd59d7c 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -117,7 +117,7 @@ impl cumulus_pallet_parachain_system::Config for Test { parameter_types! { pub const RelayChain: MultiLocation = MultiLocation::parent(); pub UniversalLocation: InteriorMultiLocation = X1(Parachain(1u32.into())).into(); - pub UnitWeightCost: u64 = 1_000_000; + pub UnitWeightCost: Weight = Weight::from_parts(1_000_000, 1024); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; } diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index d02befb0a95..f5900cff6a3 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -76,7 +76,7 @@ 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; } diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index acc02df42af..1bbdf15b44f 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -17,7 +17,7 @@ use super::{ AccountId, AllPalletsWithSystem, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, }; -use frame_support::{match_types, parameter_types, traits::Nothing}; +use frame_support::{match_types, parameter_types, traits::Nothing, weights::Weight}; use xcm::latest::prelude::*; use xcm_builder::{ AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, @@ -49,7 +49,7 @@ match_types! { 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; } diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 994a1bc3613..bcb13ecef4b 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -363,7 +363,7 @@ 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); // One ROC buys 1 second of weight. pub const WeightPrice: (MultiLocation, u128) = (MultiLocation::parent(), ROC); pub const MaxInstructions: u32 = 100; From b1e8b3765a8625ed5061b43b2975dcf88b6deb20 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 20:44:53 +0900 Subject: [PATCH 077/119] Fixes --- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index bcb13ecef4b..724a0633501 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -461,6 +461,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; + type WeightInfo = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { From fad4c13942e9c10eeb71ce9e5e3fdf6b9a191aad Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 21:18:29 +0900 Subject: [PATCH 078/119] Fixes --- parachain-template/runtime/src/xcm_config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index f5900cff6a3..5d7dc8ca5ff 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -6,6 +6,7 @@ use core::marker::PhantomData; use frame_support::{ log, match_types, parameter_types, traits::{ConstU32, Everything, Nothing}, + weights::Weight, }; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; From f1e7e18ec8b023be71ac04f9bb48fcdcce75b889 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 29 Nov 2022 23:00:07 +0900 Subject: [PATCH 079/119] Fix tests --- pallets/xcmp-queue/src/tests.rs | 17 ++++++++++--- .../runtimes/assets/statemint/tests/tests.rs | 25 +++++++++---------- .../runtimes/assets/westmint/tests/tests.rs | 25 +++++++++---------- 3 files changed, 37 insertions(+), 30 deletions(-) diff --git a/pallets/xcmp-queue/src/tests.rs b/pallets/xcmp-queue/src/tests.rs index 8710c9a71af..417edbb618f 100644 --- a/pallets/xcmp-queue/src/tests.rs +++ b/pallets/xcmp-queue/src/tests.rs @@ -46,6 +46,7 @@ fn bad_message_is_handled() { XcmpQueue::process_xcmp_message( 1000.into(), (1, format), + &mut 0, Weight::from_ref_time(10_000_000_000), Weight::from_ref_time(10_000_000_000), ); @@ -69,6 +70,7 @@ fn handle_blob_message() { XcmpQueue::process_xcmp_message( 1000.into(), (1, format), + &mut 0, Weight::from_ref_time(10_000_000_000), Weight::from_ref_time(10_000_000_000), ); @@ -86,6 +88,7 @@ fn handle_invalid_data() { XcmpQueue::process_xcmp_message( 1000.into(), (1, format), + &mut 0, Weight::from_ref_time(10_000_000_000), Weight::from_ref_time(10_000_000_000), ); @@ -96,7 +99,7 @@ fn handle_invalid_data() { fn service_overweight_unknown() { new_test_ext().execute_with(|| { assert_noop!( - XcmpQueue::service_overweight(RuntimeOrigin::root(), 0, 1000), + XcmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(1000, 1000)), Error::::BadOverweightIndex, ); }); @@ -109,7 +112,7 @@ fn service_overweight_bad_xcm_format() { Overweight::::insert(0, (ParaId::from(1000), 0, bad_xcm)); assert_noop!( - XcmpQueue::service_overweight(RuntimeOrigin::root(), 0, 1000), + XcmpQueue::service_overweight(RuntimeOrigin::root(), 0, Weight::from_parts(1000, 1000)), Error::::BadXcm ); }); @@ -187,9 +190,15 @@ fn update_threshold_weight_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); assert_eq!(data.threshold_weight, Weight::from_ref_time(100_000)); - assert_ok!(XcmpQueue::update_threshold_weight(RuntimeOrigin::root(), 10_000)); + assert_ok!(XcmpQueue::update_threshold_weight( + RuntimeOrigin::root(), + Weight::from_ref_time(10_000) + )); assert_noop!( - XcmpQueue::update_threshold_weight(RuntimeOrigin::signed(5), 10_000_000), + XcmpQueue::update_threshold_weight( + RuntimeOrigin::signed(5), + Weight::from_ref_time(10_000_000), + ), BadOrigin ); let data: QueueConfigData = >::get(); diff --git a/parachains/runtimes/assets/statemint/tests/tests.rs b/parachains/runtimes/assets/statemint/tests/tests.rs index 50c0f904eb1..b52383f3d3e 100644 --- a/parachains/runtimes/assets/statemint/tests/tests.rs +++ b/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/parachains/runtimes/assets/westmint/tests/tests.rs b/parachains/runtimes/assets/westmint/tests/tests.rs index a7b846d49ec..68c6cf670d5 100644 --- a/parachains/runtimes/assets/westmint/tests/tests.rs +++ b/parachains/runtimes/assets/westmint/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, X2( @@ -151,7 +151,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(); @@ -165,8 +165,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), @@ -177,7 +176,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)), @@ -216,7 +215,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 5e9 weight - let bought = 500_000_000u64; + let bought = Weight::from_ref_time(500_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -229,7 +228,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(), @@ -275,7 +274,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); - let bought = 500_000_000u64; + let bought = Weight::from_ref_time(500_000_000u64); let asset_multilocation = MultiLocation::new( 0, @@ -288,7 +287,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(), @@ -356,10 +355,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, From 4829edbd424440c8e25ab98def33ffc526e19268 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 30 Nov 2022 00:35:19 +0900 Subject: [PATCH 080/119] Fixes --- pallets/xcmp-queue/src/tests.rs | 13 ++++++---- .../runtimes/assets/statemine/tests/tests.rs | 24 +++++++++---------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pallets/xcmp-queue/src/tests.rs b/pallets/xcmp-queue/src/tests.rs index 417edbb618f..4e9d6f32b07 100644 --- a/pallets/xcmp-queue/src/tests.rs +++ b/pallets/xcmp-queue/src/tests.rs @@ -212,9 +212,14 @@ fn update_weight_restrict_decay_works() { new_test_ext().execute_with(|| { let data: QueueConfigData = >::get(); assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(2)); - assert_ok!(XcmpQueue::update_weight_restrict_decay(RuntimeOrigin::root(), 5)); + assert_ok!( + XcmpQueue::update_weight_restrict_decay(RuntimeOrigin::root(), Weight::from_ref_time(5)) + ); assert_noop!( - XcmpQueue::update_weight_restrict_decay(RuntimeOrigin::signed(6), 4), + XcmpQueue::update_weight_restrict_decay( + RuntimeOrigin::signed(6), + Weight::from_ref_time(4), + ), BadOrigin ); let data: QueueConfigData = >::get(); @@ -233,12 +238,12 @@ fn update_xcmp_max_individual_weight() { ); assert_ok!(XcmpQueue::update_xcmp_max_individual_weight( RuntimeOrigin::root(), - 30u64 * WEIGHT_PER_MILLIS.ref_time() + 30u64 * WEIGHT_PER_MILLIS )); assert_noop!( XcmpQueue::update_xcmp_max_individual_weight( RuntimeOrigin::signed(3), - 10u64 * WEIGHT_PER_MILLIS.ref_time() + 10u64 * WEIGHT_PER_MILLIS ), BadOrigin ); diff --git a/parachains/runtimes/assets/statemine/tests/tests.rs b/parachains/runtimes/assets/statemine/tests/tests.rs index 18caaaf3f7e..c4353f2b234 100644 --- a/parachains/runtimes/assets/statemine/tests/tests.rs +++ b/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(); @@ -167,7 +167,7 @@ fn test_asset_xcm_trader_with_refund() { // Make sure refurnd works. let amount_refunded = - WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used)); + WeightToFee::weight_to_fee(&(bought - weight_used)); assert_eq!( trader.refund_weight(bought - weight_used), @@ -178,7 +178,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 +217,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 +230,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 +277,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 +290,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 +358,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, From 605795293e95e11ea33879157e87fcd9961e4529 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 4 Dec 2022 01:23:16 +0900 Subject: [PATCH 081/119] Add SafeCallFilter --- .../assets/statemine/src/xcm_config.rs | 91 ++++++++++++++++++- .../assets/statemint/src/xcm_config.rs | 91 ++++++++++++++++++- .../assets/westmint/src/xcm_config.rs | 91 ++++++++++++++++++- .../bridge-hub-kusama/src/xcm_config.rs | 44 ++++++++- .../bridge-hub-rococo/src/xcm_config.rs | 44 ++++++++- .../collectives-polkadot/src/xcm_config.rs | 55 ++++++++++- .../contracts-rococo/src/xcm_config.rs | 1 + .../runtimes/starters/shell/src/xcm_config.rs | 7 +- .../runtimes/testing/penpal/src/xcm_config.rs | 1 + 9 files changed, 410 insertions(+), 15 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 9c37035bc35..06b9a9b2f98 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -40,7 +40,10 @@ use xcm_builder::{ SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use xcm_executor::{ + traits::{JustTry, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); @@ -142,6 +145,89 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { + 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 { .. } + ) + }; } pub type Barrier = DenyThenTry< @@ -212,7 +298,8 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index a4a018721fb..25d77ab4d19 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -40,7 +40,10 @@ use xcm_builder::{ SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use xcm_executor::{ + traits::{JustTry, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); @@ -142,6 +145,89 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { + 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 { .. } + ) + }; } pub type Barrier = DenyThenTry< @@ -212,7 +298,8 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index c99b66bb5c3..6be182c181e 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -40,7 +40,10 @@ use xcm_builder::{ SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; -use xcm_executor::{traits::JustTry, XcmExecutor}; +use xcm_executor::{ + traits::{JustTry, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); @@ -138,6 +141,89 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; + + // 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 type SafeCallFilter: impl Contains = { + 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 { .. } + ) + }; } pub type Barrier = DenyThenTry< @@ -208,7 +294,8 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 317655663f0..509027434c7 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -15,8 +15,8 @@ // 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, @@ -36,7 +36,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); @@ -97,6 +97,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_types! { @@ -109,6 +110,34 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { + 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 { .. }) + }; } pub type Barrier = DenyThenTry< @@ -148,6 +177,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. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 77b18b28cbb..9c2badb0674 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -15,8 +15,8 @@ // 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, @@ -36,7 +36,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); @@ -96,6 +96,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; } match_types! { @@ -107,6 +108,34 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { + 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 { .. }) + }; } pub type Barrier = DenyThenTry< @@ -145,6 +174,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. diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 6eebe074507..54fc60d4bce 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -36,7 +36,7 @@ use xcm_builder::{ SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; -use xcm_executor::XcmExecutor; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); @@ -113,6 +113,56 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { + 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 { .. } + ) + }; } pub type Barrier = DenyThenTry< @@ -158,7 +208,8 @@ impl xcm_executor::Config for XcmConfig { type FeeManager = (); type MessageExporter = (); type UniversalAliases = Nothing; - type CallDispatcher = RuntimeCall; + type CallDispatcher = WithOriginFilter; + type SafeCallFilter = SafeCallFilter; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 2cfb3e56729..70bdcc31f4b 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -156,6 +156,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// Converts a local signed origin into an XCM multilocation. diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index 1bbdf15b44f..be83cb9fbfd 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -17,7 +17,11 @@ use super::{ AccountId, AllPalletsWithSystem, ParachainInfo, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, }; -use frame_support::{match_types, parameter_types, traits::Nothing, weights::Weight}; +use frame_support::{ + match_types, parameter_types, + traits::{Everything, Nothing}, + weights::Weight, +}; use xcm::latest::prelude::*; use xcm_builder::{ AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, @@ -78,6 +82,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 56956d1f885..87c8569f552 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -281,6 +281,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. From 33404f238f377951a34401dfa0044d16a4eae719 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 4 Dec 2022 01:36:39 +0900 Subject: [PATCH 082/119] Add missing config items --- .../bridge-hub-kusama/src/xcm_config.rs | 26 ++++++++++++------- .../bridge-hub-rococo/src/xcm_config.rs | 26 ++++++++++++------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 509027434c7..2053f805cc9 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -20,7 +20,8 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Everything, Nothing}, + weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -32,17 +33,18 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; 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 = + Parachain(ParachainInfo::parachain_id().into()).into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -95,7 +97,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // TODO: change to meassured weights - https://github.com/paritytech/parity-bridges-common/issues/391 // 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; } @@ -167,7 +169,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; // TODO: change to meassured weights - https://github.com/paritytech/parity-bridges-common/issues/391 type Weigher = FixedWeightBounds; @@ -216,11 +218,17 @@ impl pallet_xcm::Config for Runtime { // TODO: change to meassured weights - https://github.com/paritytech/parity-bridges-common/issues/391 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 = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 9c2badb0674..d6bd800789b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -20,7 +20,8 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{Everything, Nothing}, + traits::{ConstU32, Everything, Nothing}, + weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -32,17 +33,18 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, LocationInverter, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::WithOriginFilter, 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 UniversalLocation: InteriorMultiLocation = + Parachain(ParachainInfo::parachain_id().into()).into(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -94,7 +96,7 @@ 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; } @@ -165,7 +167,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 = FixedWeightBounds; type Trader = @@ -211,11 +213,17 @@ 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 = pallet_xcm::TestWeightInfo; } impl cumulus_pallet_xcm::Config for Runtime { From ff250267395998a7d150e5e46182bc1af9625455 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sun, 4 Dec 2022 01:44:52 +0900 Subject: [PATCH 083/119] Add TODO --- .../runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 2 +- .../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 2053f805cc9..cb78aec275f 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -198,7 +198,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // TODO: Figure out 3rd type arg // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index d6bd800789b..8d924f93b33 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -195,7 +195,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // TODO: Figure out 3rd type arg // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); From 080c7f0d613d15039512def106a66b37404274fb Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 6 Dec 2022 15:56:13 +0900 Subject: [PATCH 084/119] Use () as the PriceForParentDelivery --- .../runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 2 +- .../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index cb78aec275f..a207fec531a 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -198,7 +198,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, // TODO: Figure out 3rd type arg + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 8d924f93b33..2fa665e9adb 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -195,7 +195,7 @@ pub type LocalOriginToLocation = SignedToAccountId32, // TODO: Figure out 3rd type arg + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); From 9bad64e6cd9b98c22e4e3cd6ff89676f4bc22731 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 7 Dec 2022 04:07:30 +0900 Subject: [PATCH 085/119] Fixes --- parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 + parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index 71f32026ba3..7660251a2e6 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/parachains/runtimes/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 { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index cdd07a48ec4..26590d912ca 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -336,6 +336,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 { From 9ad8152a03dade512b01387ddc6f468eab9b24b3 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 7 Dec 2022 04:24:00 +0900 Subject: [PATCH 086/119] Fixes --- parachain-template/runtime/src/xcm_config.rs | 1 + parachains/runtimes/testing/rococo-parachain/src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 5d7dc8ca5ff..715770873cc 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -189,6 +189,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 697a50207e2..64c165db8ff 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -23,7 +23,6 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; -use frame_support::traits::{ConstU32, Nothing}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; use sp_runtime::{ @@ -44,7 +43,7 @@ pub use frame_support::{ match_types, parameter_types, traits::{ AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, IsInVec, - Randomness, + Nothing, Randomness, }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, From f366c7f52057bc143c55ad1e9ed3ea7a3a7d8b7b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 7 Dec 2022 04:41:07 +0900 Subject: [PATCH 087/119] Fixes --- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 64c165db8ff..79b3c45f754 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -419,6 +419,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. From 92ace0569e6873c4c2319ae09f26497c3f87cc7a Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 7 Dec 2022 06:02:59 +0900 Subject: [PATCH 088/119] Fixes --- pallets/xcmp-queue/src/mock.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/xcmp-queue/src/mock.rs b/pallets/xcmp-queue/src/mock.rs index 2215bd59d7c..a7bad5dc057 100644 --- a/pallets/xcmp-queue/src/mock.rs +++ b/pallets/xcmp-queue/src/mock.rs @@ -20,7 +20,7 @@ use cumulus_pallet_parachain_system::AnyRelayNumber; use cumulus_primitives_core::{IsSystem, ParaId}; use frame_support::{ parameter_types, - traits::{Nothing, OriginTrait}, + traits::{Everything, Nothing, OriginTrait}, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -59,7 +59,7 @@ parameter_types! { type AccountId = u64; impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); @@ -163,6 +163,7 @@ impl xcm_executor::Config for XcmConfig { type MessageExporter = (); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; } pub type XcmRouter = ( From ffc7926e6d1b72cf7bcc538796aca13860b274ed Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 8 Dec 2022 15:55:54 +0900 Subject: [PATCH 089/119] Update transact_origin to transact_origin_and_runtime_call --- parachains/runtimes/assets/statemine/src/lib.rs | 4 ++-- parachains/runtimes/assets/statemint/src/lib.rs | 4 ++-- parachains/runtimes/assets/westmint/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 88430123ca8..eaed51a06b4 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -928,8 +928,8 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn transact_origin() -> Result { - Ok(KsmLocation::get()) + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((KsmLocation::get(), pallet_session::Call::purge_keys {}.into())) } fn subscribe_origin() -> Result { diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index e1ee4ae2da9..94a9684b08b 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -940,8 +940,8 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn transact_origin() -> Result { - Ok(DotLocation::get()) + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((DotLocation::get(), pallet_session::Call::purge_keys {}.into())) } fn subscribe_origin() -> Result { diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index c59c8c9bbd0..df2e70a7aef 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -900,8 +900,8 @@ impl_runtime_apis! { Err(BenchmarkError::Skip) } - fn transact_origin() -> Result { - Ok(WestendLocation::get()) + fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { + Ok((WestendLocation::get(), pallet_session::Call::purge_keys {}.into())) } fn subscribe_origin() -> Result { From 7c25f95a22f4c5f040d74850a5bd07ad1de7ae8d Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Fri, 9 Dec 2022 00:05:14 +0900 Subject: [PATCH 090/119] Add ReachableDest config item to XCM pallet --- parachain-template/runtime/src/xcm_config.rs | 7 +++++++ parachains/runtimes/assets/statemine/src/xcm_config.rs | 7 +++++++ parachains/runtimes/assets/statemint/src/xcm_config.rs | 7 +++++++ parachains/runtimes/assets/westmint/src/xcm_config.rs | 7 +++++++ .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 7 +++++++ .../bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 7 +++++++ .../collectives/collectives-polkadot/src/xcm_config.rs | 7 +++++++ .../runtimes/contracts/contracts-rococo/src/xcm_config.rs | 7 +++++++ parachains/runtimes/testing/penpal/src/xcm_config.rs | 7 +++++++ parachains/runtimes/testing/rococo-parachain/src/lib.rs | 7 +++++++ 10 files changed, 70 insertions(+) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 715770873cc..7816b7f65d4 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -204,6 +204,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -229,6 +234,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 06b9a9b2f98..13146359b3d 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -315,6 +315,11 @@ pub type XcmRouter = ( 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. @@ -345,6 +350,8 @@ impl pallet_xcm::Config for Runtime { 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 { diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 25d77ab4d19..fb5e11b7176 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -315,6 +315,11 @@ pub type XcmRouter = ( 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. @@ -344,6 +349,8 @@ impl pallet_xcm::Config for Runtime { 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 { diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 6be182c181e..fb43b2835f8 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -310,6 +310,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -336,6 +341,8 @@ impl pallet_xcm::Config for Runtime { 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 { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index a207fec531a..62eed99afac 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -203,6 +203,11 @@ pub type XcmRouter = ( 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. @@ -229,6 +234,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 2fa665e9adb..dc5218b4005 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -200,6 +200,11 @@ pub type XcmRouter = ( 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. @@ -224,6 +229,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 54fc60d4bce..c75ee7a8a2d 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -225,6 +225,11 @@ pub type XcmRouter = ( 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. @@ -250,6 +255,8 @@ impl pallet_xcm::Config for Runtime { 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 { diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 70bdcc31f4b..8a49540eff0 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -172,6 +172,11 @@ pub type XcmRouter = ( 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. @@ -197,6 +202,8 @@ impl pallet_xcm::Config for Runtime { 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 { diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 87c8569f552..7af7ae2091f 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -296,6 +296,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -321,6 +326,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 39799f6bffd..172e8c608ea 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -434,6 +434,11 @@ pub type XcmRouter = ( XcmpQueue, ); +#[cfg(feature = "runtime-benchmarks")] +parameter_types! { + pub ReachableDest: Option = Some(Parent.into()); +} + impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; @@ -455,6 +460,8 @@ impl pallet_xcm::Config for Runtime { type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; } impl cumulus_pallet_xcm::Config for Runtime { From b144b78619c727783eab8a332607656955e343f1 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 10 Dec 2022 04:10:20 +0900 Subject: [PATCH 091/119] Update SafeCallFilter to allow remark_with_event in runtime benchmarks --- .../runtimes/assets/statemine/src/lib.rs | 2 +- .../assets/statemine/src/xcm_config.rs | 179 ++++++++++-------- .../runtimes/assets/statemint/src/lib.rs | 2 +- .../assets/statemint/src/xcm_config.rs | 179 ++++++++++-------- .../runtimes/assets/westmint/src/lib.rs | 2 +- .../assets/westmint/src/xcm_config.rs | 178 +++++++++-------- .../bridge-hub-kusama/src/xcm_config.rs | 68 ++++--- .../bridge-hub-rococo/src/xcm_config.rs | 69 ++++--- .../collectives-polkadot/src/xcm_config.rs | 113 ++++++----- 9 files changed, 434 insertions(+), 358 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 3b635cc5e23..45aed372cc4 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -929,7 +929,7 @@ impl_runtime_apis! { } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((KsmLocation::get(), pallet_session::Call::purge_keys {}.into())) + Ok((KsmLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 13146359b3d..bb8cb3ed7f2 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -145,89 +145,102 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { - 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 { .. } - ) - }; +/// 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< diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index 6bbfd142012..ff69fc18b81 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -941,7 +941,7 @@ impl_runtime_apis! { } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((DotLocation::get(), pallet_session::Call::purge_keys {}.into())) + Ok((DotLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index fb5e11b7176..b3ab6b1e3e6 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -145,89 +145,102 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { - 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 { .. } - ) - }; +/// 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< diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 120bf9528cb..905e3569505 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -901,7 +901,7 @@ impl_runtime_apis! { } fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((WestendLocation::get(), pallet_session::Call::purge_keys {}.into())) + Ok((WestendLocation::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) } fn subscribe_origin() -> Result { diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index fb43b2835f8..4f32571ceaf 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing, PalletInfoAccess}, + traits::{ConstU32, Contains, Everything, Nothing, PalletInfoAccess}, }; use pallet_xcm::XcmPassthrough; use parachains_common::{ @@ -141,89 +141,101 @@ match_types! { MultiLocation { parents: 1, interior: Here } | MultiLocation { parents: 1, interior: X1(Plurality { .. }) } }; +} +/// 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 + } + } - // 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 type SafeCallFilter: impl Contains = { - 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 { .. } - ) - }; + 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< diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 62eed99afac..2a423614401 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -112,34 +112,46 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 + } + } - // 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 type SafeCallFilter: impl Contains = { - 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 { .. }) - }; + 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< diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index dc5218b4005..f99deeaba48 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -20,7 +20,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -110,34 +110,47 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { - 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 { .. }) - }; +/// 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< diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index c75ee7a8a2d..6571759522c 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -19,7 +19,7 @@ use super::{ }; use frame_support::{ match_types, parameter_types, - traits::{ConstU32, Everything, Nothing}, + traits::{ConstU32, Contains, Everything, Nothing}, weights::Weight, }; use pallet_xcm::XcmPassthrough; @@ -113,56 +113,69 @@ match_types! { MultiLocation { parents: 1, interior: Here } | 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 type SafeCallFilter: impl Contains = { - 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 { .. } - ) - }; +/// 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< From 06c43f565325b3cfbd52e6c2765532886aea2a9a Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 10 Dec 2022 04:30:30 +0900 Subject: [PATCH 092/119] cargo fmt --- .../runtimes/assets/statemine/src/xcm_config.rs | 13 +++++++------ .../runtimes/assets/statemint/src/xcm_config.rs | 13 +++++++------ .../runtimes/assets/westmint/src/xcm_config.rs | 13 +++++++------ .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 9 +++++---- .../bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 9 +++++---- .../collectives-polkadot/src/xcm_config.rs | 13 +++++++------ 6 files changed, 38 insertions(+), 32 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index bb8cb3ed7f2..7584547de66 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -159,7 +159,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -169,7 +169,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -178,10 +178,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | RuntimeCall::Assets( pallet_assets::Call::create { .. } | @@ -209,7 +210,7 @@ impl Contains for SafeCallFilter { pallet_assets::Call::force_cancel_approval { .. } | pallet_assets::Call::transfer_approved { .. } | pallet_assets::Call::touch { .. } | - pallet_assets::Call::refund { .. } + pallet_assets::Call::refund { .. }, ) | RuntimeCall::Uniques( pallet_uniques::Call::create { .. } | @@ -236,7 +237,7 @@ impl Contains for SafeCallFilter { pallet_uniques::Call::set_accept_ownership { .. } | pallet_uniques::Call::set_collection_max_supply { .. } | pallet_uniques::Call::set_price { .. } | - pallet_uniques::Call::buy_item { .. } + pallet_uniques::Call::buy_item { .. }, ) => true, _ => false, } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index b3ab6b1e3e6..22b95110ee5 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -159,7 +159,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -169,7 +169,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -178,10 +178,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | RuntimeCall::Assets( pallet_assets::Call::create { .. } | @@ -209,7 +210,7 @@ impl Contains for SafeCallFilter { pallet_assets::Call::force_cancel_approval { .. } | pallet_assets::Call::transfer_approved { .. } | pallet_assets::Call::touch { .. } | - pallet_assets::Call::refund { .. } + pallet_assets::Call::refund { .. }, ) | RuntimeCall::Uniques( pallet_uniques::Call::create { .. } | @@ -236,7 +237,7 @@ impl Contains for SafeCallFilter { pallet_uniques::Call::set_accept_ownership { .. } | pallet_uniques::Call::set_collection_max_supply { .. } | pallet_uniques::Call::set_price { .. } | - pallet_uniques::Call::buy_item { .. } + pallet_uniques::Call::buy_item { .. }, ) => true, _ => false, } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 4f32571ceaf..638085a5d3a 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -154,7 +154,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -164,7 +164,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -173,10 +173,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | RuntimeCall::Assets( pallet_assets::Call::create { .. } | @@ -204,7 +205,7 @@ impl Contains for SafeCallFilter { pallet_assets::Call::force_cancel_approval { .. } | pallet_assets::Call::transfer_approved { .. } | pallet_assets::Call::touch { .. } | - pallet_assets::Call::refund { .. } + pallet_assets::Call::refund { .. }, ) | RuntimeCall::Uniques( pallet_uniques::Call::create { .. } | @@ -231,7 +232,7 @@ impl Contains for SafeCallFilter { pallet_uniques::Call::set_accept_ownership { .. } | pallet_uniques::Call::set_collection_max_supply { .. } | pallet_uniques::Call::set_price { .. } | - pallet_uniques::Call::buy_item { .. } + pallet_uniques::Call::buy_item { .. }, ) => true, _ => false, } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 2a423614401..947ab24f127 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -125,7 +125,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -135,7 +135,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -144,10 +144,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, _ => false, } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index f99deeaba48..bb6f9ff1ad2 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -124,7 +124,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -134,7 +134,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -143,10 +143,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, _ => false, } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 6571759522c..f776297d69d 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -127,7 +127,7 @@ impl Contains for SafeCallFilter { fn contains(call: &RuntimeCall) -> bool { #[cfg(feature = "runtime-benchmarks")] { - if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event {..})) { + if matches!(call, RuntimeCall::System(frame_system::Call::remark_with_event { .. })) { return true } } @@ -137,7 +137,7 @@ impl Contains for SafeCallFilter { frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | frame_system::Call::set_code_without_checks { .. } | - frame_system::Call::kill_prefix { .. } + frame_system::Call::kill_prefix { .. }, ) | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | @@ -146,10 +146,11 @@ impl Contains for SafeCallFilter { 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 { .. } + pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | + RuntimeCall::XcmpQueue(..) | + RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | RuntimeCall::Alliance( pallet_alliance::Call::vote { .. } | @@ -165,13 +166,13 @@ impl Contains for SafeCallFilter { pallet_alliance::Call::retire { .. } | pallet_alliance::Call::kick_member { .. } | pallet_alliance::Call::close { .. } | - pallet_alliance::Call::abdicate_fellow_status { .. } + 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 { .. } + pallet_collective::Call::close { .. }, ) => true, _ => false, } From fef449a184cfd1b17c45215ec7935a0254bd96ef Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 10 Dec 2022 15:03:27 +0900 Subject: [PATCH 093/119] Update substrate --- Cargo.lock | 376 +++++++++++++++++++++++++++-------------------------- 1 file changed, 189 insertions(+), 187 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5256510f3f..2c1e985a778 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,7 +450,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -487,7 +487,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "beefy-gadget", "futures", @@ -507,7 +507,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "sp-api", "sp-beefy", @@ -2929,7 +2929,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", ] @@ -2952,7 +2952,7 @@ checksum = "85dcb89d2b10c5f6133de2efd8c11959ce9dbb46a2f7a4cab208c4eeda6ce1ab" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -2975,7 +2975,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -3027,7 +3027,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3038,7 +3038,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3054,7 +3054,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -3083,7 +3083,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "env_logger", "log", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "bitflags", "frame-metadata", @@ -3132,7 +3132,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "Inflector", "cfg-expr", @@ -3146,7 +3146,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3158,7 +3158,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro2", "quote", @@ -3168,7 +3168,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "log", @@ -3186,7 +3186,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -3201,7 +3201,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "sp-api", @@ -3210,7 +3210,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "parity-scale-codec", @@ -4941,7 +4941,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "log", @@ -4961,7 +4961,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "anyhow", "jsonrpsee", @@ -5402,7 +5402,7 @@ checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "frame-benchmarking", @@ -5423,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5441,7 +5441,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5455,7 +5455,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -5471,7 +5471,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -5487,7 +5487,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -5502,7 +5502,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5526,7 +5526,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5546,7 +5546,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5561,7 +5561,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -5577,7 +5577,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "beefy-merkle-tree", @@ -5600,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5618,7 +5618,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5662,7 +5662,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5679,7 +5679,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "bitflags", "frame-benchmarking", @@ -5708,7 +5708,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "bitflags", "parity-scale-codec", @@ -5720,7 +5720,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro2", "quote", @@ -5730,7 +5730,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5747,7 +5747,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5765,7 +5765,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5789,7 +5789,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5802,7 +5802,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5820,7 +5820,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5839,7 +5839,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5862,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5878,7 +5878,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5898,7 +5898,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5915,7 +5915,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5932,7 +5932,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5949,7 +5949,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5965,7 +5965,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -5981,7 +5981,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -5998,7 +5998,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6018,7 +6018,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "sp-api", @@ -6028,7 +6028,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6045,7 +6045,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6068,7 +6068,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6085,7 +6085,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6100,7 +6100,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6114,7 +6114,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6132,7 +6132,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6147,7 +6147,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6166,7 +6166,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6183,7 +6183,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6204,7 +6204,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6220,7 +6220,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6234,7 +6234,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6258,7 +6258,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6269,7 +6269,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "log", "sp-arithmetic", @@ -6278,7 +6278,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6295,7 +6295,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6324,7 +6324,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6342,7 +6342,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6361,7 +6361,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-support", "frame-system", @@ -6377,7 +6377,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6393,7 +6393,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6405,7 +6405,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6422,7 +6422,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6437,7 +6437,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6453,7 +6453,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -6468,7 +6468,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -9279,7 +9279,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "log", "sp-core", @@ -9290,7 +9290,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -9317,7 +9317,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "futures-timer", @@ -9340,7 +9340,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9356,7 +9356,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -9373,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9384,7 +9384,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -9424,7 +9424,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "fnv", "futures", @@ -9452,7 +9452,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "hash-db", "kvdb", @@ -9477,13 +9477,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -9501,7 +9502,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -9530,7 +9531,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "fork-tree", @@ -9571,7 +9572,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "jsonrpsee", @@ -9593,7 +9594,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9606,7 +9607,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -9630,7 +9631,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "lru", "parity-scale-codec", @@ -9654,7 +9655,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9667,7 +9668,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "log", "sc-allocator", @@ -9680,7 +9681,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "cfg-if", "libc", @@ -9697,7 +9698,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ahash", "array-bytes 4.2.0", @@ -9738,7 +9739,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "finality-grandpa", "futures", @@ -9759,7 +9760,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ansi_term", "futures", @@ -9775,7 +9776,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9790,7 +9791,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9837,7 +9838,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "cid", "futures", @@ -9857,7 +9858,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "bitflags", @@ -9883,7 +9884,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ahash", "futures", @@ -9901,7 +9902,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "futures", @@ -9922,7 +9923,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -9947,13 +9948,14 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "futures", @@ -9972,7 +9974,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10002,7 +10004,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "libp2p", @@ -10015,7 +10017,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10024,7 +10026,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "hash-db", @@ -10054,7 +10056,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "jsonrpsee", @@ -10077,7 +10079,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "jsonrpsee", @@ -10090,7 +10092,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "hex", @@ -10109,7 +10111,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "directories", @@ -10179,7 +10181,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "log", "parity-scale-codec", @@ -10191,7 +10193,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10210,7 +10212,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "libc", @@ -10229,7 +10231,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "chrono", "futures", @@ -10247,7 +10249,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ansi_term", "atty", @@ -10278,7 +10280,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10289,7 +10291,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -10315,7 +10317,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -10329,7 +10331,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "futures-timer", @@ -10832,7 +10834,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "hash-db", "log", @@ -10850,7 +10852,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "blake2", "proc-macro-crate", @@ -10862,7 +10864,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10875,7 +10877,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "integer-sqrt", "num-traits", @@ -10890,7 +10892,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10903,7 +10905,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "parity-scale-codec", @@ -10915,7 +10917,7 @@ dependencies = [ [[package]] name = "sp-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -10932,7 +10934,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "sp-api", @@ -10944,7 +10946,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "log", @@ -10962,7 +10964,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -10981,7 +10983,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "parity-scale-codec", @@ -10999,7 +11001,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "merlin", @@ -11022,7 +11024,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -11036,7 +11038,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -11049,7 +11051,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11094,7 +11096,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "blake2", "byteorder", @@ -11108,7 +11110,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro2", "quote", @@ -11119,7 +11121,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11128,7 +11130,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro2", "quote", @@ -11138,7 +11140,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "environmental", "parity-scale-codec", @@ -11149,7 +11151,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "finality-grandpa", "log", @@ -11167,7 +11169,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11181,7 +11183,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "bytes", "ed25519-dalek", @@ -11208,7 +11210,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "lazy_static", "sp-core", @@ -11219,7 +11221,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures", @@ -11236,7 +11238,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "thiserror", "zstd", @@ -11245,7 +11247,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11263,7 +11265,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -11277,7 +11279,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "sp-api", "sp-core", @@ -11287,7 +11289,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "backtrace", "lazy_static", @@ -11297,7 +11299,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "rustc-hash", "serde", @@ -11307,7 +11309,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "either", "hash256-std-hasher", @@ -11329,7 +11331,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11347,7 +11349,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "Inflector", "proc-macro-crate", @@ -11359,7 +11361,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "serde", "serde_json", @@ -11368,7 +11370,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -11382,7 +11384,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -11393,7 +11395,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "hash-db", "log", @@ -11415,12 +11417,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11433,7 +11435,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "futures-timer", @@ -11449,7 +11451,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "sp-std", @@ -11461,7 +11463,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "sp-api", "sp-runtime", @@ -11470,7 +11472,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "log", @@ -11486,7 +11488,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ahash", "hash-db", @@ -11509,7 +11511,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11526,7 +11528,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11537,7 +11539,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "impl-trait-for-tuples", "log", @@ -11550,7 +11552,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11853,7 +11855,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "platforms", ] @@ -11861,7 +11863,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11882,7 +11884,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures-util", "hyper", @@ -11895,7 +11897,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "async-trait", "jsonrpsee", @@ -11908,7 +11910,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "jsonrpsee", "log", @@ -11929,7 +11931,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -11955,7 +11957,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11965,7 +11967,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#11c50578549969979121577cde987ad3f9d95bd8" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11976,7 +11978,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "ansi_term", "build-helper", @@ -12504,7 +12506,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#f0b6e79a8d21856743acc5370b5d5c3271048cb9" +source = "git+https://github.com/paritytech/substrate?branch=master#15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9" dependencies = [ "clap 4.0.29", "frame-remote-externalities", From 1fcb5d522861e5deef90b9b30cac625f502519cc Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 12 Dec 2022 15:59:45 +0900 Subject: [PATCH 094/119] Fix worst_case_holding --- .../runtimes/assets/statemine/src/lib.rs | 22 +++++++++---------- .../runtimes/assets/statemint/src/lib.rs | 22 +++++++++---------- .../runtimes/assets/westmint/src/lib.rs | 22 +++++++++---------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 45aed372cc4..ff3fd494c31 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -853,7 +853,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 { @@ -862,12 +862,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(KsmLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> 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()), @@ -876,17 +876,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() } } diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index ff69fc18b81..2d3df44b09c 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -866,7 +866,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 { @@ -875,12 +875,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(DotLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> 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()), @@ -889,17 +889,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() } } diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 905e3569505..72680dfed83 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -825,7 +825,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 { @@ -834,12 +834,12 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(WestendLocation::get()) } - fn worst_case_holding(_depositable_count: u32) -> 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()), @@ -848,17 +848,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() } } From dd74806d45633f679eabdd984c30383a6b91fb41 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 12 Dec 2022 17:05:27 +0900 Subject: [PATCH 095/119] Fix DMQ queue unit tests --- pallets/dmp-queue/src/lib.rs | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 51526d245cc..650c307b3a9 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -538,11 +538,11 @@ mod tests { } fn msg_complete(weight: u64) -> (Xcm, Outcome) { - (msg(weight), Outcome::Complete(Weight::from_ref_time(weight))) + (msg(weight), Outcome::Complete(Weight::from_parts(weight, weight))) } fn msg_limit_reached(weight: u64) -> (Xcm, Outcome) { - (msg(weight), Outcome::Error(XcmError::WeightLimitReached(Weight::from_ref_time(weight)))) + (msg(weight), Outcome::Error(XcmError::WeightLimitReached(Weight::from_parts(weight, weight)))) } fn pages_queued() -> PageCounter { @@ -574,7 +574,7 @@ mod tests { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001)]; let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(2001)); + assert_eq!(weight_used, Weight::from_parts(2001, 2001)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_complete(1001)]); assert!(queue_is_empty()); }); @@ -586,7 +586,7 @@ mod tests { let enqueued = vec![msg(1000), msg(1001), msg(1002)]; enqueue(&enqueued); let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(2001)); + assert_eq!(weight_used, Weight::from_parts(2001, 2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),] @@ -608,14 +608,14 @@ mod tests { assert_eq!(take_trace(), vec![msg_limit_reached(1000)]); let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(2001)); + assert_eq!(weight_used, Weight::from_parts(2001, 2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),] ); let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(1002)); + assert_eq!(weight_used, Weight::from_parts(1002, 1002)); assert_eq!(take_trace(), vec![msg_complete(1002),]); assert!(queue_is_empty()); }); @@ -626,13 +626,13 @@ mod tests { new_test_ext().execute_with(|| { let incoming = vec![msg(1000), msg(1001), msg(1002)]; let weight_used = handle_messages(&incoming, Weight::from_parts(1500, 1500)); - assert_eq!(weight_used, Weight::from_ref_time(1000)); + assert_eq!(weight_used, Weight::from_parts(1000, 1000)); assert_eq!(pages_queued(), 1); assert_eq!(Pages::::get(0).len(), 2); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); let weight_used = handle_messages(&[], Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(2003)); + assert_eq!(weight_used, Weight::from_parts(2003, 2003)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_complete(1002),]); assert!(queue_is_empty()); }); @@ -645,7 +645,7 @@ mod tests { let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); - assert_eq!(weight_used, Weight::from_ref_time(4006)); + assert_eq!(weight_used, Weight::from_parts(4006, 4006)); assert_eq!( take_trace(), vec![ @@ -666,7 +666,7 @@ mod tests { let incoming = vec![msg(1002), msg(1003)]; enqueue(&enqueued); let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); - assert_eq!(weight_used, Weight::from_ref_time(1000)); + assert_eq!(weight_used, Weight::from_parts(1000, 1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(10001),]); assert_eq!(pages_queued(), 2); @@ -677,7 +677,7 @@ mod tests { // 20000 is now enough to process everything. let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); - assert_eq!(weight_used, Weight::from_ref_time(12006)); + assert_eq!(weight_used, Weight::from_parts(12006, 12006)); assert_eq!( take_trace(), vec![msg_complete(10001), msg_complete(1002), msg_complete(1003),] @@ -693,7 +693,7 @@ mod tests { let incoming = vec![msg(10002), msg(1003)]; enqueue(&enqueued); let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); - assert_eq!(weight_used, Weight::from_ref_time(2001)); + assert_eq!(weight_used, Weight::from_parts(2001, 2001)); assert_eq!( take_trace(), vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(10002),] @@ -702,7 +702,7 @@ mod tests { // 20000 is now enough to process everything. let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); - assert_eq!(weight_used, Weight::from_ref_time(11005)); + assert_eq!(weight_used, Weight::from_parts(11005, 11005)); assert_eq!(take_trace(), vec![msg_complete(10002), msg_complete(1003),]); assert!(queue_is_empty()); }); @@ -715,7 +715,7 @@ mod tests { let incoming = vec![msg(1002), msg(10003)]; enqueue(&enqueued); let weight_used = handle_messages(&incoming, Weight::from_parts(5000, 5000)); - assert_eq!(weight_used, Weight::from_ref_time(3003)); + assert_eq!(weight_used, Weight::from_parts(3003, 3003)); assert_eq!( take_trace(), vec![ @@ -729,7 +729,7 @@ mod tests { // 20000 is now enough to process everything. let weight_used = handle_messages(&[], Weight::from_parts(20000, 20000)); - assert_eq!(weight_used, Weight::from_ref_time(10003)); + assert_eq!(weight_used, Weight::from_parts(10003, 10003)); assert_eq!(take_trace(), vec![msg_complete(10003),]); assert!(queue_is_empty()); }); @@ -741,19 +741,19 @@ mod tests { let enqueued = vec![msg(1000), msg(1001)]; enqueue(&enqueued); let weight_used = handle_messages(&vec![msg(1002)], Weight::from_parts(1500, 1500)); - assert_eq!(weight_used, Weight::from_ref_time(1000)); + assert_eq!(weight_used, Weight::from_parts(1000, 1000)); assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 0); let weight_used = handle_messages(&vec![msg(1003)], Weight::from_parts(1500, 1500)); - assert_eq!(weight_used, Weight::from_ref_time(1001)); + assert_eq!(weight_used, Weight::from_parts(1001, 1001)); assert_eq!(take_trace(), vec![msg_complete(1001), msg_limit_reached(1002),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 1); let weight_used = handle_messages(&vec![msg(1004)], Weight::from_parts(1500, 1500)); - assert_eq!(weight_used, Weight::from_ref_time(1002)); + assert_eq!(weight_used, Weight::from_parts(1002, 1002)); assert_eq!(take_trace(), vec![msg_complete(1002), msg_limit_reached(1003),]); assert_eq!(pages_queued(), 2); assert_eq!(PageIndex::::get().begin_used, 2); @@ -770,7 +770,7 @@ mod tests { let incoming = vec![msg(1000), msg(10001), msg(1002)]; let weight_used = handle_messages(&incoming, Weight::from_parts(2500, 2500)); - assert_eq!(weight_used, Weight::from_ref_time(2002)); + assert_eq!(weight_used, Weight::from_parts(2002, 2002)); assert!(queue_is_empty()); assert_eq!( take_trace(), @@ -833,7 +833,7 @@ mod tests { ) .unwrap(); let actual_weight = info.actual_weight.unwrap(); - assert_eq!(actual_weight, base_weight + Weight::from_ref_time(10000)); + assert_eq!(actual_weight, base_weight + Weight::from_parts(10000, 10000)); assert_eq!(take_trace(), vec![msg_complete(10000)]); assert!(overweights().is_empty()); @@ -855,8 +855,8 @@ mod tests { enqueue(&vec![msg(1002), msg(1003)]); enqueue(&vec![msg(1004), msg(1005)]); - let weight_used = DmpQueue::on_idle(1, Weight::from_ref_time(6000)); - assert_eq!(weight_used, Weight::from_ref_time(5010)); + let weight_used = DmpQueue::on_idle(1, Weight::from_parts(6000, 6000)); + assert_eq!(weight_used, Weight::from_parts(5010, 5010)); assert_eq!( take_trace(), vec![ From 97d8c80d88afc6e79e2972b416a690fb245a9957 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 12 Dec 2022 17:06:24 +0900 Subject: [PATCH 096/119] Remove unused label --- pallets/dmp-queue/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 650c307b3a9..8f8da85b610 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -221,7 +221,7 @@ pub mod pallet { messages_processed: &mut u8, ) -> Weight { let mut used = Weight::zero(); - 'page: while page_index.begin_used < page_index.end_used { + while page_index.begin_used < page_index.end_used { let page = Pages::::take(page_index.begin_used); for (i, &(sent_at, ref data)) in page.iter().enumerate() { if *messages_processed >= MAX_MESSAGES_PER_BLOCK { From 36a767cc9e3dab113a2f8bccc0a2d49ba000953f Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 12 Dec 2022 17:06:59 +0900 Subject: [PATCH 097/119] cargo fmt --- pallets/dmp-queue/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 8f8da85b610..26f618002a3 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -542,7 +542,10 @@ mod tests { } fn msg_limit_reached(weight: u64) -> (Xcm, Outcome) { - (msg(weight), Outcome::Error(XcmError::WeightLimitReached(Weight::from_parts(weight, weight)))) + ( + msg(weight), + Outcome::Error(XcmError::WeightLimitReached(Weight::from_parts(weight, weight))), + ) } fn pages_queued() -> PageCounter { From 1d6f7ae578d2477a18b810f35499e8aff633741b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Mon, 12 Dec 2022 18:09:25 +0900 Subject: [PATCH 098/119] Actually process incoming XCMs --- pallets/dmp-queue/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 26f618002a3..21ae50f0ab3 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -489,7 +489,19 @@ mod tests { _hash: XcmHash, _weight_limit: Weight, ) -> Outcome { - unreachable!() + let o = match (message.0.len(), &message.0.first()) { + (1, Some(Transact { require_weight_at_most, .. })) => { + if require_weight_at_most.all_lte(weight_limit) { + Outcome::Complete(*require_weight_at_most) + } else { + Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most)) + } + }, + // use 1000 to decide that it's not supported. + _ => Outcome::Incomplete(Weight::from_parts(1000, 1000).min(weight_limit), XcmError::Unimplemented), + }; + TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); + o } fn charge_fees(_location: impl Into, _fees: MultiAssets) -> XcmResult { From 90b7e77662536e8bed4ed25186a68978f2b6c0e0 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 13 Dec 2022 00:36:12 +0900 Subject: [PATCH 099/119] Fixes --- pallets/dmp-queue/src/lib.rs | 54 ++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 21ae50f0ab3..c7f6c3f4abb 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -468,42 +468,60 @@ mod tests { }) } - pub enum Weightless {} - impl PreparedMessage for Weightless { + pub struct WeightOutcome(Outcome); + impl PreparedMessage for WeightOutcome { fn weight_of(&self) -> Weight { - unreachable!() + self.0.weight_used() } } pub struct MockExec; impl ExecuteXcm for MockExec { - type Prepared = Weightless; + type Prepared = WeightOutcome; fn prepare(message: Xcm) -> Result { - Err(message) + let o = match (message.0.len(), &message.0.first()) { + (1, Some(Transact { require_weight_at_most, .. })) => { + Outcome::Complete(*require_weight_at_most) + }, + // use 1000 to decide that it's not supported. + _ => Outcome::Incomplete(Weight::from_parts(1000, 1000), XcmError::Unimplemented), + }; + Ok(o) } fn execute( _origin: impl Into, - _: Weightless, + WeightOutcome(o): WeightOutcome, _hash: XcmHash, - _weight_limit: Weight, + _weight_credit: Weight, ) -> Outcome { - let o = match (message.0.len(), &message.0.first()) { - (1, Some(Transact { require_weight_at_most, .. })) => { - if require_weight_at_most.all_lte(weight_limit) { - Outcome::Complete(*require_weight_at_most) - } else { - Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most)) - } - }, - // use 1000 to decide that it's not supported. - _ => Outcome::Incomplete(Weight::from_parts(1000, 1000).min(weight_limit), XcmError::Unimplemented), - }; TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); o } + fn execute_xcm_in_credit( + origin: impl Into, + message: Xcm, + hash: XcmHash, + weight_limit: Weight, + weight_credit: Weight, + ) -> Outcome { + match Self::prepare(message) { + Ok(pre @ WeightOutcome(Outcome::Complete(..))) => { + let xcm_weight = pre.weight_of(); + if xcm_weight.any_gt(weight_limt) { + return Outcome::Error(Error::WeightLimitReached(xcm_weight)) + } + Self::execute(origin, pre, hash, weight_credit) + }, + Ok(WeightOutcome(Outcome::Incomplete(w, XcmError::Unimplemented))) => { + Outcome::Incomplete(w.min(weight_limit), XcmError::Unimplemented) + }, + _ => Outcome::Error(Error::WeightNotComputable), + } + } + fn charge_fees(_location: impl Into, _fees: MultiAssets) -> XcmResult { Err(XcmError::Unimplemented) } From 838656ae5f056605179f2206fe3ca2f23cce0398 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 13 Dec 2022 03:20:30 +0900 Subject: [PATCH 100/119] Fixes --- pallets/dmp-queue/src/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index c7f6c3f4abb..cb4949aac3f 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -487,17 +487,16 @@ mod tests { // use 1000 to decide that it's not supported. _ => Outcome::Incomplete(Weight::from_parts(1000, 1000), XcmError::Unimplemented), }; - Ok(o) + Ok(WeightOutcome(o)) } fn execute( _origin: impl Into, - WeightOutcome(o): WeightOutcome, + _pre: WeightOutcome, _hash: XcmHash, _weight_credit: Weight, ) -> Outcome { - TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); - o + unreachable!() } fn execute_xcm_in_credit( @@ -508,17 +507,18 @@ mod tests { weight_credit: Weight, ) -> Outcome { match Self::prepare(message) { - Ok(pre @ WeightOutcome(Outcome::Complete(..))) => { - let xcm_weight = pre.weight_of(); - if xcm_weight.any_gt(weight_limt) { + Ok(WeightOutcome(o @ Outcome::Complete(..))) => { + let xcm_weight = o.weight_used(); + if xcm_weight.any_gt(weight_limit) { return Outcome::Error(Error::WeightLimitReached(xcm_weight)) } - Self::execute(origin, pre, hash, weight_credit) + TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); + o }, Ok(WeightOutcome(Outcome::Incomplete(w, XcmError::Unimplemented))) => { Outcome::Incomplete(w.min(weight_limit), XcmError::Unimplemented) }, - _ => Outcome::Error(Error::WeightNotComputable), + _ => Outcome::Error(XcmError::WeightNotComputable), } } From a50aed64f6008e5b590ad15671cb644e491a366c Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 13 Dec 2022 03:35:32 +0900 Subject: [PATCH 101/119] Fixes --- pallets/dmp-queue/src/lib.rs | 54 ++++++++++++++---------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index cb4949aac3f..10872de9504 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -468,31 +468,17 @@ mod tests { }) } - pub struct WeightOutcome(Outcome); - impl PreparedMessage for WeightOutcome { - fn weight_of(&self) -> Weight { - self.0.weight_used() - } - } - pub struct MockExec; impl ExecuteXcm for MockExec { - type Prepared = WeightOutcome; + type Prepared = (); - fn prepare(message: Xcm) -> Result { - let o = match (message.0.len(), &message.0.first()) { - (1, Some(Transact { require_weight_at_most, .. })) => { - Outcome::Complete(*require_weight_at_most) - }, - // use 1000 to decide that it's not supported. - _ => Outcome::Incomplete(Weight::from_parts(1000, 1000), XcmError::Unimplemented), - }; - Ok(WeightOutcome(o)) + fn prepare(_message: Xcm) -> Result { + unreachable!() } fn execute( _origin: impl Into, - _pre: WeightOutcome, + _pre: (), _hash: XcmHash, _weight_credit: Weight, ) -> Outcome { @@ -500,26 +486,28 @@ mod tests { } fn execute_xcm_in_credit( - origin: impl Into, + _origin: impl Into, message: Xcm, - hash: XcmHash, + _hash: XcmHash, weight_limit: Weight, - weight_credit: Weight, + _weight_credit: Weight, ) -> Outcome { - match Self::prepare(message) { - Ok(WeightOutcome(o @ Outcome::Complete(..))) => { - let xcm_weight = o.weight_used(); - if xcm_weight.any_gt(weight_limit) { - return Outcome::Error(Error::WeightLimitReached(xcm_weight)) + let o = match (message.0.len(), &message.0.first()) { + (1, Some(Transact { require_weight_at_most, .. })) => { + if require_weight_at_most.all_lte(weight_limit) { + Outcome::Complete(*require_weight_at_most) + } else { + Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most)) } - TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); - o - }, - Ok(WeightOutcome(Outcome::Incomplete(w, XcmError::Unimplemented))) => { - Outcome::Incomplete(w.min(weight_limit), XcmError::Unimplemented) }, - _ => Outcome::Error(XcmError::WeightNotComputable), - } + // use 1000 to decide that it's not supported. + _ => Outcome::Incomplete( + Weight::from_parts(1000, 1000).min(weight_limit), + XcmError::Unimplemented, + ), + }; + TRACE.with(|q| q.borrow_mut().push((message, o.clone()))); + o } fn charge_fees(_location: impl Into, _fees: MultiAssets) -> XcmResult { From ccb74d9e2e77fda88d3d9e5cedde6bf9f70626c1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Dec 2022 13:24:04 +0100 Subject: [PATCH 102/119] Fixes - return back Weightless --- pallets/dmp-queue/src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index 10872de9504..a9357260526 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -468,9 +468,16 @@ mod tests { }) } + pub enum Weightless {} + impl PreparedMessage for Weightless { + fn weight_of(&self) -> Weight { + unreachable!() + } + } + pub struct MockExec; impl ExecuteXcm for MockExec { - type Prepared = (); + type Prepared = Weightless; fn prepare(_message: Xcm) -> Result { unreachable!() @@ -478,7 +485,7 @@ mod tests { fn execute( _origin: impl Into, - _pre: (), + _pre: Weightless, _hash: XcmHash, _weight_credit: Weight, ) -> Outcome { From 221d6be47a392c85cd1fb37769a12880ef2a7b0a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Dec 2022 16:34:19 +0100 Subject: [PATCH 103/119] 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 <> --- pallets/xcmp-queue/src/benchmarking.rs | 2 +- .../runtimes/assets/statemine/src/lib.rs | 5 +- .../assets/statemine/src/weights/mod.rs | 1 + .../statemine/src/weights/pallet_xcm.rs | 117 ++++++++++++++++++ .../assets/statemine/src/weights/xcm/mod.rs | 3 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 76 ++++++------ .../assets/statemine/src/xcm_config.rs | 12 +- .../runtimes/assets/statemint/src/lib.rs | 5 +- .../assets/statemint/src/weights/mod.rs | 1 + .../statemint/src/weights/pallet_xcm.rs | 117 ++++++++++++++++++ .../assets/statemint/src/weights/xcm/mod.rs | 3 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 76 ++++++------ .../assets/statemint/src/xcm_config.rs | 12 +- .../runtimes/assets/westmint/src/lib.rs | 5 +- .../assets/westmint/src/weights/mod.rs | 1 + .../assets/westmint/src/weights/pallet_xcm.rs | 116 +++++++++++++++++ .../assets/westmint/src/weights/xcm/mod.rs | 3 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 76 ++++++------ .../assets/westmint/src/xcm_config.rs | 12 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 1 + .../bridge-hub-kusama/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 116 +++++++++++++++++ .../bridge-hub-kusama/src/xcm_config.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 1 + .../bridge-hub-rococo/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 116 +++++++++++++++++ .../bridge-hub-rococo/src/xcm_config.rs | 2 +- .../collectives-polkadot/src/lib.rs | 1 + .../collectives-polkadot/src/weights/mod.rs | 1 + .../src/weights/pallet_xcm.rs | 116 +++++++++++++++++ .../collectives-polkadot/src/xcm_config.rs | 3 +- .../contracts/contracts-rococo/src/lib.rs | 2 +- .../testing/rococo-parachain/Cargo.toml | 1 + 33 files changed, 869 insertions(+), 138 deletions(-) create mode 100644 parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs create mode 100644 parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs create mode 100644 parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs create mode 100644 parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs create mode 100644 parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs create mode 100644 parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs diff --git a/pallets/xcmp-queue/src/benchmarking.rs b/pallets/xcmp-queue/src/benchmarking.rs index 5d34d499dbe..5ac78bee763 100644 --- a/pallets/xcmp-queue/src/benchmarking.rs +++ b/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/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index c2051108e73..fdec9c6ff38 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -672,6 +672,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] @@ -859,7 +860,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; + use xcm_config::{LocalCheckAccount, KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -908,7 +909,7 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = CheckedAccount; + type CheckedAccount = LocalCheckAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/statemine/src/weights/mod.rs b/parachains/runtimes/assets/statemine/src/weights/mod.rs index 080584f2cfa..5dd6ffd662e 100644 --- a/parachains/runtimes/assets/statemine/src/weights/mod.rs +++ b/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/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..49dffce4223 --- /dev/null +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs @@ -0,0 +1,117 @@ +// 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-08, 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: 25_562 nanoseconds. + Weight::from_ref_time(26_177_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: 31_555 nanoseconds. + Weight::from_ref_time(32_297_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 24_516 nanoseconds. + Weight::from_ref_time(25_126_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: 14_521 nanoseconds. + Weight::from_ref_time(14_865_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_325 nanoseconds. + Weight::from_ref_time(4_578_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: 29_836 nanoseconds. + Weight::from_ref_time(30_213_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_333 nanoseconds. + Weight::from_ref_time(31_808_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs index eddabcd1dc1..d38e1c62e51 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs @@ -53,7 +53,8 @@ impl XcmWeightInfo for StatemineXcmWeight { } // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - Weight::MAX + // 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) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 76c40db7914..192173926fa 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,23 +18,23 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-12-08, 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 // --template=./templates/xcm-bench-template.hbs // --output=./parachains/runtimes/assets/statemine/src/weights/xcm/ @@ -56,38 +56,40 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(1_303_495_000 as u64) + Weight::from_ref_time(1_007_454_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_667_000 as u64) + Weight::from_ref_time(8_069_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(19_292_000 as u64) + Weight::from_ref_time(17_719_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } + // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(37_996_000 as u64) + Weight::from_ref_time(15_102_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(9_076_000 as u64) + Weight::from_ref_time(8_103_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(6_410_000 as u64) + Weight::from_ref_time(5_803_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(6_412_000 as u64) + Weight::from_ref_time(5_761_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(6_311_000 as u64) + Weight::from_ref_time(5_665_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(7_355_000 as u64) + Weight::from_ref_time(6_640_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(6_389_000 as u64) + Weight::from_ref_time(5_832_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -96,18 +98,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(23_020_000 as u64) + Weight::from_ref_time(21_808_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(13_613_000 as u64) + Weight::from_ref_time(21_743_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(6_457_000 as u64) + Weight::from_ref_time(5_793_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -116,13 +118,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(31_677_000 as u64) + Weight::from_ref_time(27_736_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(9_613_000 as u64) + Weight::from_ref_time(7_913_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -132,21 +134,21 @@ 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_588_580_000 as u64) + Weight::from_ref_time(1_181_673_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(497_452_000 as u64) + Weight::from_ref_time(415_651_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_502_000 as u64) + Weight::from_ref_time(38_939_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(6_427_000 as u64) + Weight::from_ref_time(5_918_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(6_303_000 as u64) + Weight::from_ref_time(5_829_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -155,12 +157,12 @@ impl WeightInfo { // 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_510_000 as u64) + Weight::from_ref_time(24_557_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_909_000 as u64) + Weight::from_ref_time(7_407_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -169,21 +171,23 @@ impl WeightInfo { // 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_949_000 as u64) + Weight::from_ref_time(21_839_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(6_491_000 as u64) + Weight::from_ref_time(5_796_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(6_527_000 as u64) + Weight::from_ref_time(5_808_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(6_440_000 as u64) + Weight::from_ref_time(5_790_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(6_426_000 as u64) + Weight::from_ref_time(5_774_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(5_930_000 as u64) } - pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 7584547de66..70e60530a45 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -36,9 +36,10 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -54,6 +55,8 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + /// The check account that is allowed to mint assets locally. + pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -362,8 +365,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - // FIXME: Replace with benchmarked weight info - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index 453516b45ad..a33d64abb76 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -685,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] @@ -872,7 +873,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{DotLocation, MaxAssetsIntoHolding}; + use xcm_config::{DotLocation, LocalCheckAccount, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -920,7 +921,7 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = CheckedAccount; + type CheckedAccount = LocalCheckAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/statemint/src/weights/mod.rs b/parachains/runtimes/assets/statemint/src/weights/mod.rs index 080584f2cfa..5dd6ffd662e 100644 --- a/parachains/runtimes/assets/statemint/src/weights/mod.rs +++ b/parachains/runtimes/assets/statemint/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/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..df19ab323ca --- /dev/null +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs @@ -0,0 +1,117 @@ +// 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-08, 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: 25_514 nanoseconds. + Weight::from_ref_time(26_283_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_293 nanoseconds. + Weight::from_ref_time(33_089_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 24_544 nanoseconds. + Weight::from_ref_time(24_953_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: 14_894 nanoseconds. + Weight::from_ref_time(15_309_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_351 nanoseconds. + Weight::from_ref_time(4_503_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_102 nanoseconds. + Weight::from_ref_time(30_938_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_133 nanoseconds. + Weight::from_ref_time(31_540_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs index b1a84cb9ccb..ed48d433170 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs @@ -53,7 +53,8 @@ impl XcmWeightInfo for StatemintXcmWeight { } // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - Weight::MAX + // 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) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 79066a2b9e5..7ff13672a6d 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,23 +18,23 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-12-08, 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 // --template=./templates/xcm-bench-template.hbs // --output=./parachains/runtimes/assets/statemint/src/weights/xcm/ @@ -56,38 +56,40 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(1_305_689_000 as u64) + Weight::from_ref_time(997_603_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_843_000 as u64) + Weight::from_ref_time(8_032_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(19_216_000 as u64) + Weight::from_ref_time(18_256_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } + // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(22_708_000 as u64) + Weight::from_ref_time(15_436_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(9_040_000 as u64) + Weight::from_ref_time(8_689_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(6_222_000 as u64) + Weight::from_ref_time(5_977_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(6_411_000 as u64) + Weight::from_ref_time(5_988_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(6_222_000 as u64) + Weight::from_ref_time(5_933_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(7_112_000 as u64) + Weight::from_ref_time(7_105_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(6_340_000 as u64) + Weight::from_ref_time(6_047_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -96,18 +98,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(22_943_000 as u64) + Weight::from_ref_time(22_105_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(13_178_000 as u64) + Weight::from_ref_time(21_843_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(6_333_000 as u64) + Weight::from_ref_time(6_099_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -116,13 +118,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(31_798_000 as u64) + Weight::from_ref_time(28_520_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(9_728_000 as u64) + Weight::from_ref_time(8_113_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -132,21 +134,21 @@ 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_583_652_000 as u64) + Weight::from_ref_time(1_226_787_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(497_448_000 as u64) + Weight::from_ref_time(417_404_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_383_000 as u64) + Weight::from_ref_time(38_060_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(6_308_000 as u64) + Weight::from_ref_time(6_034_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(6_327_000 as u64) + Weight::from_ref_time(5_967_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -155,12 +157,12 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn query_pallet() -> Weight { - Weight::from_ref_time(26_011_000 as u64) + Weight::from_ref_time(24_608_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(8_008_000 as u64) + Weight::from_ref_time(7_574_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -169,21 +171,23 @@ impl WeightInfo { // 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_963_000 as u64) + Weight::from_ref_time(22_429_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(6_378_000 as u64) + Weight::from_ref_time(5_928_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(6_313_000 as u64) + Weight::from_ref_time(5_911_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(6_324_000 as u64) + Weight::from_ref_time(5_844_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(6_336_000 as u64) + Weight::from_ref_time(5_881_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(6_052_000 as u64) } - pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 22b95110ee5..84a6131828b 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -36,9 +36,10 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -54,6 +55,8 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + /// The check account that is allowed to mint assets locally. + pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -361,8 +364,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - // FIXME: Replace with benchmarked weight info - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 65a5586f116..1178885b3ad 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -645,6 +645,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] @@ -831,7 +832,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{MaxAssetsIntoHolding, WestendLocation}; + use xcm_config::{LocalCheckAccount, MaxAssetsIntoHolding, WestendLocation}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -880,7 +881,7 @@ impl_runtime_apis! { impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = CheckedAccount; + type CheckedAccount = LocalCheckAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/westmint/src/weights/mod.rs b/parachains/runtimes/assets/westmint/src/weights/mod.rs index 080584f2cfa..5dd6ffd662e 100644 --- a/parachains/runtimes/assets/westmint/src/weights/mod.rs +++ b/parachains/runtimes/assets/westmint/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/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..7ccd41d3d20 --- /dev/null +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs @@ -0,0 +1,116 @@ +// 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-08, 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("westmint-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=westmint-dev +// --header=./file_header.txt +// --output=./parachains/runtimes/assets/westmint/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_652 nanoseconds. + Weight::from_ref_time(27_278_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_711 nanoseconds. + Weight::from_ref_time(33_447_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + // Storage: ParachainInfo ParachainId (r:1 w:0) + fn reserve_transfer_assets() -> Weight { + // Minimum execution time: 24_850 nanoseconds. + Weight::from_ref_time(25_427_000) + .saturating_add(T::DbWeight::get().reads(1)) + } + fn execute() -> Weight { + // Minimum execution time: 14_909 nanoseconds. + Weight::from_ref_time(15_229_000) + } + // Storage: PolkadotXcm SupportedVersion (r:0 w:1) + fn force_xcm_version() -> Weight { + // Minimum execution time: 14_930 nanoseconds. + Weight::from_ref_time(15_396_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_328 nanoseconds. + Weight::from_ref_time(4_510_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_943 nanoseconds. + Weight::from_ref_time(31_593_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_950 nanoseconds. + Weight::from_ref_time(32_364_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs index 5dfd526b7db..ee63ee3f2ad 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs @@ -53,7 +53,8 @@ impl XcmWeightInfo for WestmintXcmWeight { } // Currently there is no trusted reserve fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight { - Weight::MAX + // 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) -> Weight { assets.weigh_multi_assets(XcmFungibleWeight::::receive_teleported_asset()) diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index e6f01884049..3587e720f51 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,23 +18,23 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-09-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-12-08, 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("westmint-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=westmint-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=westmint-dev // --header=./file_header.txt // --template=./templates/xcm-bench-template.hbs // --output=./parachains/runtimes/assets/westmint/src/weights/xcm/ @@ -56,38 +56,40 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(1_324_853_000 as u64) + Weight::from_ref_time(1_021_862_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_533_000 as u64) + Weight::from_ref_time(7_993_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(19_435_000 as u64) + Weight::from_ref_time(18_053_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } + // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(22_656_000 as u64) + Weight::from_ref_time(15_191_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_900_000 as u64) + Weight::from_ref_time(8_307_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(6_255_000 as u64) + Weight::from_ref_time(5_916_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(6_268_000 as u64) + Weight::from_ref_time(5_943_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(6_304_000 as u64) + Weight::from_ref_time(6_024_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(7_279_000 as u64) + Weight::from_ref_time(6_608_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(6_297_000 as u64) + Weight::from_ref_time(5_885_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -96,18 +98,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(23_025_000 as u64) + Weight::from_ref_time(21_690_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(13_001_000 as u64) + Weight::from_ref_time(21_761_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(6_266_000 as u64) + Weight::from_ref_time(5_854_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -116,13 +118,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(31_348_000 as u64) + Weight::from_ref_time(27_989_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(9_534_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) @@ -132,21 +134,21 @@ 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_558_814_000 as u64) + Weight::from_ref_time(1_228_949_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(496_802_000 as u64) + Weight::from_ref_time(416_374_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_299_000 as u64) + Weight::from_ref_time(38_018_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(6_354_000 as u64) + Weight::from_ref_time(5_996_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(6_234_000 as u64) + Weight::from_ref_time(5_922_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -155,12 +157,12 @@ impl WeightInfo { // 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_150_000 as u64) + Weight::from_ref_time(24_130_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_969_000 as u64) + Weight::from_ref_time(7_238_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -169,21 +171,23 @@ impl WeightInfo { // 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(23_099_000 as u64) + Weight::from_ref_time(21_209_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(6_366_000 as u64) + Weight::from_ref_time(5_810_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(6_422_000 as u64) + Weight::from_ref_time(5_876_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(6_405_000 as u64) + Weight::from_ref_time(5_793_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(6_392_000 as u64) + Weight::from_ref_time(5_902_000 as u64) + } + pub(crate) fn unpaid_execution() -> Weight { + Weight::from_ref_time(6_092_000 as u64) } - pub(crate) fn unpaid_execution() -> Weight { Weight::from_ref_time(3_111_000 as u64) } } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 638085a5d3a..41d0f901cb0 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -36,9 +36,10 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -54,6 +55,8 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); + /// The check account that is allowed to mint assets locally. + pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -352,8 +355,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - // FIXME: Replace with benchmarked weight info - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index 705bbfda9e5..7fa2fc6154e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -440,6 +440,7 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] + [pallet_xcm, PolkadotXcm] ); } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index 56c03468aa7..9652048d249 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/parachains/runtimes/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; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..cd24496f035 --- /dev/null +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -0,0 +1,116 @@ +// 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-11, 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_345 nanoseconds. + Weight::from_ref_time(26_996_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_889 nanoseconds. + Weight::from_ref_time(33_380_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_707 nanoseconds. + Weight::from_ref_time(14_851_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_465 nanoseconds. + Weight::from_ref_time(4_580_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_482 nanoseconds. + Weight::from_ref_time(31_091_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_341 nanoseconds. + Weight::from_ref_time(31_876_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 947ab24f127..3d96de89721 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -246,7 +246,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 26590d912ca..d7f59ecff30 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -469,6 +469,7 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] + [pallet_xcm, PolkadotXcm] ); } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs index 56c03468aa7..9652048d249 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs +++ b/parachains/runtimes/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; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..de92cd8c026 --- /dev/null +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs @@ -0,0 +1,116 @@ +// 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-11, 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: 26_277 nanoseconds. + Weight::from_ref_time(27_202_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_941 nanoseconds. + Weight::from_ref_time(33_458_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_836 nanoseconds. + Weight::from_ref_time(15_261_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_373 nanoseconds. + Weight::from_ref_time(4_537_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_536 nanoseconds. + Weight::from_ref_time(31_384_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_667 nanoseconds. + Weight::from_ref_time(32_335_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index bb6f9ff1ad2..d79564ea2ea 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -242,7 +242,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index a329f80e39e..3ae7ef27580 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -587,6 +587,7 @@ mod benches { [cumulus_pallet_xcmp_queue, XcmpQueue] [pallet_alliance, Alliance] [pallet_collective, AllianceMotion] + [pallet_xcm, PolkadotXcm] ); } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/mod.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/mod.rs index bf736022ca7..76fbc081bc5 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/mod.rs +++ b/parachains/runtimes/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/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs new file mode 100644 index 00000000000..ea7701e2016 --- /dev/null +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -0,0 +1,116 @@ +// 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-11, 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: 25_986 nanoseconds. + Weight::from_ref_time(26_603_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_738 nanoseconds. + Weight::from_ref_time(33_574_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_431 nanoseconds. + Weight::from_ref_time(14_923_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_413 nanoseconds. + Weight::from_ref_time(4_640_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_293 nanoseconds. + Weight::from_ref_time(30_769_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_044 nanoseconds. + Weight::from_ref_time(31_600_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } +} diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index f776297d69d..a06a5524c11 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -267,8 +267,7 @@ impl pallet_xcm::Config for Runtime { type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; type MaxLockers = ConstU32<8>; - // FIXME: Replace with benchmarked weight info - type WeightInfo = pallet_xcm::TestWeightInfo; + type WeightInfo = crate::weights::pallet_xcm::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index ce18548d005..85208f94946 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -99,7 +99,6 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic, - pallet_balances::migration::MigrateToTrackInactive, ); /// Executive: handles dispatch to the various modules. @@ -385,6 +384,7 @@ mod benches { [pallet_timestamp, Timestamp] [pallet_collator_selection, CollatorSelection] [pallet_contracts, Contracts] + [pallet_xcm, PolkadotXcm] ); } diff --git a/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/parachains/runtimes/testing/rococo-parachain/Cargo.toml index a50349c4f3d..7bb3361d32a 100644 --- a/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -103,4 +103,5 @@ std = [ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "pallet-assets/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", ] From 27f9798882df466e99e7ba13c8f4d919be88514f Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 13 Dec 2022 16:45:34 +0100 Subject: [PATCH 104/119] cargo fmt --- parachains/runtimes/contracts/contracts-rococo/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 85208f94946..b490b0436d7 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -97,9 +97,7 @@ pub type UncheckedExtrinsic = /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; -pub type Migrations = ( - pallet_contracts::Migration, -); +pub type Migrations = (pallet_contracts::Migration,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< From bb821eb00f0e503cbce31ea9860e123b87574c19 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 14 Dec 2022 17:15:25 +0900 Subject: [PATCH 105/119] Fix benchmarks --- parachains/runtimes/assets/statemine/src/lib.rs | 6 +++--- parachains/runtimes/assets/statemine/src/xcm_config.rs | 9 +++------ parachains/runtimes/assets/statemint/src/lib.rs | 6 +++--- parachains/runtimes/assets/statemint/src/xcm_config.rs | 9 +++------ parachains/runtimes/assets/westmint/src/lib.rs | 4 ++-- parachains/runtimes/assets/westmint/src/xcm_config.rs | 9 +++------ 6 files changed, 17 insertions(+), 26 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index fdec9c6ff38..694de2a46b3 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -860,7 +860,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{LocalCheckAccount, KsmLocation, MaxAssetsIntoHolding}; + use xcm_config::{KsmLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -902,14 +902,14 @@ impl_runtime_apis! { KsmLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(KsmLocation::get()) }, )); - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = LocalCheckAccount; + type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 70e60530a45..a659ac06ba3 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -36,10 +36,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -55,8 +54,6 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - /// The check account that is allowed to mint assets locally. - pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index a33d64abb76..f07a2e8408b 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -873,7 +873,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{DotLocation, LocalCheckAccount, MaxAssetsIntoHolding}; + use xcm_config::{DotLocation, MaxAssetsIntoHolding}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { @@ -915,13 +915,13 @@ impl_runtime_apis! { DotLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(DotLocation::get()) }, )); - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = LocalCheckAccount; + type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 84a6131828b..b6c6b959cb6 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -36,10 +36,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -55,8 +54,6 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - /// The check account that is allowed to mint assets locally. - pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 1178885b3ad..1bf530380f5 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -874,14 +874,14 @@ impl_runtime_apis! { WestendLocation::get(), MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(WestendLocation::get()) }, )); - pub const CheckedAccount: Option = None; + pub const CheckedAccount: Option<(AccountId, xcm_builder::MintLocation)> = None; } impl pallet_xcm_benchmarks::fungible::Config for Runtime { type TransactAsset = Balances; - type CheckedAccount = LocalCheckAccount; + type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; fn get_multi_asset() -> MultiAsset { diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 41d0f901cb0..d7833eb96f9 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -36,10 +36,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - MintLocation, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, - WeightInfoBounds, + NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -55,8 +54,6 @@ parameter_types! { pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - /// The check account that is allowed to mint assets locally. - pub LocalCheckAccount: (AccountId, MintLocation) = (CheckingAccount::get(), MintLocation::Local); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used From c70a11fc50a908d2438cac2c21206e32ecce759c Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 14 Dec 2022 16:12:01 +0100 Subject: [PATCH 106/119] 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 <> --- .../statemine/src/weights/pallet_xcm.rs | 30 +++++----- .../xcm/pallet_xcm_benchmarks_fungible.rs | 35 +++++------ .../xcm/pallet_xcm_benchmarks_generic.rs | 60 +++++++++---------- .../statemint/src/weights/pallet_xcm.rs | 30 +++++----- .../xcm/pallet_xcm_benchmarks_fungible.rs | 35 +++++------ .../xcm/pallet_xcm_benchmarks_generic.rs | 60 +++++++++---------- .../runtimes/assets/westmint/src/lib.rs | 2 +- .../assets/westmint/src/weights/pallet_xcm.rs | 34 +++++------ .../xcm/pallet_xcm_benchmarks_fungible.rs | 35 +++++------ .../xcm/pallet_xcm_benchmarks_generic.rs | 60 +++++++++---------- .../src/weights/pallet_xcm.rs | 26 ++++---- .../src/weights/pallet_xcm.rs | 26 ++++---- .../src/weights/pallet_xcm.rs | 26 ++++---- 13 files changed, 228 insertions(+), 231 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs index 49dffce4223..84b38c418b1 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,21 +53,21 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 25_562 nanoseconds. - Weight::from_ref_time(26_177_000) + // Minimum execution time: 27_480 nanoseconds. + Weight::from_ref_time(27_952_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: 31_555 nanoseconds. - Weight::from_ref_time(32_297_000) + // Minimum execution time: 32_034 nanoseconds. + Weight::from_ref_time(32_516_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 24_516 nanoseconds. - Weight::from_ref_time(25_126_000) + // Minimum execution time: 25_008 nanoseconds. + Weight::from_ref_time(25_304_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Benchmark Override (r:0 w:0) @@ -77,14 +77,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_521 nanoseconds. - Weight::from_ref_time(14_865_000) + // Minimum execution time: 14_853 nanoseconds. + Weight::from_ref_time(15_204_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_325 nanoseconds. - Weight::from_ref_time(4_578_000) + // Minimum execution time: 4_423 nanoseconds. + Weight::from_ref_time(4_533_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 29_836 nanoseconds. - Weight::from_ref_time(30_213_000) + // Minimum execution time: 30_668 nanoseconds. + Weight::from_ref_time(31_262_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -109,8 +109,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_333 nanoseconds. - Weight::from_ref_time(31_808_000) + // Minimum execution time: 31_955 nanoseconds. + Weight::from_ref_time(32_364_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 27e7bcf448f..52ae41f2d63 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/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-05, 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(35_859_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(41_350_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(57_851_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(7_180_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(37_404_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(54_907_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(29_005_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/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 192173926fa..96040ac7e85 100644 --- a/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! 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-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -56,40 +56,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(1_007_454_000 as u64) + 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_069_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(17_719_000 as u64) + Weight::from_ref_time(17_915_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(15_102_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + Weight::from_ref_time(20_973_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_103_000 as u64) + Weight::from_ref_time(7_210_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_803_000 as u64) + Weight::from_ref_time(5_940_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_761_000 as u64) + Weight::from_ref_time(5_869_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_665_000 as u64) + Weight::from_ref_time(5_860_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_640_000 as u64) + Weight::from_ref_time(6_556_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_832_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) @@ -98,18 +96,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(21_808_000 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_743_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_793_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) @@ -118,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(27_736_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_913_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) @@ -134,21 +132,21 @@ 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_181_673_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(415_651_000 as u64) + Weight::from_ref_time(137_412_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_939_000 as u64) + Weight::from_ref_time(16_437_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(5_918_000 as u64) + Weight::from_ref_time(5_890_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(5_829_000 as u64) + Weight::from_ref_time(5_859_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -157,12 +155,12 @@ impl WeightInfo { // 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_557_000 as u64) + 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_407_000 as u64) + Weight::from_ref_time(7_708_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -171,23 +169,23 @@ impl WeightInfo { // 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_839_000 as u64) + 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_796_000 as u64) + Weight::from_ref_time(5_822_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(5_808_000 as u64) + Weight::from_ref_time(5_763_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(5_790_000 as u64) + Weight::from_ref_time(5_766_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(5_774_000 as u64) + Weight::from_ref_time(5_907_000 as u64) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(5_930_000 as u64) + Weight::from_ref_time(5_996_000 as u64) } } diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs index df19ab323ca..cb9e07533a6 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,21 +53,21 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 25_514 nanoseconds. - Weight::from_ref_time(26_283_000) + // Minimum execution time: 27_134 nanoseconds. + Weight::from_ref_time(27_929_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_293 nanoseconds. - Weight::from_ref_time(33_089_000) + // Minimum execution time: 32_099 nanoseconds. + Weight::from_ref_time(32_640_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 24_544 nanoseconds. - Weight::from_ref_time(24_953_000) + // Minimum execution time: 24_795 nanoseconds. + Weight::from_ref_time(25_143_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Benchmark Override (r:0 w:0) @@ -77,14 +77,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_894 nanoseconds. - Weight::from_ref_time(15_309_000) + // Minimum execution time: 15_099 nanoseconds. + Weight::from_ref_time(15_360_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_351 nanoseconds. - Weight::from_ref_time(4_503_000) + // Minimum execution time: 4_460 nanoseconds. + Weight::from_ref_time(4_646_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_102 nanoseconds. - Weight::from_ref_time(30_938_000) + // Minimum execution time: 31_019 nanoseconds. + Weight::from_ref_time(31_816_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -109,8 +109,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_133 nanoseconds. - Weight::from_ref_time(31_540_000) + // Minimum execution time: 32_139 nanoseconds. + Weight::from_ref_time(32_607_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index a8a87b7a0a4..286623a5ab7 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/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-05, 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(36_776_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(42_233_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(58_980_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(7_369_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(37_737_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(56_116_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(30_648_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/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 7ff13672a6d..27c05868787 100644 --- a/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! 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-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -56,40 +56,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(997_603_000 as u64) + 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_032_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(18_256_000 as u64) + Weight::from_ref_time(17_465_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(15_436_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + Weight::from_ref_time(21_163_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_689_000 as u64) + Weight::from_ref_time(7_024_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_977_000 as u64) + Weight::from_ref_time(5_758_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_988_000 as u64) + Weight::from_ref_time(5_832_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_933_000 as u64) + Weight::from_ref_time(5_763_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(7_105_000 as u64) + Weight::from_ref_time(6_560_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(6_047_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) @@ -98,18 +96,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(22_105_000 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(21_843_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(6_099_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) @@ -118,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(28_520_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(8_113_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) @@ -134,21 +132,21 @@ 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_226_787_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(417_404_000 as u64) + Weight::from_ref_time(127_341_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_060_000 as u64) + Weight::from_ref_time(15_151_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(6_034_000 as u64) + Weight::from_ref_time(5_828_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(5_967_000 as u64) + Weight::from_ref_time(5_758_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -157,12 +155,12 @@ impl WeightInfo { // 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_608_000 as u64) + 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_574_000 as u64) + Weight::from_ref_time(7_579_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -171,23 +169,23 @@ impl WeightInfo { // 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_429_000 as u64) + 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_928_000 as u64) + Weight::from_ref_time(5_798_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(5_911_000 as u64) + Weight::from_ref_time(5_876_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(5_844_000 as u64) + Weight::from_ref_time(5_690_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(5_881_000 as u64) + Weight::from_ref_time(5_668_000 as u64) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(6_052_000 as u64) + Weight::from_ref_time(6_005_000 as u64) } } diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 1bf530380f5..890cfe040ba 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -832,7 +832,7 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::{LocalCheckAccount, MaxAssetsIntoHolding, WestendLocation}; + use xcm_config::{MaxAssetsIntoHolding, WestendLocation}; use pallet_xcm_benchmarks::asset_instance_from; impl pallet_xcm_benchmarks::Config for Runtime { diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs index 7ccd41d3d20..5d9e6c7a95d 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("westmint-dev"), DB CACHE: 1024 @@ -53,37 +53,37 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_652 nanoseconds. - Weight::from_ref_time(27_278_000) + // Minimum execution time: 26_837 nanoseconds. + Weight::from_ref_time(28_006_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_711 nanoseconds. - Weight::from_ref_time(33_447_000) + // Minimum execution time: 31_634 nanoseconds. + Weight::from_ref_time(32_373_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 24_850 nanoseconds. - Weight::from_ref_time(25_427_000) + // Minimum execution time: 24_484 nanoseconds. + Weight::from_ref_time(24_978_000) .saturating_add(T::DbWeight::get().reads(1)) } fn execute() -> Weight { - // Minimum execution time: 14_909 nanoseconds. - Weight::from_ref_time(15_229_000) + // Minimum execution time: 14_813 nanoseconds. + Weight::from_ref_time(15_181_000) } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_930 nanoseconds. - Weight::from_ref_time(15_396_000) + // Minimum execution time: 14_791 nanoseconds. + Weight::from_ref_time(15_228_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_328 nanoseconds. - Weight::from_ref_time(4_510_000) + // Minimum execution time: 4_323 nanoseconds. + Weight::from_ref_time(4_495_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_943 nanoseconds. - Weight::from_ref_time(31_593_000) + // Minimum execution time: 30_640 nanoseconds. + Weight::from_ref_time(31_310_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -108,8 +108,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_950 nanoseconds. - Weight::from_ref_time(32_364_000) + // Minimum execution time: 31_891 nanoseconds. + Weight::from_ref_time(32_469_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index c89a2becdb6..bcf175e7c5e 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/assets/westmint/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-05, 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("westmint-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=westmint-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=westmint-dev // --header=./file_header.txt -// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +// --template=./templates/xcm-bench-template.hbs +// --output=./parachains/runtimes/assets/westmint/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(36_432_000 as u64) + Weight::from_ref_time(30_986_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(41_725_000 as u64) + Weight::from_ref_time(39_149_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(60_182_000 as u64) + Weight::from_ref_time(56_235_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(7_509_000 as u64) + Weight::from_ref_time(7_616_000 as u64) } // Storage: System Account (r:1 w:1) pub(crate) fn deposit_asset() -> Weight { - Weight::from_ref_time(37_620_000 as u64) + Weight::from_ref_time(34_864_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(56_103_000 as u64) + Weight::from_ref_time(55_915_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(30_157_000 as u64) + Weight::from_ref_time(30_050_000 as u64) .saturating_add(T::DbWeight::get().reads(6 as u64)) .saturating_add(T::DbWeight::get().writes(2 as u64)) } diff --git a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 3587e720f51..0e88b1349e2 100644 --- a/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! 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-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("westmint-dev"), DB CACHE: 1024 @@ -56,40 +56,38 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_holding() -> Weight { - Weight::from_ref_time(1_021_862_000 as u64) + Weight::from_ref_time(337_762_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(7_993_000 as u64) + Weight::from_ref_time(6_682_000 as u64) } // Storage: PolkadotXcm Queries (r:1 w:0) pub(crate) fn query_response() -> Weight { - Weight::from_ref_time(18_053_000 as u64) + Weight::from_ref_time(17_801_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) } - // Storage: Session NextKeys (r:1 w:0) pub(crate) fn transact() -> Weight { - Weight::from_ref_time(15_191_000 as u64) - .saturating_add(T::DbWeight::get().reads(1 as u64)) + Weight::from_ref_time(21_889_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(8_307_000 as u64) + Weight::from_ref_time(7_081_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_916_000 as u64) + Weight::from_ref_time(6_050_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_943_000 as u64) + Weight::from_ref_time(5_982_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(6_024_000 as u64) + Weight::from_ref_time(5_948_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_608_000 as u64) + Weight::from_ref_time(7_022_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_885_000 as u64) + Weight::from_ref_time(6_019_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -98,18 +96,18 @@ impl WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) pub(crate) fn report_error() -> Weight { - Weight::from_ref_time(21_690_000 as u64) + Weight::from_ref_time(21_836_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_761_000 as u64) + Weight::from_ref_time(21_512_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_854_000 as u64) + Weight::from_ref_time(5_971_000 as u64) } // Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -118,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(27_989_000 as u64) + Weight::from_ref_time(27_912_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_971_000 as u64) + Weight::from_ref_time(7_870_000 as u64) .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: ParachainInfo ParachainId (r:1 w:0) @@ -134,21 +132,21 @@ 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_228_949_000 as u64) + Weight::from_ref_time(390_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 burn_asset() -> Weight { - Weight::from_ref_time(416_374_000 as u64) + Weight::from_ref_time(128_254_000 as u64) } pub(crate) fn expect_asset() -> Weight { - Weight::from_ref_time(38_018_000 as u64) + Weight::from_ref_time(15_386_000 as u64) } pub(crate) fn expect_origin() -> Weight { - Weight::from_ref_time(5_996_000 as u64) + Weight::from_ref_time(6_071_000 as u64) } pub(crate) fn expect_error() -> Weight { - Weight::from_ref_time(5_922_000 as u64) + Weight::from_ref_time(6_044_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -157,12 +155,12 @@ impl WeightInfo { // 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_130_000 as u64) + Weight::from_ref_time(24_744_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_238_000 as u64) + Weight::from_ref_time(7_558_000 as u64) } // Storage: ParachainInfo ParachainId (r:1 w:0) // Storage: PolkadotXcm SupportedVersion (r:1 w:0) @@ -171,23 +169,23 @@ impl WeightInfo { // 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_209_000 as u64) + Weight::from_ref_time(22_068_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_810_000 as u64) + Weight::from_ref_time(5_945_000 as u64) } pub(crate) fn set_topic() -> Weight { - Weight::from_ref_time(5_876_000 as u64) + Weight::from_ref_time(5_863_000 as u64) } pub(crate) fn clear_topic() -> Weight { - Weight::from_ref_time(5_793_000 as u64) + Weight::from_ref_time(5_807_000 as u64) } pub(crate) fn set_fees_mode() -> Weight { - Weight::from_ref_time(5_902_000 as u64) + Weight::from_ref_time(5_825_000 as u64) } pub(crate) fn unpaid_execution() -> Weight { - Weight::from_ref_time(6_092_000 as u64) + Weight::from_ref_time(5_920_000 as u64) } } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index cd24496f035..045afa295bd 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("bridge-hub-kusama-dev"), DB CACHE: 1024 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_345 nanoseconds. - Weight::from_ref_time(26_996_000) + // Minimum execution time: 26_322 nanoseconds. + Weight::from_ref_time(27_595_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_889 nanoseconds. - Weight::from_ref_time(33_380_000) + // Minimum execution time: 32_648 nanoseconds. + Weight::from_ref_time(33_335_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Benchmark Override (r:0 w:0) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_707 nanoseconds. - Weight::from_ref_time(14_851_000) + // Minimum execution time: 15_024 nanoseconds. + Weight::from_ref_time(15_383_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_465 nanoseconds. - Weight::from_ref_time(4_580_000) + // Minimum execution time: 4_611 nanoseconds. + Weight::from_ref_time(4_751_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_482 nanoseconds. - Weight::from_ref_time(31_091_000) + // Minimum execution time: 30_923 nanoseconds. + Weight::from_ref_time(31_736_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -108,8 +108,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_341 nanoseconds. - Weight::from_ref_time(31_876_000) + // Minimum execution time: 32_167 nanoseconds. + Weight::from_ref_time(32_822_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs index de92cd8c026..d3308ed68cb 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("bridge-hub-rococo-dev"), DB CACHE: 1024 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_277 nanoseconds. - Weight::from_ref_time(27_202_000) + // Minimum execution time: 26_918 nanoseconds. + Weight::from_ref_time(28_481_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_941 nanoseconds. - Weight::from_ref_time(33_458_000) + // Minimum execution time: 33_157 nanoseconds. + Weight::from_ref_time(33_584_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Benchmark Override (r:0 w:0) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_836 nanoseconds. - Weight::from_ref_time(15_261_000) + // Minimum execution time: 14_206 nanoseconds. + Weight::from_ref_time(14_525_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_373 nanoseconds. - Weight::from_ref_time(4_537_000) + // Minimum execution time: 4_493 nanoseconds. + Weight::from_ref_time(4_573_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_536 nanoseconds. - Weight::from_ref_time(31_384_000) + // Minimum execution time: 31_132 nanoseconds. + Weight::from_ref_time(31_788_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -108,8 +108,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_667 nanoseconds. - Weight::from_ref_time(32_335_000) + // Minimum execution time: 32_099 nanoseconds. + Weight::from_ref_time(32_731_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index ea7701e2016..16964cac506 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("collectives-polkadot-dev"), DB CACHE: 1024 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 25_986 nanoseconds. - Weight::from_ref_time(26_603_000) + // Minimum execution time: 26_568 nanoseconds. + Weight::from_ref_time(27_534_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_738 nanoseconds. - Weight::from_ref_time(33_574_000) + // Minimum execution time: 33_083 nanoseconds. + Weight::from_ref_time(34_126_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Benchmark Override (r:0 w:0) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_431 nanoseconds. - Weight::from_ref_time(14_923_000) + // Minimum execution time: 14_497 nanoseconds. + Weight::from_ref_time(14_849_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_413 nanoseconds. - Weight::from_ref_time(4_640_000) + // Minimum execution time: 4_309 nanoseconds. + Weight::from_ref_time(4_647_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_293 nanoseconds. - Weight::from_ref_time(30_769_000) + // Minimum execution time: 30_585 nanoseconds. + Weight::from_ref_time(31_735_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -108,8 +108,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_044 nanoseconds. - Weight::from_ref_time(31_600_000) + // Minimum execution time: 31_687 nanoseconds. + Weight::from_ref_time(32_241_000) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } From 5cf2a723cf04a3a64b949e0f72d30906a3cb6c7b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Thu, 15 Dec 2022 23:06:54 +0900 Subject: [PATCH 107/119] Change AllowUnpaidExecutionFrom to be explicit --- .../runtimes/assets/statemine/src/xcm_config.rs | 4 ++-- .../runtimes/assets/statemint/src/xcm_config.rs | 4 ++-- parachains/runtimes/assets/westmint/src/xcm_config.rs | 4 ++-- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 10 +++++----- .../bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 10 +++++----- .../collectives-polkadot/src/xcm_config.rs | 11 ++++++----- .../contracts/contracts-rococo/src/xcm_config.rs | 6 +++--- parachains/runtimes/starters/shell/src/xcm_config.rs | 4 ++-- .../runtimes/testing/rococo-parachain/src/lib.rs | 10 +++++----- 9 files changed, 32 insertions(+), 31 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index a659ac06ba3..fac1d18a7df 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -34,7 +34,7 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -250,7 +250,7 @@ pub type Barrier = DenyThenTry< TakeWeightCredit, AllowTopLevelPaidExecutionFrom, // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index b6c6b959cb6..a92fa017678 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -34,7 +34,7 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -250,7 +250,7 @@ pub type Barrier = DenyThenTry< TakeWeightCredit, AllowTopLevelPaidExecutionFrom, // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index d7833eb96f9..e65f840925f 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -34,7 +34,7 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, @@ -245,7 +245,7 @@ pub type Barrier = DenyThenTry< TakeWeightCredit, AllowTopLevelPaidExecutionFrom, // Parent and its plurality get free execution - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 3d96de89721..1e175aa6ae3 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -32,10 +32,10 @@ use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, CurrencyAdapter, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -161,7 +161,7 @@ pub type Barrier = DenyThenTry< // Allow local users to buy weight credit. TakeWeightCredit, // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index d79564ea2ea..a1be8b50627 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -32,10 +32,10 @@ use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, CurrencyAdapter, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -160,7 +160,7 @@ pub type Barrier = DenyThenTry< // Allow local users to buy weight credit. TakeWeightCredit, // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index a06a5524c11..b2f98298d5a 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -31,10 +31,11 @@ use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, CurrencyAdapter, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -185,7 +186,7 @@ pub type Barrier = DenyThenTry< // Allow local users to buy weight credit. TakeWeightCredit, // Parent and its exec plurality get free execution. - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 8a49540eff0..0455c1a128f 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -29,8 +29,8 @@ use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, + AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, CurrencyAdapter, + EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, @@ -124,7 +124,7 @@ pub type Barrier = DenyThenTry< TakeWeightCredit, AllowTopLevelPaidExecutionFrom, // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index be83cb9fbfd..ca15fd65e45 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -24,7 +24,7 @@ use frame_support::{ }; use xcm::latest::prelude::*; use xcm_builder::{ - AllowUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, + AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; @@ -67,7 +67,7 @@ impl xcm_executor::Config for XcmConfig { type IsReserve = (); // balances not supported type IsTeleporter = (); // balances not supported type UniversalLocation = UniversalLocation; - type Barrier = AllowUnpaidExecutionFrom; + type Barrier = AllowExplicitUnpaidExecutionFrom; type Weigher = FixedWeightBounds; // balances not supported type Trader = (); // balances not supported type ResponseHandler = (); // Don't handle responses for now. diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index ffeb7bc1fa5..6acd8fb07f1 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -79,9 +79,9 @@ use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use polkadot_parachain::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowExplicitUnpaidExecutionFrom, + CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; @@ -377,9 +377,9 @@ match_types! { pub type Barrier = ( TakeWeightCredit, AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // ^^^ Parent & its unit plurality gets free execution - AllowUnpaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, // Subscriptions for version tracking are OK. From 5cdc48a80e334fba69b6f5924025e46f3e08fccf Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Fri, 23 Dec 2022 21:00:45 +0100 Subject: [PATCH 108/119] 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 --- .../statemine/src/weights/pallet_xcm.rs | 87 ++++++-- .../assets/statemine/src/xcm_config.rs | 5 +- .../statemint/src/weights/pallet_xcm.rs | 87 ++++++-- .../assets/statemint/src/xcm_config.rs | 5 +- .../assets/westmint/src/weights/pallet_xcm.rs | 91 ++++++-- .../assets/westmint/src/xcm_config.rs | 5 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 22 +- .../src/weights/pallet_xcm.rs | 83 +++++-- .../bridge-hub-kusama/src/weights/xcm/mod.rs | 210 +++++++++++------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 16 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 91 ++++++-- .../bridge-hub-kusama/src/xcm_config.rs | 3 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 22 +- .../src/weights/pallet_xcm.rs | 83 +++++-- .../bridge-hub-rococo/src/weights/xcm/mod.rs | 210 +++++++++++------- .../xcm/pallet_xcm_benchmarks_fungible.rs | 16 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 91 ++++++-- .../bridge-hub-rococo/src/xcm_config.rs | 5 +- .../src/weights/pallet_xcm.rs | 83 +++++-- .../collectives-polkadot/src/xcm_config.rs | 5 +- .../runtimes/starters/shell/src/xcm_config.rs | 2 +- .../testing/rococo-parachain/src/lib.rs | 2 +- 22 files changed, 899 insertions(+), 325 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs index 84b38c418b1..1b862af5342 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,21 +53,21 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 27_480 nanoseconds. - Weight::from_ref_time(27_952_000) + // 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_034 nanoseconds. - Weight::from_ref_time(32_516_000) + // 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_008 nanoseconds. - Weight::from_ref_time(25_304_000) + // 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) @@ -77,14 +77,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_853 nanoseconds. - Weight::from_ref_time(15_204_000) + // 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_423 nanoseconds. - Weight::from_ref_time(4_533_000) + // 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) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_668 nanoseconds. - Weight::from_ref_time(31_262_000) + // 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)) } @@ -109,9 +109,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_955 nanoseconds. - Weight::from_ref_time(32_364_000) + // 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/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index aad9d19333c..37317f9d1e0 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -47,9 +47,10 @@ use xcm_executor::{ 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 UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().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(); diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs index cb9e07533a6..69729e7f385 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,21 +53,21 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 27_134 nanoseconds. - Weight::from_ref_time(27_929_000) + // 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: 32_099 nanoseconds. - Weight::from_ref_time(32_640_000) + // 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_795 nanoseconds. - Weight::from_ref_time(25_143_000) + // 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) @@ -77,14 +77,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 15_099 nanoseconds. - Weight::from_ref_time(15_360_000) + // 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_460 nanoseconds. - Weight::from_ref_time(4_646_000) + // 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) @@ -96,8 +96,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 31_019 nanoseconds. - Weight::from_ref_time(31_816_000) + // 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)) } @@ -109,9 +109,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 32_139 nanoseconds. - Weight::from_ref_time(32_607_000) + // 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/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index f5a143d777c..78919d0ae17 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -47,9 +47,10 @@ use xcm_executor::{ 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 UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).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(); diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs index 5d9e6c7a95d..457e551e52d 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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("westmint-dev"), DB CACHE: 1024 @@ -53,37 +53,37 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_837 nanoseconds. - Weight::from_ref_time(28_006_000) + // Minimum execution time: 27_623 nanoseconds. + Weight::from_ref_time(28_375_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: 31_634 nanoseconds. - Weight::from_ref_time(32_373_000) + // Minimum execution time: 33_363 nanoseconds. + Weight::from_ref_time(33_942_000) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: ParachainInfo ParachainId (r:1 w:0) fn reserve_transfer_assets() -> Weight { - // Minimum execution time: 24_484 nanoseconds. - Weight::from_ref_time(24_978_000) + // Minimum execution time: 25_113 nanoseconds. + Weight::from_ref_time(25_549_000) .saturating_add(T::DbWeight::get().reads(1)) } fn execute() -> Weight { - // Minimum execution time: 14_813 nanoseconds. - Weight::from_ref_time(15_181_000) + // Minimum execution time: 15_464 nanoseconds. + Weight::from_ref_time(15_772_000) } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_791 nanoseconds. - Weight::from_ref_time(15_228_000) + // Minimum execution time: 15_375 nanoseconds. + Weight::from_ref_time(15_631_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_323 nanoseconds. - Weight::from_ref_time(4_495_000) + // Minimum execution time: 4_575 nanoseconds. + Weight::from_ref_time(4_708_000) .saturating_add(T::DbWeight::get().writes(1)) } // Storage: PolkadotXcm VersionNotifiers (r:1 w:1) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_640 nanoseconds. - Weight::from_ref_time(31_310_000) + // Minimum execution time: 31_521 nanoseconds. + Weight::from_ref_time(32_350_000) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -108,9 +108,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_891 nanoseconds. - Weight::from_ref_time(32_469_000) + // Minimum execution time: 32_589 nanoseconds. + Weight::from_ref_time(33_282_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_642 nanoseconds. + Weight::from_ref_time(13_969_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_569 nanoseconds. + Weight::from_ref_time(14_168_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_406 nanoseconds. + Weight::from_ref_time(15_731_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_357 nanoseconds. + Weight::from_ref_time(27_804_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_940 nanoseconds. + Weight::from_ref_time(7_147_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_204 nanoseconds. + Weight::from_ref_time(14_529_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_809 nanoseconds. + Weight::from_ref_time(33_346_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 7c8b3a15fe9..6e839044d0a 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -47,9 +47,10 @@ use xcm_executor::{ parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); - pub RelayNetwork: NetworkId = NetworkId::Westend; + pub RelayNetwork: Option = Some(NetworkId::Westend); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); - pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).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(); diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index c0f063cec8e..e0946f99a0c 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -618,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 { @@ -635,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 { @@ -644,7 +643,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -661,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 { @@ -675,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/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs index 045afa295bd..672b3f75421 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_322 nanoseconds. - Weight::from_ref_time(27_595_000) + // 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_648 nanoseconds. - Weight::from_ref_time(33_335_000) + // 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) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 15_024 nanoseconds. - Weight::from_ref_time(15_383_000) + // 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_611 nanoseconds. - Weight::from_ref_time(4_751_000) + // 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) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_923 nanoseconds. - Weight::from_ref_time(31_736_000) + // 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)) } @@ -108,9 +108,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 32_167 nanoseconds. - Weight::from_ref_time(32_822_000) + // 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/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs index 5051255d827..82b29187960 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/mod.rs +++ b/parachains/runtimes/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/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index c3e83e116cf..c5cf471c74d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,7 +18,7 @@ //! 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-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -51,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(25_434_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(36_180_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)) } @@ -69,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(83_476_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(6_009_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(27_729_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)) } @@ -90,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(44_605_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)) } @@ -101,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(21_605_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/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 003a0788721..0a4498c56e7 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! 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-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -55,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(21_039_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_375_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_091_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_057_000 as u64) + Weight::from_ref_time(21_240_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(5_397_000 as u64) + Weight::from_ref_time(6_118_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_347_000 as u64) + Weight::from_ref_time(5_855_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_346_000 as u64) + Weight::from_ref_time(5_901_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_310_000 as u64) + Weight::from_ref_time(5_762_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_273_000 as u64) + Weight::from_ref_time(6_717_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_279_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(14_974_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(20_711_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_154_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) @@ -115,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_872_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_356_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) @@ -131,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(22_312_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/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index f31d84a091a..6fca60ef532 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -21,7 +21,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Everything, Nothing}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -44,7 +43,7 @@ parameter_types! { pub const RelayNetwork: Option = Some(NetworkId::Kusama); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = - Parachain(ParachainInfo::parachain_id().into()).into(); + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; } diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 71f0a42a5d4..40f3c4bbe87 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -646,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 { @@ -663,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 { @@ -672,7 +671,6 @@ impl_runtime_apis! { type CheckedAccount = CheckedAccount; type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; fn get_multi_asset() -> MultiAsset { MultiAsset { @@ -689,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 { @@ -703,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/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs index d3308ed68cb..7d0e4a3546c 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_918 nanoseconds. - Weight::from_ref_time(28_481_000) + // 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: 33_157 nanoseconds. - Weight::from_ref_time(33_584_000) + // 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) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_206 nanoseconds. - Weight::from_ref_time(14_525_000) + // 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_493 nanoseconds. - Weight::from_ref_time(4_573_000) + // 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) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 31_132 nanoseconds. - Weight::from_ref_time(31_788_000) + // 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)) } @@ -108,9 +108,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 32_099 nanoseconds. - Weight::from_ref_time(32_731_000) + // 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/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 4d0d2c6ca9e..0b911aec2d5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/parachains/runtimes/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/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs index 213ddc25d38..fcd1d27780b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs @@ -18,7 +18,7 @@ //! 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-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -51,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(26_254_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(36_415_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)) } @@ -69,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(52_145_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(5_889_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(27_689_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)) } @@ -90,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(44_857_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)) } @@ -101,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(21_586_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/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 898e440420a..85c0fb34ac4 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -18,7 +18,7 @@ //! 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-15, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -55,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(21_192_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_394_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_081_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_230_000 as u64) + Weight::from_ref_time(20_743_000 as u64) } pub(crate) fn refund_surplus() -> Weight { - Weight::from_ref_time(5_286_000 as u64) + Weight::from_ref_time(5_960_000 as u64) } pub(crate) fn set_error_handler() -> Weight { - Weight::from_ref_time(5_275_000 as u64) + Weight::from_ref_time(5_857_000 as u64) } pub(crate) fn set_appendix() -> Weight { - Weight::from_ref_time(5_190_000 as u64) + Weight::from_ref_time(5_819_000 as u64) } pub(crate) fn clear_error() -> Weight { - Weight::from_ref_time(5_113_000 as u64) + Weight::from_ref_time(5_826_000 as u64) } pub(crate) fn descend_origin() -> Weight { - Weight::from_ref_time(6_169_000 as u64) + Weight::from_ref_time(6_641_000 as u64) } pub(crate) fn clear_origin() -> Weight { - Weight::from_ref_time(5_158_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_826_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_278_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_100_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) @@ -115,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_701_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_143_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) @@ -131,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(21_895_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/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index ac75427425e..4613f9f19fc 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -21,7 +21,6 @@ use super::{ use frame_support::{ match_types, parameter_types, traits::{ConstU32, Contains, Everything, Nothing}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ @@ -41,10 +40,10 @@ use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const RelayLocation: MultiLocation = MultiLocation::parent(); - pub const RelayNetwork: Option = None; + pub const RelayNetwork: Option = Some(NetworkId::Rococo); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = - Parachain(ParachainInfo::parachain_id().into()).into(); + X2(GlobalConsensus(RelayNetwork::get().unwrap()), Parachain(ParachainInfo::parachain_id().into())); pub const MaxInstructions: u32 = 100; pub const MaxAssetsIntoHolding: u32 = 64; } diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs index 16964cac506..ec9974dd295 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/weights/pallet_xcm.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-12-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! 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 @@ -53,15 +53,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem HostConfiguration (r:1 w:0) // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) fn send() -> Weight { - // Minimum execution time: 26_568 nanoseconds. - Weight::from_ref_time(27_534_000) + // 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_083 nanoseconds. - Weight::from_ref_time(34_126_000) + // 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) @@ -76,14 +76,14 @@ impl pallet_xcm::WeightInfo for WeightInfo { } // Storage: PolkadotXcm SupportedVersion (r:0 w:1) fn force_xcm_version() -> Weight { - // Minimum execution time: 14_497 nanoseconds. - Weight::from_ref_time(14_849_000) + // 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_309 nanoseconds. - Weight::from_ref_time(4_647_000) + // 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) @@ -95,8 +95,8 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_subscribe_version_notify() -> Weight { - // Minimum execution time: 30_585 nanoseconds. - Weight::from_ref_time(31_735_000) + // 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)) } @@ -108,9 +108,66 @@ impl pallet_xcm::WeightInfo for WeightInfo { // Storage: ParachainSystem PendingUpwardMessages (r:1 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn force_unsubscribe_version_notify() -> Weight { - // Minimum execution time: 31_687 nanoseconds. - Weight::from_ref_time(32_241_000) + // 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/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index d59062e58ab..f6485a88efd 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -40,9 +40,10 @@ 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 UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().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(); } diff --git a/parachains/runtimes/starters/shell/src/xcm_config.rs b/parachains/runtimes/starters/shell/src/xcm_config.rs index ca15fd65e45..8a7b3f21339 100644 --- a/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -30,7 +30,7 @@ use xcm_builder::{ parameter_types! { pub const RococoLocation: MultiLocation = MultiLocation::parent(); - pub const RococoNetwork: NetworkId = NetworkId::Polkadot; + pub const RococoNetwork: Option = Some(NetworkId::Rococo); pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); } diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index c5cc41f100f..f8e28aee4c7 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -276,7 +276,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} parameter_types! { pub const RocLocation: MultiLocation = MultiLocation::parent(); - pub const RococoNetwork: NetworkId = NetworkId::Polkadot; + pub const RococoNetwork: Option = Some(NetworkId::Rococo); pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into())); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); From e2a3354486acbe0d0b90223e043c77dcbafca9c7 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 3 Jan 2023 10:49:55 +0100 Subject: [PATCH 109/119] 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 --- Cargo.lock | 1 + pallets/parachain-system/src/lib.rs | 16 ++++++++++++---- pallets/xcmp-queue/src/lib.rs | 2 -- primitives/core/Cargo.toml | 1 + primitives/core/src/lib.rs | 7 +++++-- primitives/utility/src/lib.rs | 4 +--- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66a06633446..8cbcf7b0bc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1975,6 +1975,7 @@ dependencies = [ "sp-runtime", "sp-std", "sp-trie", + "xcm", ] [[package]] diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index f328ea1758f..0fa0c8c3441 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -53,6 +53,7 @@ use sp_runtime::{ }, }; use sp_std::{cmp, collections::btree_map::BTreeMap, prelude::*}; +use xcm::latest::XcmHash; mod migration; mod relay_state_snapshot; @@ -482,6 +483,8 @@ pub mod pallet { DownwardMessagesReceived { count: u32 }, /// Downward messages were processed using the given weight. DownwardMessagesProcessed { weight_used: Weight, dmq_head: relay_chain::Hash }, + /// An upward message was sent to the relay chain. + UpwardMessageSent { message_hash: Option }, } #[pallet::error] @@ -1034,7 +1037,7 @@ impl frame_system::SetCode for ParachainSetCode { } impl Pallet { - pub fn send_upward_message(message: UpwardMessage) -> Result { + pub fn send_upward_message(message: UpwardMessage) -> Result<(u32, XcmHash), MessageSendError> { // Check if the message fits into the relay-chain constraints. // // Note, that we are using `host_configuration` here which may be from the previous @@ -1064,13 +1067,18 @@ impl Pallet { // Thus fall through here. }, }; - >::append(message); - Ok(0) + >::append(message.clone()); + + // The relay ump does not use using_encoded + // We apply the same this to use the same hash + let hash = sp_io::hashing::blake2_256(message); + Self::deposit_event(Event::UpwardMessageSent { message_hash: Some(hash) }); + Ok((0, hash)) } } impl UpwardMessageSender for Pallet { - fn send_upward_message(message: UpwardMessage) -> Result { + fn send_upward_message(message: UpwardMessage) -> Result<(u32, XcmHash), MessageSendError> { Self::send_upward_message(message) } } diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 865df3d13b7..e31041b190e 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -290,8 +290,6 @@ pub mod pallet { BadVersion { message_hash: Option }, /// Bad XCM format used. BadFormat { message_hash: Option }, - /// An upward message was sent to the relay chain. - UpwardMessageSent { message_hash: Option }, /// An HRMP message was sent to a sibling parachain. XcmpMessageSent { message_hash: Option }, /// An XCM exceeded the individual message weight budget. diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 9a67cac16c5..bc00a655563 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -17,6 +17,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", default-features = polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } [features] default = [ "std" ] diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 516ff817dcf..23f50fe374a 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -32,6 +32,8 @@ pub use polkadot_primitives::v2::{ AbridgedHostConfiguration, AbridgedHrmpChannel, PersistedValidationData, }; +pub use xcm::latest::prelude::*; + /// A module that re-exports relevant relay chain definitions. pub mod relay_chain { pub use polkadot_core_primitives::*; @@ -94,10 +96,11 @@ pub trait GetChannelInfo { pub trait UpwardMessageSender { /// Send the given UMP message; return the expected number of blocks before the message will /// be dispatched or an error if the message cannot be sent. - fn send_upward_message(msg: UpwardMessage) -> Result; + /// return the hash of the message sent + fn send_upward_message(msg: UpwardMessage) -> Result<(u32, XcmHash), MessageSendError>; } impl UpwardMessageSender for () { - fn send_upward_message(_msg: UpwardMessage) -> Result { + fn send_upward_message(_msg: UpwardMessage) -> Result<(u32, XcmHash), MessageSendError> { Err(MessageSendError::NoChannel) } } diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 2d771a0d5cc..2af92003e2e 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -91,9 +91,7 @@ where } fn deliver(data: Vec) -> Result { - let hash = data.using_encoded(sp_io::hashing::blake2_256); - - T::send_upward_message(data).map_err(|e| match e { + let (_, hash) = T::send_upward_message(data).map_err(|e| match e { MessageSendError::TooBig => SendError::ExceedsMaxMessageSize, e => SendError::Transport(e.into()), })?; From 63a18c2c3b1e5c042a942574ce2ac3d3961f981c Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 3 Jan 2023 18:57:44 +0900 Subject: [PATCH 110/119] Fixes --- Cargo.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ccd570d0230..0a40c0659fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli 0.26.2", ] [[package]] @@ -1360,7 +1360,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.1", + "gimli 0.26.2", "log", "regalloc2", "smallvec", @@ -2910,7 +2910,7 @@ checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.4.4", + "miniz_oxide 0.5.4", ] [[package]] @@ -12951,7 +12951,7 @@ dependencies = [ "indexmap", "libc", "log", - "object", + "object 0.29.0", "once_cell", "paste", "psm", @@ -13008,9 +13008,9 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.1", + "gimli 0.26.2", "log", - "object", + "object 0.29.0", "target-lexicon", "thiserror", "wasmparser", @@ -13025,10 +13025,10 @@ checksum = "5c587c62e91c5499df62012b87b88890d0eb470b2ffecc5964e9da967b70c77c" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.1", + "gimli 0.26.2", "indexmap", "log", - "object", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -13047,9 +13047,9 @@ dependencies = [ "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.1", + "gimli 0.26.2", "log", - "object", + "object 0.29.0", "rustc-demangle", "rustix 0.35.10", "serde", @@ -13067,7 +13067,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b299569abf6f99b7b8e020afaf84a700e8636c6a42e242069267322cd5818235" dependencies = [ - "object", + "object 0.29.0", "once_cell", "rustix 0.35.10", ] From f9a039042338c9db2098ee4eab6d8e8f24c33bf5 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 3 Jan 2023 23:04:28 +0900 Subject: [PATCH 111/119] Fixes --- primitives/utility/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 2af92003e2e..c9747b67db6 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -349,7 +349,7 @@ mod tests { /// Impl [`UpwardMessageSender`] that return `Other` error struct OtherErrorUpwardMessageSender; impl UpwardMessageSender for OtherErrorUpwardMessageSender { - fn send_upward_message(_: UpwardMessage) -> Result { + fn send_upward_message(_: UpwardMessage) -> Result<(u32, XcmHash), MessageSendError> { Err(MessageSendError::Other) } } From 893bc5c5b3a389f0081eb578393e140bac48aabe Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 3 Jan 2023 23:50:50 +0900 Subject: [PATCH 112/119] Fixes --- Cargo.lock | 1 + pallets/parachain-system/Cargo.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 0a40c0659fb..97ee45aecb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1878,6 +1878,7 @@ dependencies = [ "sp-tracing", "sp-trie", "sp-version", + "xcm", ] [[package]] diff --git a/pallets/parachain-system/Cargo.toml b/pallets/parachain-system/Cargo.toml index 7602de269f3..abd333470eb 100644 --- a/pallets/parachain-system/Cargo.toml +++ b/pallets/parachain-system/Cargo.toml @@ -28,6 +28,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features # Polkadot polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, features = [ "wasm-api" ], branch = "master" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } # Cumulus cumulus-pallet-parachain-system-proc-macro = { path = "proc-macro", default-features = false } @@ -67,6 +68,7 @@ std = [ "sp-state-machine/std", "sp-std/std", "sp-trie/std", + "xcm/std", ] runtime-benchmarks = [ From e303fb22571f71fb020bb1b2e018fd59209c5519 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 4 Jan 2023 00:14:59 +0900 Subject: [PATCH 113/119] Fixes --- pallets/parachain-system/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index 0fa0c8c3441..a0254dc8d79 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -1071,7 +1071,7 @@ impl Pallet { // The relay ump does not use using_encoded // We apply the same this to use the same hash - let hash = sp_io::hashing::blake2_256(message); + let hash = sp_io::hashing::blake2_256(&message); Self::deposit_event(Event::UpwardMessageSent { message_hash: Some(hash) }); Ok((0, hash)) } From 8fe432bca3a346b5ccbc6a5ed5c348222c707189 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 7 Jan 2023 19:14:10 +0900 Subject: [PATCH 114/119] 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 --- parachain-template/runtime/src/xcm_config.rs | 18 ++++++++---- .../assets/statemine/src/xcm_config.rs | 19 +++++++++---- .../assets/statemint/src/xcm_config.rs | 19 +++++++++---- .../assets/westmint/src/xcm_config.rs | 19 +++++++++---- .../bridge-hub-kusama/src/xcm_config.rs | 19 +++++++++---- .../bridge-hub-rococo/src/xcm_config.rs | 19 +++++++++---- .../collectives-polkadot/src/xcm_config.rs | 20 +++++++++---- .../contracts-rococo/src/xcm_config.rs | 20 +++++++++---- .../runtimes/testing/penpal/src/xcm_config.rs | 28 +++++++++++++------ 9 files changed, 127 insertions(+), 54 deletions(-) diff --git a/parachain-template/runtime/src/xcm_config.rs b/parachain-template/runtime/src/xcm_config.rs index 7816b7f65d4..fa056fc65d3 100644 --- a/parachain-template/runtime/src/xcm_config.rs +++ b/parachain-template/runtime/src/xcm_config.rs @@ -13,11 +13,11 @@ use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, - EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, + CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + UsingComponents, WithComputedOrigin, }; use xcm_executor::{traits::ShouldExecute, XcmExecutor}; @@ -157,9 +157,15 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, - // ^^^ Parent and its exec plurality get free execution + WithComputedOrigin< + ( + AllowTopLevelPaidExecutionFrom, + AllowExplicitUnpaidExecutionFrom, + // ^^^ Parent and its exec plurality get free execution + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 37317f9d1e0..721732993b9 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -39,6 +39,7 @@ use xcm_builder::{ NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -249,13 +250,21 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowExplicitUnpaidExecutionFrom, // 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 executive plurality (i.e. governance) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 78919d0ae17..0aee1c97b16 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -39,6 +39,7 @@ use xcm_builder::{ NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -249,13 +250,21 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowExplicitUnpaidExecutionFrom, // 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 executive plurality (i.e. governance) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 6e839044d0a..81578bc4da7 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -39,6 +39,7 @@ use xcm_builder::{ NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; use xcm_executor::{ traits::{JustTry, WithOriginFilter}, @@ -244,13 +245,21 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its plurality get free execution - AllowExplicitUnpaidExecutionFrom, // 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 or its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 6fca60ef532..c2e95c6ed4e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -35,6 +35,7 @@ use xcm_builder::{ IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -156,14 +157,20 @@ pub type Barrier = DenyThenTry< ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowExplicitUnpaidExecutionFrom, // 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>, + >, ), >; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 4613f9f19fc..5e2511d6eb5 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -35,6 +35,7 @@ use xcm_builder::{ IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, + WithComputedOrigin, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -156,14 +157,20 @@ pub type Barrier = DenyThenTry< ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowExplicitUnpaidExecutionFrom, // 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>, + >, ), >; diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index f6485a88efd..984d42ba50e 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -35,6 +35,7 @@ use xcm_builder::{ FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WithComputedOrigin, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -185,14 +186,21 @@ pub type Barrier = DenyThenTry< ( // Allow local users to buy weight credit. TakeWeightCredit, - // Parent and its exec plurality get free execution. - AllowExplicitUnpaidExecutionFrom, // 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 executive plurality (i.e. governance) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 6e5bcb2d9a8..068d0ded4d3 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -33,7 +33,7 @@ use xcm_builder::{ FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - UsingComponents, + UsingComponents, WithComputedOrigin, }; use xcm_executor::XcmExecutor; @@ -122,13 +122,21 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowExplicitUnpaidExecutionFrom, // 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 executive plurality (i.e. governance) gets free execution. + AllowExplicitUnpaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; diff --git a/parachains/runtimes/testing/penpal/src/xcm_config.rs b/parachains/runtimes/testing/penpal/src/xcm_config.rs index 7af7ae2091f..cdc030318de 100644 --- a/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -43,12 +43,13 @@ use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, - AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, + WithComputedOrigin, }; use xcm_executor::{traits::JustTry, XcmExecutor}; @@ -152,15 +153,24 @@ pub type Barrier = DenyThenTry< DenyReserveTransferToRelayChain, ( TakeWeightCredit, - AllowTopLevelPaidExecutionFrom, - // Parent and its exec plurality get free execution - AllowUnpaidExecutionFrom, - // Assets Common Good parachain gets 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, + // Common Good Assets parachain, parent and its exec plurality get free execution + AllowExplicitUnpaidExecutionFrom<( + CommonGoodAssetsParachain, + ParentOrParentsExecutivePlurality, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ), >; From 87e0ea11645b649abcb5d7cf86b8586263df59ba Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 10 Jan 2023 21:14:11 +0900 Subject: [PATCH 115/119] Allow receiving XCMs from any relay chain plurality --- parachains/runtimes/assets/statemine/src/xcm_config.rs | 8 ++++---- parachains/runtimes/assets/statemint/src/xcm_config.rs | 8 ++++---- .../collectives/collectives-polkadot/src/xcm_config.rs | 4 ++-- .../runtimes/contracts/contracts-rococo/src/xcm_config.rs | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 721732993b9..a86828e0fe9 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -139,9 +139,9 @@ parameter_types! { } 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 } | @@ -257,8 +257,8 @@ pub type Barrier = DenyThenTry< ( // If the message is one that immediately attemps to pay for execution, then allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its executive plurality (i.e. governance) gets free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 0aee1c97b16..8b76134da31 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -139,9 +139,9 @@ parameter_types! { } 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 } | @@ -257,8 +257,8 @@ pub type Barrier = DenyThenTry< ( // If the message is one that immediately attemps to pay for execution, then allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its executive plurality (i.e. governance) gets free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 984d42ba50e..98c54de16cf 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -193,8 +193,8 @@ pub type Barrier = DenyThenTry< ( // If the message is one that immediately attemps to pay for execution, then allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its executive plurality (i.e. governance) gets free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), diff --git a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 068d0ded4d3..c71a60107e3 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -108,9 +108,9 @@ parameter_types! { } 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 } | @@ -129,8 +129,8 @@ pub type Barrier = DenyThenTry< ( // If the message is one that immediately attemps to pay for execution, then allow it. AllowTopLevelPaidExecutionFrom, - // Parent and its executive plurality (i.e. governance) gets free execution. - AllowExplicitUnpaidExecutionFrom, + // Parent and its plurality (i.e. governance bodies) gets free execution. + AllowExplicitUnpaidExecutionFrom, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, ), From 146c742e407b5f3c83cee4b8eb8ec7684949a40b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 11 Jan 2023 01:58:11 +0900 Subject: [PATCH 116/119] Fixes --- .../collectives/collectives-polkadot/src/xcm_config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 98c54de16cf..a97c7677570 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -107,9 +107,9 @@ parameter_types! { } 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 } | From 447d1a702ccf13e92a35e6cb63146102d22e3491 Mon Sep 17 00:00:00 2001 From: parity-processbot <> Date: Tue, 17 Jan 2023 07:06:20 +0000 Subject: [PATCH 117/119] update lockfile for {"polkadot", "substrate"} --- Cargo.lock | 522 +++++++++++++++++++++++++++-------------------------- 1 file changed, 267 insertions(+), 255 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65cacc89553..f6de3a47c95 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", @@ -3121,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", ] @@ -3144,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", @@ -3167,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", @@ -3214,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", @@ -3225,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", @@ -3242,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", @@ -3271,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", @@ -3287,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", @@ -3319,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", @@ -3333,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", @@ -3345,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", @@ -3355,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", @@ -3373,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", @@ -3388,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", @@ -3397,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", @@ -4327,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "frame-benchmarking", @@ -4424,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "polkadot-primitives", @@ -5250,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", @@ -5269,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", @@ -5761,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", @@ -5782,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", @@ -5800,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", @@ -5815,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", @@ -5831,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", @@ -5847,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", @@ -5862,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", @@ -5886,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", @@ -5906,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", @@ -5921,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", @@ -5937,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", @@ -5960,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", @@ -5978,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", @@ -6022,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", @@ -6039,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", @@ -6068,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", @@ -6080,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", @@ -6090,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", @@ -6107,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", @@ -6125,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", @@ -6148,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", @@ -6161,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", @@ -6179,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", @@ -6197,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", @@ -6220,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", @@ -6236,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", @@ -6256,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", @@ -6273,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", @@ -6290,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", @@ -6307,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", @@ -6323,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", @@ -6340,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", @@ -6356,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", @@ -6373,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", @@ -6393,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", @@ -6403,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", @@ -6420,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", @@ -6443,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", @@ -6460,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", @@ -6475,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", @@ -6489,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", @@ -6507,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", @@ -6522,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", @@ -6541,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", @@ -6558,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", @@ -6579,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", @@ -6595,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", @@ -6609,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", @@ -6632,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", @@ -6643,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", @@ -6652,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", @@ -6669,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", @@ -6698,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", @@ -6716,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", @@ -6735,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", @@ -6751,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", @@ -6767,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", @@ -6779,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", @@ -6796,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", @@ -6811,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", @@ -6827,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", @@ -6842,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", @@ -6857,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -6866,6 +6868,7 @@ dependencies = [ "scale-info", "serde", "sp-core", + "sp-io", "sp-runtime", "sp-std", "xcm", @@ -6875,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-benchmarking", "frame-support", @@ -6883,9 +6886,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-io", "sp-runtime", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] @@ -7409,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "polkadot-node-metrics", @@ -7424,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7438,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "derive_more", "fatality", @@ -7461,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "fatality", "futures", @@ -7482,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "clap 4.0.32", "frame-benchmarking-cli", @@ -7509,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "frame-benchmarking", @@ -7552,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "always-assert", "bitvec", @@ -7574,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "parity-scale-codec", "scale-info", @@ -7586,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "derive_more", "fatality", @@ -7611,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7625,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "futures-timer", @@ -7645,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "always-assert", "async-trait", @@ -7669,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "parity-scale-codec", @@ -7687,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "derive_more", @@ -7716,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "futures", @@ -7736,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "fatality", @@ -7755,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7770,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "futures", @@ -7789,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "polkadot-node-metrics", @@ -7804,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "futures-timer", @@ -7821,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "fatality", "futures", @@ -7840,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "futures", @@ -7857,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "fatality", @@ -7875,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "always-assert", "assert_matches", @@ -7907,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "polkadot-node-primitives", @@ -7923,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "futures", "lru", @@ -7938,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "lazy_static", "log", @@ -7956,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bs58", "futures", @@ -7975,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "derive_more", @@ -7998,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bounded-vec", "futures", @@ -8020,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8030,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "futures", @@ -8048,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "derive_more", @@ -8071,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "derive_more", @@ -8104,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "futures", @@ -8127,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "derive_more", "frame-support", @@ -8224,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -8239,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "hex-literal", @@ -8265,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8297,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "frame-benchmarking", @@ -8386,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "frame-benchmarking", @@ -8434,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "polkadot-primitives", @@ -8448,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bs58", "parity-scale-codec", @@ -8460,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitflags", "bitvec", @@ -8503,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "async-trait", "beefy-gadget", @@ -8610,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8631,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8641,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8666,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8727,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-benchmarking", "frame-system", @@ -9453,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "beefy-merkle-tree", "frame-benchmarking", @@ -9539,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "polkadot-primitives", @@ -9763,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", @@ -9774,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", @@ -9801,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", @@ -9824,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", @@ -9840,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", @@ -9855,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", @@ -9866,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", @@ -9906,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", @@ -9932,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", @@ -9957,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", @@ -9982,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", @@ -10011,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", @@ -10049,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", @@ -10071,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", @@ -10084,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", @@ -10107,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", @@ -10131,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", @@ -10144,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", @@ -10157,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", @@ -10174,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", @@ -10214,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", @@ -10234,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", @@ -10249,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", @@ -10264,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", @@ -10306,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", @@ -10325,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", @@ -10351,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", @@ -10369,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", @@ -10390,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", @@ -10422,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", @@ -10441,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", @@ -10471,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", @@ -10484,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", @@ -10493,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", @@ -10522,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", @@ -10541,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", @@ -10556,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", @@ -10582,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", @@ -10647,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", @@ -10658,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", @@ -10677,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", @@ -10696,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", @@ -10715,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", @@ -10746,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", @@ -10757,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", @@ -10783,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", @@ -10797,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", @@ -11226,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "enumn", "parity-scale-codec", @@ -11303,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", @@ -11321,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", @@ -11333,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", @@ -11346,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", @@ -11360,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", @@ -11373,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", @@ -11385,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", @@ -11402,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", @@ -11414,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", @@ -11432,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", @@ -11450,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", @@ -11468,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", @@ -11491,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", @@ -11503,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", @@ -11516,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", @@ -11558,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", @@ -11572,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", @@ -11583,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", @@ -11592,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", @@ -11602,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", @@ -11613,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", @@ -11631,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", @@ -11645,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", @@ -11670,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", @@ -11681,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", @@ -11698,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", @@ -11707,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", @@ -11725,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", @@ -11739,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", @@ -11749,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", @@ -11759,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", @@ -11769,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", @@ -11791,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", @@ -11809,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", @@ -11821,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", @@ -11830,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", @@ -11844,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", @@ -11856,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", @@ -11876,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", @@ -11894,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", @@ -11909,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", @@ -11921,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", @@ -11930,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", @@ -11946,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", @@ -11969,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", @@ -11986,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", @@ -11997,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", @@ -12010,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", @@ -12331,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", ] @@ -12339,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", @@ -12358,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", @@ -12370,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", @@ -12383,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", @@ -12402,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", @@ -12428,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", @@ -12438,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", @@ -12449,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", @@ -12566,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "polkadot-primitives", @@ -12923,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12934,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -13064,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", @@ -13974,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "bitvec", "frame-benchmarking", @@ -14018,6 +14024,7 @@ dependencies = [ "pallet-society", "pallet-staking", "pallet-staking-reward-curve", + "pallet-state-trie-migration", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -14064,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "polkadot-primitives", @@ -14455,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" 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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-transaction-payment", "parity-scale-codec", @@ -14489,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "impl-trait-for-tuples", @@ -14501,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#5a43bc733024b6f2d4f1164db8991a393c8e14cb" dependencies = [ "Inflector", "proc-macro2", From eb99effb8b1b0adabdddbda7788c77b871167ee7 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 17 Jan 2023 17:23:02 +0900 Subject: [PATCH 118/119] Update polkadot --- Cargo.lock | 132 ++++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6de3a47c95..767147d5b3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4327,7 +4327,7 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -4424,7 +4424,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -6858,7 +6858,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-benchmarking", "frame-support", @@ -6878,7 +6878,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-benchmarking", "frame-support", @@ -7414,7 +7414,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-metrics", @@ -7429,7 +7429,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7443,7 +7443,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "fatality", @@ -7466,7 +7466,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "fatality", "futures", @@ -7487,7 +7487,7 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "clap 4.0.32", "frame-benchmarking-cli", @@ -7514,7 +7514,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "frame-benchmarking", @@ -7557,7 +7557,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "bitvec", @@ -7579,7 +7579,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "scale-info", @@ -7591,7 +7591,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "fatality", @@ -7616,7 +7616,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7630,7 +7630,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "futures-timer", @@ -7650,7 +7650,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "async-trait", @@ -7674,7 +7674,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "parity-scale-codec", @@ -7692,7 +7692,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "derive_more", @@ -7721,7 +7721,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "futures", @@ -7741,7 +7741,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "fatality", @@ -7760,7 +7760,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7775,7 +7775,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -7794,7 +7794,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-metrics", @@ -7809,7 +7809,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "futures-timer", @@ -7826,7 +7826,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "fatality", "futures", @@ -7845,7 +7845,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -7862,7 +7862,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "fatality", @@ -7880,7 +7880,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "always-assert", "assert_matches", @@ -7912,7 +7912,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "polkadot-node-primitives", @@ -7928,7 +7928,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "futures", "lru", @@ -7943,7 +7943,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "lazy_static", "log", @@ -7961,7 +7961,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bs58", "futures", @@ -7980,7 +7980,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -8003,7 +8003,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bounded-vec", "futures", @@ -8025,7 +8025,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8035,7 +8035,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -8053,7 +8053,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -8076,7 +8076,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "derive_more", @@ -8109,7 +8109,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "futures", @@ -8132,7 +8132,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derive_more", "frame-support", @@ -8229,7 +8229,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -8244,7 +8244,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "hex-literal", @@ -8270,7 +8270,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8302,7 +8302,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -8391,7 +8391,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -8439,7 +8439,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -8453,7 +8453,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bs58", "parity-scale-codec", @@ -8465,7 +8465,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitflags", "bitvec", @@ -8508,7 +8508,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "async-trait", "beefy-gadget", @@ -8615,7 +8615,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8636,7 +8636,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8646,7 +8646,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8671,7 +8671,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8732,7 +8732,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-benchmarking", "frame-system", @@ -9458,7 +9458,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "beefy-merkle-tree", "frame-benchmarking", @@ -9544,7 +9544,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -11232,7 +11232,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "enumn", "parity-scale-codec", @@ -12572,7 +12572,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -12929,7 +12929,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12940,7 +12940,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -13980,7 +13980,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "bitvec", "frame-benchmarking", @@ -14071,7 +14071,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "polkadot-primitives", @@ -14462,7 +14462,7 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -14478,7 +14478,7 @@ dependencies = [ [[package]] name = "xcm-builder" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "frame-support", "frame-system", @@ -14499,7 +14499,7 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "environmental", "frame-benchmarking", @@ -14519,7 +14519,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=master#5a43bc733024b6f2d4f1164db8991a393c8e14cb" +source = "git+https://github.com/paritytech/polkadot?branch=master#2ac18997ab3289cc8f0261f56cd43021fb405ebd" dependencies = [ "Inflector", "proc-macro2", From a6210c1d2eab3919cc53590ddb02480ebee8cfa8 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 17 Jan 2023 17:50:19 +0900 Subject: [PATCH 119/119] Add runtime-benchmarks feature --- test/service/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/service/Cargo.toml b/test/service/Cargo.toml index 58712afce54..f746118c778 100644 --- a/test/service/Cargo.toml +++ b/test/service/Cargo.toml @@ -82,6 +82,9 @@ polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } +[features] +runtime-benchmarks = ["polkadot-test-service/runtime-benchmarks"] + [[bench]] name = "transaction_throughput" harness = false